On 4/26/06, DJ Lucas <[EMAIL PROTECTED]> wrote: > > [EMAIL PROTECTED] ttt]# gcc -lGL -o true true.c > /usr/bin/ld: cannot find -lGL > collect2: ld returned 1 exit status
This is because gcc doesn't know about /opt/lib. The path used for ld is only for NEEDED libraries. Things that come on the command line are found by gcc. Try `gcc -print-search-dirs'. libGL would only be found if it was in the libraries search path. In this case, LIBRARY_PATH is appropriate. An alternative would be to put -L/opt/lib into the link* spec. Really, though, the solution is to specify -L for libraries outside of /lib and /usr/lib. Or, just install your libraries in one of the standard locations. I'm not really sure why the LFS book creates /opt/lib and friends. -- Dan -- http://linuxfromscratch.org/mailman/listinfo/blfs-support FAQ: http://www.linuxfromscratch.org/blfs/faq.html Unsubscribe: See the above information page
