November 16th, 2002, 06:48 PM
Linking static libraries
Compiler: MS VC++ 6.0
Iím trying to write a static library to use in future projects. Iíve already made one that uses MFC, which is easy because the VC++ wizard sets it up for you. I now have a couple of third party libraries which I would like to use in the new library that Iím making. I wondering if anyone could tell me how I might go about linking the third party libraries to the one Iím creating. When you make a regular project there is a ďLinkĒ tab in the settings dialog where you can specify what you link to. But when you create a static library the ďLinkĒ tab is no longer present. Arenít I supposed to link to the other libraries, or do I do something else?
And if anyone could recommend a book on how to actually use this compiler I would really appreciate it, (i.e. settings, linking, preprocessor settings, what the hundreds of settings actually do, the proper way to link files, etc. etc. etc.)
Thanks for your time.
November 22nd, 2002, 10:23 AM
I'm not certain about MSVC++, but at least on UNIX platforms a static library can't be linked to other libraries. The library format there is really just a collection of object files with an index into the functions those files contain.
I don't know what the format of a static windows library is, but I suspect that it's similar. You might try creating a dynamic library, which does allow linking.
Articles and commentary on web development