Results 1 to 7 of 7

Thread: Connecting to C++

  1. #1
    Frenzied Member
    Join Date
    Mar 00
    Posts
    1,089
    He he, I'm the first guy to post anything on this forum. OK here's my question.

    How do you export functions etc in C++

    I want to make a C++ back end for various VB projects I'd prefer to make a load of class mopdules but functions would be fine, I can write the C++ code I need and make the classes but I've learnt C++ mainly from seeing examples of windows programming so I know nothing about how to compile C++ code into anything apart from a console mode APP.

    Are there any web sites etc that can show me how to connect to C++ (I can do the VB end)

  2. #2
    Guest

    Question hello

    You don't have to compile to a console mode APP. There
    should be many different types of files you can compile
    into that will fit your purpose better.(Static Libraries and DLL's). Try using one of these.

    Since C++ Is an advanced language, I'd recommend reading
    books to get you started. Teach yourself VC++ in 21 days is a great one for beginners.

  3. #3
    Fanatic Member
    Join Date
    Oct 99
    Location
    MA, USA
    Posts
    523
    If you are trying to learn then I recommend: Microsoft Visual C++ 5 by Steven Holzner or just simpy C++. It comes from sybex Inc, http://www.sybex.com
    HTH

  4. #4
    Lively Member
    Join Date
    Jan 99
    Location
    Rochester NY, USA
    Posts
    93

    Question VB front end to C back end

    I'm working on something similar but the back end is a real time system. Does anyone know the performance hit that you'll take by compiling C code into a dll and then using VB as the front end? I'm not to savy with the MFC yet and it's going to take too long to get familiar enough with the classes to actually write the GUI using it. Am I right in thinking that a static DLL is going to be faster than a shared lib? It may just stay a console app if DLL performance is going to be slower..

  5. #5
    Frenzied Member
    Join Date
    Mar 00
    Posts
    1,089
    If you link dynamicly the code inside runs slower but the calls are faster, If it's staticly linked the code runs faster but the links are slower.

  6. #6
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 00
    Location
    Mashin' on the motorway
    Posts
    8,169
    um...rchiav...what d'you mean, static DLL? The idea of a DLL is that it is dynamic, so you resolve the names of functions at run time. The code runs at the same speed anyway, and if you statically link your library into your executable, then there's not much difference except it doesn't need to load the DLL into memory, find the function, and run it. Anyway, you _can_ statically link a C++ library into Visual Basic code, but it's one hell of a bumpy (and v. painful) ride...

  7. #7
    Lively Member
    Join Date
    Jan 99
    Location
    Rochester NY, USA
    Posts
    93
    Well I did some tests and it doesn't really run as fast. There's a performance hit when entering the dll. It's probably not noticeable in most applications but it is in what I'm working on. The program is staying as a console app for now. Eventually it will have a VC GUI once we get some other things ironed out.. thanks for your feedback..

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •