Problem linking a .lib static libary using MinGW

CodeLite installation/troubleshooting forum
KristianKarl
CodeLite Curious
Posts: 6
Joined: Thu Feb 18, 2010 1:20 pm
Genuine User: Yes
IDE Question: C++
Contact:

Problem linking a .lib static libary using MinGW

Post 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
frank_frl
CodeLite Expert
Posts: 176
Joined: Sun Aug 17, 2008 2:45 pm
Contact:

Re: Problem linking a .lib static libary using MinGW

Post 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
KristianKarl
CodeLite Curious
Posts: 6
Joined: Thu Feb 18, 2010 1:20 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Problem linking a .lib static libary using MinGW

Post by KristianKarl »

Thanx!
/Kristian
Post Reply