How do you define project dependencies?

General questions regarding the usage of CodeLite
compound
CodeLite Curious
Posts: 3
Joined: Thu Dec 22, 2011 1:59 pm
Genuine User: Yes
IDE Question: c++
Contact:

How do you define project dependencies?

Post by compound »

Hi, I am currently migrating one of my projects to codelite from visual studio. its a fairly simple solution which has a main executable project and a lib project that the first should be a dependency of.

now in visual studio to make each project aware of each other you just have to right click the project and set the dependencies, but i am unsure how to achieve the same thing with codelite.

any ideas? thanks
jfouche
CodeLite Guru
Posts: 351
Joined: Mon Oct 20, 2008 7:26 pm
Genuine User: Yes
IDE Question: C++
Location: France
Contact:

Re: How do you define project dependencies?

Post by jfouche »

Right click on a project, and use the "Build order..." menu. You'll see in the left list all available projects. Just check the project which are dependancies : They will appear on the right list. You can change the build order between the dependancies project using the up / down buttons.
Jérémie
compound
CodeLite Curious
Posts: 3
Joined: Thu Dec 22, 2011 1:59 pm
Genuine User: Yes
IDE Question: c++
Contact:

Re: How do you define project dependencies?

Post by compound »

Hi, sorry for the late reply.

I have however already tried this, and I just get the undefined reference error when linking. is there anything i need to explicitly do in order to statically link with other projects? excuse my ignorance, as all you need to do in vis studio is create a static lib project, then select that in the "dependencies" list and it works.

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

Re: How do you define project dependencies?

Post by eranif »

compound wrote: have however already tried this, and I just get the undefined reference error when linking
You need to make sure that your static libraries are specified in the libraries list.

In your "project settings -> Common Settings -> Linker -> Libraries" set a semi-colon list of libraries you need to link against:

For example, if you have 2 static libraries libOne.a and libTwo.a, your "Libraries" should contain:

Code: Select all

One;Two
And Make sure that the library search path is set properly (similar to the above):

Code: Select all

C:\Path\One;C:\Path\Two;"C:\Path With Spaces\Should be written like this"
Eran
Make sure you have read the HOW TO POST thread
Post Reply