Page 1 of 1
How do you define project dependencies?
Posted: Thu Dec 22, 2011 2:38 pm
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
Re: How do you define project dependencies?
Posted: Thu Dec 22, 2011 5:18 pm
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.
Re: How do you define project dependencies?
Posted: Tue Jan 03, 2012 7:10 pm
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
Re: How do you define project dependencies?
Posted: Tue Jan 03, 2012 10:26 pm
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:
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