[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.newcomer] Link Libraries CDT

I've upgraded to Eclipse 3.4.1, which seems to be the latest you can get from the Eclipse web site, at least for C development.

My program compiles but won't link.

Under Project/Properties/C/C++Build/Settings/GCC Linker/Libraries there are two boxes: one for individual libraries and one for library search path.

For the libraries I added, libGL.so, libGLU.so & libglut.so, each on their own line.

For the library search path I added /usr/lib/

I checked, the libraries I listed are in the specified directory:

ccp@ccp-desktop:~$ ls /usr/lib/libGL*.so
/usr/lib/libGL.so  /usr/lib/libGLU.so
ccp@ccp-desktop:~$ ls /usr/lib/libglut.so
/usr/lib/libglut.so

but the linker (ld) cannot find them and complains.

make all Building target: gears
Invoking: GCC C Linker
gcc -L/usr/lib/ -o"gears" ./draw_gears.o ./gl_drawing.o ./load_data.o /main.o ./normal.o ./prep_data.o -llibGL.so -llibGLU.so -llibglut.so
/usr/bin/ld: cannot find -llibGL.so
collect2: ld returned 1 exit status
make: *** [gears] Error 1


This is essentially the same command I had in the makefile I was using, and it worked there.