Page 1 of 1

Linking error in linux

Posted: Wed May 26, 2010 4:34 pm
by mosin
Hi,

I'm running Codelite 2.5 on linux and I have some problems at the end of the compilation. I have several projects in my workspace which all output a static library (.a). I have an executable project that links with all those libraries. I added the linking folders and the libraries to link with but I always have errors.

Code: Select all

g++ -o /home/svn/simulator/Binaries/linux/Simulator_d /home/svn/simulator/Temp/Linux/Debug/Executable/LinuxMain.o  "-L." "-L/usr/X11R7/lib"  -lusb-1.0 -lX11 -lGL -l/home/svn/simulator/Temp/Linux/Debug/libLogic -lz -l/usr/lib/libcrypt 
 
/usr/bin/ld: cannot find -l/home/svn/simulator/Temp/Linux/Debug/libLogic
the libLogic.a exists in the folder it tries to locate it... That's why I don't get it. Does anyone had that problem? Am I doing something wrong or it's an issue?

Thanks in advance!!

Re: Linking error in linux

Posted: Wed May 26, 2010 9:47 pm
by eranif
Try this:

Remove the entry which u used for adding 'libLogic' in the 'project settings -> linker' tab.

Next, in the same page (project settings -> linker) add under the 'Library path' field:

Code: Select all

/home/svn/simulator/Temp/Linux/Debug/
and under 'Libraries' add:

Code: Select all

Logic
This will result in this link link:

Code: Select all

-L/home/svn/simulator/Temp/Linux/Debug/ -lLogic
Eran

Re: Linking error in linux

Posted: Thu May 27, 2010 4:47 pm
by mosin
Hey!

Yeah, it worked. So, is it an issue you could fix for a future release?

Thanks!!

Re: Linking error in linux

Posted: Fri May 28, 2010 9:41 am
by eranif
There is no bug to fix

The field 'Library path' should contains a semi-colon list of all the search paths
The field 'Libraries' should contain a list of semi-colon list of all libraries to link with - without the path.

Please read this for more information on the project settings dialog:
http://codelite.org/LiteEditor/ProjectSettingsSummary

Eran