Page 1 of 1

MinGW and libs name

Posted: Sat May 16, 2009 4:58 pm
by jfouche
Hi Eran

I'm using MinGW and boost. When I compile (for example) boost::program_options with bjam, using :

Code: Select all

bjam --toolset=gcc --with-program_options release stage
The result is libboost_program_options-mgw34-mt.lib

If I add this lib in project settings (ie : libboost_program_options-mgw34-mt), I see that CodeLite generate the following makefile :

Code: Select all

Libs :=$(LibrarySwitch)boost_program_options-mgw34-mt
which is not correct for MinGW. I would like :

Code: Select all

Libs :=$(LibrarySwitch)libboost_program_options-mgw34-mt
with the lib prefix.

Actually, I always rename boost generated libs from .lib to .a, so that CodeLite makefile generation can link with my boost libs. What is your point of view about this ? What about a request (and maybe a patch, if I have some time to spend...) ?

Re: MinGW and libs name

Posted: Wed May 20, 2009 5:08 pm
by jfouche
No point of view ?

Re: MinGW and libs name

Posted: Wed May 20, 2009 5:52 pm
by eranif
I dont see the problem here...

Why cant you simply add

Code: Select all

libboost_program_options-mgw34-mt
in the first place? codelite does not add any prefix.

You can (but its not recommended) to change the value of $(LibrarySwitch) from 'settings -> build settings -> g++ -> switches'
which is currently only '-l' to '-llib'

Eran

Re: MinGW and libs name

Posted: Wed May 20, 2009 8:26 pm
by jfouche
eranif wrote:Why cant you simply add

Code: Select all

libboost_program_options-mgw34-mt
in the first place?
Well, CodeLite makefile generation seems to remove the lib prefix. The problem comes from the fact that the bjam binaries for msw generates a libboost_xxx.lib, which is not very good for MinGW (look here).