ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
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.
I m using a program that uses Xlib so when I tried to compile it.There was a problem in including the following header:
Code:
#include <X11/Xlib.h>
the error is :
Code:
X11/Xlib.h no such file or directory.
I searched where is The file of Xlib.h I found only one file by this name,so when I changed the path I got a lot of errors these are the 3 types of errors I have got:
error type 1:
Code:
/usr/lib/perl5/vendor_perl/5.8.5/i586-linux-thread-multi/Tk/pTk/Xlib.h:8: error: parse error before '*' token
error type 2:
Code:
/usr/lib/perl5/vendor_perl/5.8.5/i586-linux-thread-multi/Tk/pTk/Xlib.h:9: error: parse error before "_ANSI_ARGS_"
error type 3:
Code:
/usr/lib/perl5/vendor_perl/5.8.5/i586-linux-thread-multi/Tk/pTk/Xlib.h:11: error: parse error before "XInternAtom"
I m using linux SUSE 9.2
Can anyone tell me what should I do?
thanks
There should be an Xlib.h in /usr/include/X11 or /usr/X11R6/include/X11 or /usr/X11R7/include/X11 that was installed by the x-server. I'm guessing that is the one that you need.
What program are you trying to build? What distro are you using?
I already have that path (/usr/X11R6/include)but it does not contain Xlib.h
so Is there any suggestion cause up till now I cant use Xlib
could it be that you dont have the X development stuff installed? just a guess, or that file could just be located somewhere else.. as was asked eralier, what distro are you running? also did you try using locate or find?
Do you have Xlib.h anywhere on your system? You may need to put a copy in both paths that I mentioned.
there really is no need to copy that single file to an alternate location. if that file is missing then there is probably a whole list of headers that need to be installed with that file.. if that file is just in a different location that is expected, then you need to adjust accordingly in the build process.
imo, just randomly copying files around to fufill dependencies at that time will only cause more confusion down the road..
> what does it mean?
are you using fedora core, slackware, ubuntu, etc, etc, etc
> /usr/lib/perl5/vendor_perl/5.8.5/i586-linux-thread-multi/Tk/pTk/Xlib.h
that may work, but would not be adviseable to include from that location.
>how should I know it is installed or not?
well depending on the distro you are using, you may just have to throw the install discs back in an click an option to install x development headers and libs. this is one reason everyone has been asking about the distro..
You are using SuSE 9.2 as you originally posted and xhi and I both missed. I assume that you are using a GUI like KDE or GNOME and, therefore, have X Windows. Unless SuSE installs X Windows in some odd location, it is likely that you don't have the Xlib.h from X Windows.
As xhi mentioned, you'll need the development files (i.e., the headers) for X. They can probably be installed using the SuSE 9.2 package manager. Using the package manager *should* put the headers in either /usr/include/X11 or /usr/X11R6/include/X11.
Also, what package are you trying to build and is it available via the SuSE 9.2 package manager?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.