www.digitalmars.com         C & C++   DMDScript  

c++ - Library & Linking

reply MR <web rnetf.com> writes:
Don't know if this should be in this group but I didn't see a library group.

I have two C++ files that I put into a library(lib.exe). If I link a C++
program with the object files for the two, I get an executable that runs
correctly.
If I link the main with the library, entry points are missing. It appears that
the mangled C++ names are not being found in the library.
Apr 23 2009
parent reply Cesar Rabak <crabak acm.org> writes:
MR escreveu:
 Don't know if this should be in this group but I didn't see a library group.
 
 I have two C++ files that I put into a library(lib.exe). If I link a C++
 program with the object files for the two, I get an executable that runs
 correctly.
 If I link the main with the library, entry points are missing. It appears that
 the mangled C++ names are not being found in the library.
Do the main file have an include file with the appropriate declarations?
Apr 23 2009
parent MR <web rnetf.com> writes:
Again, my oversight.  Just starting with a new environment and I seem to be
running to a number of rather simple-minded oversights.
I am building code with more than one compiler system, for reasons that I hope
will change.  I have my own build software that must have some
customization for each different system.

For DM, I left out a comma between the executable output name and the library, a
place holder for the map file name.

Very sorry for any inconvenience.

MR
Apr 24 2009