Find the answer to your Linux question:
Page 1 of 3 1 2 3 LastLast
Results 1 to 10 of 21
Hello all. First I'm must admit that I'm a complete beginner with Linux. I need to compile some short C program that uses Xlib.h and Xutil.h libraries. I can't locate ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Aug 2005
    Location
    Slovenia
    Posts
    18

    Can't find Xlib.h and Xutil.h files (solved)


    Hello all.

    First I'm must admit that I'm a complete beginner with Linux.

    I need to compile some short C program that uses Xlib.h and Xutil.h libraries. I can't locate them anywhere though. After an extensive search I've found out that those 2 are part of xorg-x11-devel package. So I found that package and tried installing it. But installation stopped right away saying that it's already installed. But I still can't find Xlib.h and Xutil.h anywhere.

    Any ideas what am I missing?

  2. #2
    Linux Newbie
    Join Date
    Jun 2005
    Location
    Dhaka, Bangladesh.
    Posts
    150
    What error you are getting at the time of compile.
    And which compiler you are using. I don't know, but i got there is some defirents between gcc and g++. I use g++ .
    S. M. Ibrahim
    Registered Linux User # 394440

    Pentium-IV 3.00 Ghz(Cache -2MB, 64 bit), 512 MB RAM , 128 MB agp, 160 GB Hdd (SATA)

  3. #3
    Just Joined!
    Join Date
    Aug 2005
    Location
    Slovenia
    Posts
    18
    I tried both gcc and g++ from Mandrake version 10.1.

    I get following error message:
    Code:
    X11/Xlib.h: No such file or directory. 
    X11/Xutil.h: No such file or directory.
    Code in my application is:
    Code:
    #include <X11/Xlib.h>
    #include <X11/Xutil.h>
    All I have to do is find those 2 files and change path in code. But can't find them anywhere and can't install package with them cause it says that it's alredy installed.

  4. #4
    Linux Guru fingal's Avatar
    Join Date
    Jul 2003
    Location
    Birmingham - UK
    Posts
    1,539
    I wonder how you are searching for those files? I would open a console, log in as root and try:

    find / -name Xlib.h -print

    That should do it because it'll search through your entire directory tree with no restrictions. If not, then something is a bit crazy. I've noticed that these header file error messages almost always mean that the programme you are trying to compile needs a development package.
    I am always doing that which I can not do, in order that I may learn how to do it. - Pablo Picasso

  5. #5
    Just Joined!
    Join Date
    Aug 2005
    Location
    Slovenia
    Posts
    18
    Quote Originally Posted by fingal
    I wonder how you are searching for those files? I would open a console, log in as root and try:

    find / -name Xlib.h -print

    That should do it because it'll search through your entire directory tree with no restrictions. If not, then something is a bit crazy.
    Tried that and it just lists a bunch of directories with with message 'Permission denied' for each.

    Quote Originally Posted by fingal
    I've noticed that these header file error messages almost always mean that the programme you are trying to compile needs a development package.
    Yep, those 2 files should be in xorg-x11-devel package. But when I try installing it I get the message that it's installed already.

  6. #6
    Linux Guru fingal's Avatar
    Join Date
    Jul 2003
    Location
    Birmingham - UK
    Posts
    1,539
    Quote Originally Posted by Lebowski
    Tried that and it just lists a bunch of directories with with message 'Permission denied' for each.
    That should never happen - not if you are root. If you can't search directories with root access, when can you?
    I am always doing that which I can not do, in order that I may learn how to do it. - Pablo Picasso

  7. #7
    Just Joined!
    Join Date
    Aug 2005
    Location
    Slovenia
    Posts
    18
    Quote Originally Posted by fingal
    Quote Originally Posted by Lebowski
    Tried that and it just lists a bunch of directories with with message 'Permission denied' for each.
    That should never happen - not if you are root. If you can't search directories with root access, when can you?
    My fault, sorry.
    Tried again as root and didn't get any message at all. So I guess files weren't found.

  8. #8
    Linux Guru fingal's Avatar
    Join Date
    Jul 2003
    Location
    Birmingham - UK
    Posts
    1,539
    Hi again. This seems to be quite a common problem. Look at this thread. Not sure about the solution though.
    I am always doing that which I can not do, in order that I may learn how to do it. - Pablo Picasso

  9. #9
    Just Joined!
    Join Date
    Aug 2005
    Location
    Slovenia
    Posts
    18
    Thanx for all the help so far. Still can't get it to work though

    Yep, I saw that thread. that's where I found info that those 2 files are in xorg-x11-devel package. But as I mentioned at start: I can't install that package cause it says that everything from it is already installed.

  10. #10
    Just Joined!
    Join Date
    Aug 2005
    Location
    Slovenia
    Posts
    18
    I found another package that (hopefully) has those 2 libraries needed.
    But I can't install it. This is the error message I get:
    Code:
    Some package requested cannot be installed&#58;
    libqt3-devel-3.3.4-5mdk.i586 &#40;due to unsatisfied devel&#40;libXrender&#41;&#41;
    do you agree ?
    Can anyone please explain what is wrong?

Page 1 of 3 1 2 3 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •