MinGW and libs name

General questions regarding the usage of CodeLite
jfouche
CodeLite Guru
Posts: 351
Joined: Mon Oct 20, 2008 7:26 pm
Genuine User: Yes
IDE Question: C++
Location: France
Contact:

MinGW and libs name

Post 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...) ?
Jérémie
jfouche
CodeLite Guru
Posts: 351
Joined: Mon Oct 20, 2008 7:26 pm
Genuine User: Yes
IDE Question: C++
Location: France
Contact:

Re: MinGW and libs name

Post by jfouche »

No point of view ?
Jérémie
User avatar
eranif
CodeLite Plugin
Posts: 6375
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: MinGW and libs name

Post 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
Make sure you have read the HOW TO POST thread
jfouche
CodeLite Guru
Posts: 351
Joined: Mon Oct 20, 2008 7:26 pm
Genuine User: Yes
IDE Question: C++
Location: France
Contact:

Re: MinGW and libs name

Post 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).
Jérémie
Post Reply