Page 1 of 1

Problem linking a .lib static libary using MinGW

Posted: Mon Mar 01, 2010 3:45 pm
by KristianKarl
Hi,

I experienced some problem linking an executable with a static library.

I'm using CodeLite revision 3681 (with the bundled MinGW 4.4.0) on Windos XP.
I created a static library, which got the file extension .lib (Not using CodeLite, but the same MinGW dist. The library was boost 1.42, and I used:

Code: Select all

bjam --toolset=gcc link=static stage
to create the static library, which resulted in libboost_unit_test_framework-mgw44-mt.lib

Now when i tried to link that static library, the linker said that it could not find the library. (All lib paths correct)
But when I changed the suffix from .lib to .a (libboost_unit_test_framework-mgw44-mt.a) it worked.

Any ideas?

/Kristian

Re: Problem linking a .lib static libary using MinGW

Posted: Mon Mar 01, 2010 5:03 pm
by frank_frl
KristianKarl wrote: But when I changed the suffix from .lib to .a (libboost_unit_test_framework-mgw44-mt.a) it worked
For MinGW the library suffix has to be .a

Frank

Re: Problem linking a .lib static libary using MinGW

Posted: Mon Mar 01, 2010 7:42 pm
by KristianKarl
Thanx!
/Kristian