Issues

Issue #97 open

Problem linking tutorials with X11 (undefined reference to symbol 'XSendEvent')

Anonymous created an issue

I'm using Slackware Linux and GNU make. When attempting to link a tutorial I get this:

==== Building Tut 08 Gimbal Lock (debug) ====
GimbalLock.cpp
Linking Tut 08 Gimbal Lock
/usr/lib64/gcc/x86_64-slackware-linux/4.7.1/../../../../x86_64-slackware-linux/bin/ld: ../glsdk/freeglut/lib/libfreeglutD.a(freeglut_window.o): undefined reference to symbol 'XSendEvent'
/usr/lib64/gcc/x86_64-slackware-linux/4.7.1/../../../../x86_64-slackware-linux/bin/ld: note: 'XSendEvent' is defined in DSO /usr/lib64/libX11.so.6 so try adding it to the linker command line
/usr/lib64/libX11.so.6: could not read symbols: Invalid operation
collect2: error: ld returned 1 exit status
make[1]: *** [Tut 08 Gimbal LockD] Error 1
make: *** [Tut 08 Gimbal Lock] Error 2

I need to add the flag -lX11 in order to link properly. Adding "X11" to framework.lua should do the trick:

        configuration "linux"
            links {"GL", "GLU", "X11"}

Building a glsdk example, like simple_glut, also has this problem.

Comments (3)

  1. Log in to comment