You are not logged in.
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
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
thanks. I believe something is wrong with the makefile, and I forgot to check the include directories :-)
Ἐρατοσθένης
Offline
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
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
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
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
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