SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Hey I have what I think would be an easy question:
This compiles :
g++ someprog.cpp -L/usr/X11/lib -lX11
but this :
g++ someprog.cpp -lX11
gives an error (ld cannot find -lX11)
I thought if I put /usr/X11/lib/ into /etc/ld.so.conf then I wouldn't need to add the -L/usr/X11/lib/ all the time. What do I need to do to put that directory into the library search path?
Thanks!
p.s. I'm using Slackware 10.0 and the glibs have all been updated (using slackpkg)
I didn't run ldconfig, but did after reading your post.
It still give me the same error (cannot find -lX11) when I compile with :
g++ somefile.cpp -lX11
And when I compile without any options like so :
g++ somefile.cpp
I get
/tmp/ccAAgcot.o(.text+0x19): In function `main':
: undefined reference to `XOpenDisplay'
/tmp/ccAAgcot.o(.text+0x66): In function `main':
: undefined reference to `XCloseDisplay'
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.