Here's what I'd recommend:
Simply compile, not link the code you want in your lib (using -c). do this with all the code you want in the lib, so that you geta bunch of object (.o) files. Afterwards use the command "ar" to "build" the archive (lib) includeing all the object files. Check ar for it's options (I guess ar --help should do).
This way you get your .a library.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Someone know how to create libraries of c++ code, from dev-c++?, I am not talking about dlls, I think that this kind of files have a ".a" extension.
Thanks in advance,
Mnica
if you link with win32 static lib (project option) you get a file filename.a (which seems to be a lib).
Actually *I* just wanted to compile my project in a way that al libs are linked statically.
I think you link it in that way, and in a second step, you link this .a file to the other files giving in the link options the created lib. .
Patrick
Here's what I'd recommend:
Simply compile, not link the code you want in your lib (using -c). do this with all the code you want in the lib, so that you geta bunch of object (.o) files. Afterwards use the command "ar" to "build" the archive (lib) includeing all the object files. Check ar for it's options (I guess ar --help should do).
This way you get your .a library.