Add libraries to linker

CodeLite installation/troubleshooting forum
evstevemd
CodeLite Guru
Posts: 352
Joined: Sun Nov 29, 2009 7:36 pm
Genuine User: Yes
IDE Question: C++
Contact:

Add libraries to linker

Post by evstevemd »

I'm used to C::B way of doing it. I tried in CL and I didnt know how to add it.
The libraries are on different DIRs
Thanks

CodeLite 15.x
CodeLite is awesome, I just Love it!

User avatar
eranif
CodeLite Plugin
Posts: 6373
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Add libraries to linker

Post by eranif »

right click on the project and select 'settings'

Next, select the 'Linker' tab and type the name of the libraries as semi-colon list
e.g.:
LIbraries: mylib;mysecond_lib;

To add linker path:
/path/one;/path/two;

Eran
Make sure you have read the HOW TO POST thread
evstevemd
CodeLite Guru
Posts: 352
Joined: Sun Nov 29, 2009 7:36 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Add libraries to linker

Post by evstevemd »

So everything is semi-colon separated!
I will try that and feedback :D

CodeLite 15.x
CodeLite is awesome, I just Love it!

evstevemd
CodeLite Guru
Posts: 352
Joined: Sun Nov 29, 2009 7:36 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Add libraries to linker

Post by evstevemd »

eranif wrote:right click on the project and select 'settings'

Next, select the 'Linker' tab and type the name of the libraries as semi-colon list
e.g.:
LIbraries: mylib;mysecond_lib;

To add linker path:
/path/one;/path/two;

Eran
I did that
To add linker path:
C:\myliblocation\libx;C:\myliblocation\liby;
LIbraries:
libxx;libyy;

It compiles fine but linker still complains unrecognized file format ./libyy.dll
If I remove the library libyy in linker it complains unresolved value. I solved it by option "overwrite global settings" What are those global settings?

CodeLite 15.x
CodeLite is awesome, I just Love it!

evstevemd
CodeLite Guru
Posts: 352
Joined: Sun Nov 29, 2009 7:36 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Add libraries to linker

Post by evstevemd »

And another question, how do I configure CL to work with resource files? I cannot compile wxProject with resource file :(

CodeLite 15.x
CodeLite is awesome, I just Love it!

User avatar
eranif
CodeLite Plugin
Posts: 6373
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Add libraries to linker

Post by eranif »

- Add the .rc file to your project
- Right click on the project and select settings, select the 'Resources' tab
- Make sure that the 'Resource compiler is not needed' checkbox is *unchecked*
- Add any flags you need. For example, to build codelite itself, I simply add this to the 'Compiler Options:' field:

Code: Select all

$(shell wx-config --rcflags)
Eran
Make sure you have read the HOW TO POST thread
evstevemd
CodeLite Guru
Posts: 352
Joined: Sun Nov 29, 2009 7:36 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Add libraries to linker

Post by evstevemd »

I did that and found the above options filled in. When I leave them as they are, it cannot compile and I dont know what to fill in.
All I want to add is the rc. that comes with wxWidgets to retain native windows view.
Thanks

CodeLite 15.x
CodeLite is awesome, I just Love it!

User avatar
eranif
CodeLite Plugin
Posts: 6373
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Add libraries to linker

Post by eranif »

When posting build problems, please make sure you post the build log as well (all of it)

Eran
Make sure you have read the HOW TO POST thread
evstevemd
CodeLite Guru
Posts: 352
Joined: Sun Nov 29, 2009 7:36 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Add libraries to linker

Post by evstevemd »

Machine I use to code is away from here Iam.
I will post that but I know that you are used to wxprograming with codelite. What are your settings for compiling resources?
I will attach once I get there but it is something like cannot find some settings or arguments

CodeLite 15.x
CodeLite is awesome, I just Love it!

User avatar
eranif
CodeLite Plugin
Posts: 6373
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Add libraries to linker

Post by eranif »

evstevemd wrote:I will post that but I know that you are used to wxprograming with codelite. What are your settings for compiling resources?
What pasted in the previous post, was taken from codelite workspace on WIndows :)

This *is* my setting on Windows - this is why I need to see your build log, it will help me understand the problem clearer
Eran
Make sure you have read the HOW TO POST thread
Post Reply