You are not logged in.
Pages: 1
How can I add /usr/lib/X11R6 to my library path for GCC so I dont need to add
-L /usr/lib/X11R6 to every compilation?
If I have the gift of prophecy and can fathom all mysteries and all knowledge, and if I have a faith that can move mountains, but have not love, I am nothing. 1 Corinthians 13:2
Offline
Add the paths to /etc/ld.so.conf and the run 'ldconfig' to regenerate the search path for the linker. Your other option is to add the path(s) to the LD_LIBRARY_PATH environment variable.
Follow the link below, sign up, and accept one promotional offer. If I can get five suckers (err... friends) to do this, I'll get a free iPod. Then you too can try to get a free iPod. Thanks! http://www.freeiPods.com/?r=11363142
Offline
I did that... and it just says: cannot find -lX11
If I have the gift of prophecy and can fathom all mysteries and all knowledge, and if I have a faith that can move mountains, but have not love, I am nothing. 1 Corinthians 13:2
Offline
Are you sure you specified the correct path? In your first post, you do not have it specified correctly. Here's my /etc/ld.so.conf:
#
# /etc/ld.so.conf
#
/usr/X11R6/lib
/opt/mozilla/lib/mozilla-1.6
/opt/gnome/lib
# End of file
After you make sure the paths are correct, re-run 'ldconfig' as root.
Follow the link below, sign up, and accept one promotional offer. If I can get five suckers (err... friends) to do this, I'll get a free iPod. Then you too can try to get a free iPod. Thanks! http://www.freeiPods.com/?r=11363142
Offline
#
# /etc/ld.so.conf
#
/usr/X11R6/lib
/opt/qt/lib
/opt/gnome/lib
# End of file
g++ main.cpp -lX11
brings this...
/usr/bin/ld: cannot find -lX11
collect2: ld returned 1 exit status
What the heck!
If I have the gift of prophecy and can fathom all mysteries and all knowledge, and if I have a faith that can move mountains, but have not love, I am nothing. 1 Corinthians 13:2
Offline
What do you get when you run this?
root@i8k$ ldconfig -v | grep X11
Here's what I get:
/usr/X11R6/lib:
libX11.so.6 -> libX11.so.6.2
Follow the link below, sign up, and accept one promotional offer. If I can get five suckers (err... friends) to do this, I'll get a free iPod. Then you too can try to get a free iPod. Thanks! http://www.freeiPods.com/?r=11363142
Offline
Mine is exactly the same!
If I have the gift of prophecy and can fathom all mysteries and all knowledge, and if I have a faith that can move mountains, but have not love, I am nothing. 1 Corinthians 13:2
Offline
I have the same problem. Although I have the line /usr/X11R6/lib in ld.so.conf since a long time.
Offline
Careful, everybody !
/etc/ld.so.conf only configures the RUN-TIME search paths, not the LINK-TIME paths !
There is no universal method to include paths for link/compile time. You can try to set the enviornment variable LFLAGS, but that only works (sometimes) with make.
Offline
....... . See gcc(1).
See the date of the thread .
English is not my native language .
Offline
Pages: 1