🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

Help with glfw linker errors.

Started by
1 comment, last by asdfg__12 16 years, 4 months ago
Hello people, i am using linux mint (a distro derived from ubuntu) and i am having problems compiling a c++ program that uses glfw. The problem started after i installed the nvidia drivers for my 8800gt (the same program compiled fine before i installed th drivers). Now, when trying to compile i get the following output:

dtr@dtr-desktop:~/Desktop/OpenGL$ g++ -o app Main.cpp -lglfw -lGL
/usr/local/lib/libglfw.a(x11_init.o): In function `_glfwPlatformTerminate':
x11_init.c:(.text+0x39): undefined reference to `pthread_kill'
/usr/local/lib/libglfw.a(x11_init.o): In function `_glfwPlatformInit':
x11_init.c:(.text+0xea): undefined reference to `XRRQueryExtension'
/usr/local/lib/libglfw.a(x11_window.o): In function `_glfwPlatformRefreshWindowParams':
x11_window.c:(.text+0x803): undefined reference to `XRRGetScreenInfo'
x11_window.c:(.text+0x80d): undefined reference to `XRRConfigCurrentRate'
x11_window.c:(.text+0x81b): undefined reference to `XRRFreeScreenConfigInfo'
/usr/local/lib/libglfw.a(x11_window.o): In function `_glfwPlatformCloseWindow':
x11_window.c:(.text+0xb7a): undefined reference to `XRRGetScreenInfo'
x11_window.c:(.text+0xb9d): undefined reference to `XRRSetScreenConfig'
x11_window.c:(.text+0xba6): undefined reference to `XRRFreeScreenConfigInfo'
/usr/local/lib/libglfw.a(x11_window.o): In function `_glfwPlatformPollEvents':
x11_window.c:(.text+0x1160): undefined reference to `XRRUpdateConfiguration'
/usr/local/lib/libglfw.a(x11_window.o): In function `_glfwPlatformOpenWindow':
x11_window.c:(.text+0x201c): undefined reference to `XRRSelectInput'
/usr/local/lib/libglfw.a(x11_fullscreen.o): In function `_glfwPlatformGetVideoModes':
x11_fullscreen.c:(.text+0x1cf): undefined reference to `XRRGetScreenInfo'
x11_fullscreen.c:(.text+0x1e0): undefined reference to `XRRConfigSizes'
x11_fullscreen.c:(.text+0x21c): undefined reference to `XRRFreeScreenConfigInfo'
/usr/local/lib/libglfw.a(x11_fullscreen.o): In function `_glfwSetVideoModeMODE':
x11_fullscreen.c:(.text+0x33a): undefined reference to `XRRGetScreenInfo'
x11_fullscreen.c:(.text+0x355): undefined reference to `XRRConfigCurrentConfiguration'
x11_fullscreen.c:(.text+0x3a5): undefined reference to `XRRSetScreenConfigAndRate'
x11_fullscreen.c:(.text+0x3bd): undefined reference to `XRRSetScreenConfig'
/usr/local/lib/libglfw.a(x11_fullscreen.o): In function `_glfwGetClosestVideoMode':
x11_fullscreen.c:(.text+0x40b): undefined reference to `XRRGetScreenInfo'
x11_fullscreen.c:(.text+0x419): undefined reference to `XRRConfigSizes'
x11_fullscreen.c:(.text+0x4a1): undefined reference to `XRRConfigRates'
x11_fullscreen.c:(.text+0x4ee): undefined reference to `XRRFreeScreenConfigInfo'
x11_fullscreen.c:(.text+0x524): undefined reference to `XRRFreeScreenConfigInfo'
/usr/local/lib/libglfw.a(x11_fullscreen.o): In function `_glfwSetVideoModeMODE':
x11_fullscreen.c:(.text+0x3cf): undefined reference to `XRRFreeScreenConfigInfo'
collect2: ld returned 1 exit status

Any ideas what could have caused this?
Advertisement
libxrandr-dev and libpthread-dev are missing.

(you have might have to link them, too)
Thanks :)

This topic is closed to new replies.

Advertisement