You are not logged in.

#1 2008-02-07 03:04:54

cuevaquebrada
Member
Registered: 2008-02-07
Posts: 5

Where is X11/Xlib.h ??

I am trying to compile software that requires events in the X11 libraries such as 'XSendEvent,' 'XFlush,' 'XSelectInput,' etc. I have installed, via pacman, virtually every libx* package, but still not luck. My /usr/lib/X11/ directory doesn't contain any .h or .c files. Where can I find the package that contains Xlib.h?


Ἐρατοσθένης

Offline

#2 2008-02-07 03:09:12

skottish
Forum Fellow
From: Here
Registered: 2006-06-16
Posts: 7,942

Re: Where is X11/Xlib.h ??

Xlib.h is in /usr/include/X11 and is owned by libx11.

I found Xlib.h by simply running this in the /usr directory:

 find . | grep Xlib.h

To find out what package it was from:

 [skottish@iasE ~]$ pacman -Qo /usr/include/X11/Xlib.h
/usr/include/X11/Xlib.h is owned by libx11 1.1.3-6

Welcome to the forums.

Last edited by skottish (2008-02-07 03:11:44)

Offline

#3 2008-02-07 04:15:37

cuevaquebrada
Member
Registered: 2008-02-07
Posts: 5

Re: Where is X11/Xlib.h ??

thanks. I believe something is wrong with the makefile, and I forgot to check the include directories :-)


Ἐρατοσθένης

Offline

#4 2008-02-07 08:17:48

_adam_
Member
From: Dora, Alabama
Registered: 2006-05-18
Posts: 94

Re: Where is X11/Xlib.h ??

you may need to put something like:

--x-includes=/usr/include/X11

in the ./configure line.

Last edited by _adam_ (2008-02-07 08:18:19)

Offline

#5 2008-02-07 17:22:34

cuevaquebrada
Member
Registered: 2008-02-07
Posts: 5

Re: Where is X11/Xlib.h ??

yeah, I have tried that and make is still giving me

undefined reference to `XSendEvent'
undefined reference to `XFlush'
...
...

I looked through the code and it seems to be alright. It includes the necessary files and such correctly. ./configure assures me

checking for X... libraries , headers /usr/include/X11

I don't know what is wrong. However, I think I have found some other software that does the same thing for what I need, so I might just go with that.

Thanks for your help.


Ἐρατοσθένης

Offline

#6 2008-02-08 21:54:59

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

Re: Where is X11/Xlib.h ??

This is some text I stole from the freenode ##c++ bot way back in the day, and I keep it around because it's important:

undefined reference is a linker error. It's not a compile error.
Adding #includes doesn't help. Check that you have really defined the
thing in the error message, or if you forgot to link the file, or if you
forgot to link to a library

Offline

#7 2008-02-08 22:33:55

cuevaquebrada
Member
Registered: 2008-02-07
Posts: 5

Re: Where is X11/Xlib.h ??

Thank you for that. It's good to know. If it's a linker problem, must be a problem with the make file. I haven't looked too much into it.

I found another piece of software that will do what I need, so this problem has not been solved, and it won't be solved by me just yet. Sorry for those who are looking for an answer. I will post any progress when I come back to this issue.


Ἐρατοσθένης

Offline

#8 2008-02-08 23:35:34

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

Re: Where is X11/Xlib.h ??

Well, it'd be worth knowing what you were trying to build. What the above quoted text means, in practical terms, is that the -L and -l options to gcc were incorrect. While this may be due to an improper Makefile, you can usually fix this without fudging the Makefile (using configure args, or LDFLAGS)

Offline

Board footer

Powered by FluxBB