Sign in to follow this  
White Rabbit

Free, solid tool to make static libraries?

Recommended Posts

Hi again. Free, solid tool to make static libraries? I'm looking for a free, mainstream(by this i mean, something that lots of ppl use), stable, static lib compiler. I use the Visual C++ Toolkit 2003 to compile most of my c/c++ code, and it was fine until i tried to compile a static lib with it, i was told that i needed a tool, lib32.exe, wich suposedly comes with Visual Studio, but doesn't come with either the Windows Platform SDK nor the Visual C++ Toolkit 2003. So, if you know of some tool to do this, maybe distributed in some service pack that i overlooked, or in some SDK i don't have yet, or something else, please share it. =) Thank you.

Share this post


Link to post
Share on other sites
There is no such thing as a standard program to make static libraries because each linker has its own format that it expects.

Also, the program you are looking for is called 'lib.exe' I believe and not *32 because I have MSVC.Net and I don't have a lib32.exe

I'm surprised to see the toolkit doesn't have the lib tool, but I'm not sure what you could do about it besides buying the compiler or switching entirely to a free system (like gcc and friends).

Share this post


Link to post
Share on other sites
Quote:
Original post by White Rabbit
I don't understand something... I though static libs could be used to share code with other coders possibly using other compilers/linkers, if there is no standard how is that possible?
Nope, static libraries are only for sharing code between projects, not between different compiler/linkers.

I could be mistaken, and maybe there are standards now, but 4 years ago every compiler/linker pair had its own formats for libs, object files, etc etc

Share this post


Link to post
Share on other sites
If your planning on making your library as portable as possible you will need to compile it under MSVC and a GCC based system like Dev-C++ to produce a .lib (for MSVC) and a .a (for GCC) although it is possible to produce a .a from a .lib by using a tool called reimp which is part of the MinGW utils.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this