Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » Eclipse cannot find already included libraries ? (Desparate for help)
Eclipse cannot find already included libraries ? (Desparate for help) [message #988620] Fri, 30 November 2012 17:40 Go to next message
Lalilu Lelo is currently offline Lalilu Lelo
Messages: 54
Registered: October 2012
Member
Hi everyone. I have been experiencing this - perhaps tiny - problem for days, and I cannot seem to figure out what is wrong.

So when i try to compile in eclise i get this...

/bin/ld: cannot find -l/usr/lib64/libGL.so
/bin/ld: cannot find -l/usr/lib64/libGL.so.1
/bin/ld: cannot find -l/usr/lib64/libGL.so.1.2

I have included those paths in the "paths and symbols" section on properties.

The error appeared when I included those paths. Before that, there used to be underlinings in my code (undefined references). After the libs were included the code became recognizable but i get the error above.

Please I need help with this as it's holding me back from getting on with my work.

Cheers!

*If I am not posting this at the right forum please do let me know as Im not sure.
Thanks in advance!
Re: Eclipse cannot find already included libraries ? (Desparate for help) [message #988646 is a reply to message #988620] Fri, 30 November 2012 20:39 Go to previous messageGo to next message
David Wegener is currently offline David Wegener
Messages: 1344
Registered: July 2009
Senior Member
Did you explicitly specify the libraries as /usr/lib64/libGL.so etc? This isn't how you specify libraries to the linker. You need to give it the path to look in (/usr/lib64) and specify the library name without the lib prefix and .so suffix. In your case you should only specify GL as the library to include.
Re: Eclipse cannot find already included libraries ? (Desparate for help) [message #988862 is a reply to message #988620] Mon, 03 December 2012 13:43 Go to previous messageGo to next message
Axel Mueller is currently offline Axel Mueller
Messages: 1964
Registered: July 2009
Senior Member
Quote:
I have included those paths in the "paths and symbols" section on properties.

That's the wrong place. See http://wiki.eclipse.org/CDT/User/FAQ#Adding_C.2FC.2B.2B_External_Libraries


Before you ask
- search this forum
- see the FAQ http://wiki.eclipse.org/CDT/User/FAQ
- google
Re: Eclipse cannot find already included libraries ? (Desparate for help) [message #989281 is a reply to message #988620] Wed, 05 December 2012 14:02 Go to previous messageGo to next message
Lalilu Lelo is currently offline Lalilu Lelo
Messages: 54
Registered: October 2012
Member
Ok that didn't help either.
The guide is refering to an older version, however i did what I could:

Project properties > C/C++ Build > Settings > Tool Settings > Cross G++ Linker > Libraries > Add (-l) > /usr/lib64

Now Im getting this error:
13:40:56 **** Incremental Build of configuration Debug for project hello_malaka ****
make all
Building target: hello_malaka
Invoking: Cross G++ Linker
g++  -o "hello_malaka"  ./hello.o   -l/usr/lib64
/bin/ld: cannot find -l/usr/lib64
collect2: error: ld returned 1 exit status
make: *** [hello_malaka] Error 1


index.php/fa/12603/0/
Re: Eclipse cannot find already included libraries ? (Desparate for help) [message #989285 is a reply to message #989281] Wed, 05 December 2012 14:28 Go to previous messageGo to next message
Thomas   is currently offline Thomas
Messages: 12
Registered: October 2012
Junior Member
I am not too up on C++ development (I am primarily a Java developer) however I believe that you have to add /usr/lib64 to the search path (the lower box) and then add "GL" (minus the quotes) to the libraries box (the upper box). The command generated should be something like:

g++ -o "hello_malaka" ./hello.o -L/usr/lib64 -lGL

[Updated on: Thu, 06 December 2012 15:41]

Report message to a moderator

Re: Eclipse cannot find already included libraries ? (Desparate for help) [message #989290 is a reply to message #988620] Wed, 05 December 2012 14:47 Go to previous messageGo to next message
Lalilu Lelo is currently offline Lalilu Lelo
Messages: 54
Registered: October 2012
Member
I have done that :

index.php/fa/12605/0/

Error now:
make all 
Building target: hello_malaka
Invoking: Cross G++ Linker
g++ -L/usr/lib64 -o "hello_malaka"  ./hello.o   -lglut -lglu -lGL
/bin/ld: cannot find -lglu
collect2: error: ld returned 1 exit status
make: *** [hello_malaka] Error 1



Still getting error that I don't understand. It can't find glu but CAN find everything else. glu is there as well...

[Updated on: Wed, 05 December 2012 14:48]

Report message to a moderator

Re: Eclipse cannot find already included libraries ? (Desparate for help) [message #989295 is a reply to message #989290] Wed, 05 December 2012 14:53 Go to previous messageGo to next message
David Wegener is currently offline David Wegener
Messages: 1344
Registered: July 2009
Senior Member
Are you sure that the library is glu. Should it be capitalized as GLU?
Re: Eclipse cannot find already included libraries ? (Desparate for help) [message #989298 is a reply to message #989290] Wed, 05 December 2012 14:58 Go to previous messageGo to next message
Lalilu Lelo is currently offline Lalilu Lelo
Messages: 54
Registered: October 2012
Member
Ok I think i fixed it!
I had to include GLEW, GL and glut in -l (top window).
So I located them and added the path to the bottom window! Now It compiles!!!!

Thanks for your help everyone !
Re: Eclipse cannot find already included libraries ? (Desparate for help) [message #989302 is a reply to message #988620] Wed, 05 December 2012 15:01 Go to previous message
Lalilu Lelo is currently offline Lalilu Lelo
Messages: 54
Registered: October 2012
Member
Quick parenthesese. Id like to mark this as solved. Can someone tell me how to do that real quick ? cheers
Previous Topic:Using CDT with Eclipse Indigo(3.7) on Solaris 10
Next Topic:Cross compiler for DOS?
Goto Forum:
  


Current Time: Sat Oct 25 09:36:22 GMT 2014

Powered by FUDForum. Page generated in 0.16277 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software