"Egor Tur" <[EMAIL PROTECTED]> writes: > When I compile programs: > $ g77 -o file -O file.f -lX11 > I see: > $ /usr/bin/ld: cannot find -lX11 > $ collect2: ld returned 1 exit status > But > $ cat /etc/ld/so.conf: > $ /usr/X11R6/lib > When I do: > $ g77 -o file -O file.f -L/usr/X11R6/lib -lX11 > this OK. > I try: > $export LD_LIBRARY_PATH=/usr/X11R6/lib > $ g77 -o file -O file.f -lX11 > $ /usr/bin/ld: cannot find -lX11 > $ collect2: ld returned 1 exit status > When I add in /etc/ld.so.conf path to my libraries and compile > program with this libraries - OK, compilation correct. > Why system do not find libX11 library?
LD_LIBRARY_PATH and /etc/ld.so.conf only affect the dynamic linker (ld.so). I don't think there's a way to globally add a directory to the compiler-linker search path; you always need to use the -L option. -- David Maze [EMAIL PROTECTED] http://people.debian.org/~dmaze/ "Theoretical politics is interesting. Politicking should be illegal." -- Abra Mitchell -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

