1

I followed the steps on this page but when I run make it gives me this error:

/usr/bin/ld: keycode.o: undefined reference to symbol 'XKeycodeToKeysym'
/usr/bin/ld: note: 'XKeycodeToKeysym' is defined in DSO /usr/lib/i386-linux-gnu/libX11.so.6 so try adding it to the linker command line
/usr/lib/i386-linux-gnu/libX11.so.6: could not read symbols: Invalid operation collect2: error: ld returned 1 exit status

`

  • Have you got all the build dependencies installed, e.g `libx11-dev`, etc. –  Apr 13 '13 at 21:21
  • I've just compiled successfully on Xubuntu 12.04; my instructions seem to be fine. Check again whether you have all the build dependencies installed. –  Apr 13 '13 at 21:28
  • yup, I've got them all. I tried again, and it said the same thing, I also noticed that it was saying this, too: `error.h:8:13: warning: 'void error(QString, QString)’ defined but not used [-Wunused-function]` – TheBlackUnicorn Apr 13 '13 at 21:42

2 Answers2

4

This is an Ubuntu thing, works fine without it in Debian Stable. So might effect Mint too.

Add -lX11 in the Makefile to the LIBS line under the LFLAGS line so it should look like this when your done.

For 64bit:

LIBS = $(SUBLIBS) -L/usr/lib/x86_64-linux-gnu -lXtst -lQtGui -lQtCore -lpthread -lX11

For 32bit:

LIBS = $(SUBLIBS) -L/usr/lib/i386-linux-gnu -lXtst -lQtGui -lQtCore -lpthread -lX11

They changed the way they compiled to be more exact and broke code from what I get. This worked fine with the exact error on 64bit Ubuntu thanks to someone on the web I found. Every time you run the ./config or ./configure it will remake the Makefile and you have to edit it again.

The Keyboard is dead, Long live the Keyboard. :P

user159401
  • 41
  • 4
  • Note: if you are following the [Arc Synthesis OpenGL tutorial](http://www.arcsynthesis.org/gltut/), you might get the error described in the original question on Ubuntu. To fix it, just open the target makefile (such as `Tut 01 Main.make`), go down to the `LIBS` section under `debug` and `release`, and add `-lX11`. That should fix it. – fouric Nov 27 '13 at 18:07
0

This looks more like a problem with your X11 library.

Just reinstall X11 library

sudo apt-get autoremove libx11-6

and then

sudo apt-get install libx11-6

thefourtheye
  • 4,894
  • 2
  • 24
  • 32