Click to See Complete Forum and Search --> : win32 libraries


Null Bock
October 11th, 2001, 07:09 AM
How would I go about storing library methods and classes in a library file for
easy access (this is C++)? Till now, I've either had to include the source
files in whatever project the library methods were needed in, or I've had to
link to their individual object codes. What I'd like to do is to statically
link to the obj files automatically, perhaps like with dlls :

#pragma comment(lib, "my_library.lib")



Can I somehow create a lib file for linking to .obj files? Or another
possibility, how can I force methods/classes in a dll to be linked statically,
without having to manually change project settings? Is there another option
I'm not considering?

(Bye the by, I'm working with VC++6, tho would prefer it if the solutions were
more generic.)

Walter Gildersleeve
Freiburg, Germany
walter.gildersleeve@pe-gmbh.com