|
-
Apr 23rd, 2000, 08:02 AM
#1
Thread Starter
Frenzied Member
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)
-
Apr 23rd, 2000, 11:17 AM
#2
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.
-
Apr 23rd, 2000, 11:22 AM
#3
Fanatic Member
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
-
Apr 24th, 2000, 12:09 AM
#4
Lively Member
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..
-
Apr 24th, 2000, 12:17 AM
#5
Thread Starter
Frenzied Member
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.
-
May 22nd, 2000, 02:04 AM
#6
Monday Morning Lunatic
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...
-
May 22nd, 2000, 02:40 AM
#7
Lively Member
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|