Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 5 of 5

Thread: glfw linker error on ubuntu

  1. #1
    Junior Member Newbie
    Join Date
    Feb 2009
    Posts
    9

    glfw linker error on ubuntu

    Code :
    gcc asd.c  -L/usr/X11R6/lib -lglfw -lGL -lGLU -lX11 -lpthread -lXxf86vm -lm
    /usr/lib/gcc/i486-linux-gnu/4.3.2/../../../../lib/libglfw.a(x11_init.o): In function `_glfwPlatformInit':
    (.text+0xea): undefined reference to `XRRQueryExtension'
    /usr/lib/gcc/i486-linux-gnu/4.3.2/../../../../lib/libglfw.a(x11_window.o): In function `_glfwPlatformRefreshWindowParams':
    (.text+0x752): undefined reference to `XRRGetScreenInfo'
    /usr/lib/gcc/i486-linux-gnu/4.3.2/../../../../lib/libglfw.a(x11_window.o): In function `_glfwPlatformRefreshWindowParams':
    (.text+0x75c): undefined reference to `XRRConfigCurrentRate'
    /usr/lib/gcc/i486-linux-gnu/4.3.2/../../../../lib/libglfw.a(x11_window.o): In function `_glfwPlatformRefreshWindowParams':
    (.text+0x76a): undefined reference to `XRRFreeScreenConfigInfo'
    /usr/lib/gcc/i486-linux-gnu/4.3.2/../../../../lib/libglfw.a(x11_window.o): In function `_glfwPlatformCloseWindow':
    (.text+0xace): undefined reference to `XRRGetScreenInfo'
    /usr/lib/gcc/i486-linux-gnu/4.3.2/../../../../lib/libglfw.a(x11_window.o): In function `_glfwPlatformCloseWindow':
    (.text+0xaf1): undefined reference to `XRRSetScreenConfig'
    /usr/lib/gcc/i486-linux-gnu/4.3.2/../../../../lib/libglfw.a(x11_window.o): In function `_glfwPlatformCloseWindow':
    (.text+0xafa): undefined reference to `XRRFreeScreenConfigInfo'
    /usr/lib/gcc/i486-linux-gnu/4.3.2/../../../../lib/libglfw.a(x11_window.o): In function `_glfwPlatformPollEvents':
    (.text+0x10d5): undefined reference to `XRRUpdateConfiguration'
    /usr/lib/gcc/i486-linux-gnu/4.3.2/../../../../lib/libglfw.a(x11_window.o): In function `_glfwPlatformOpenWindow':
    (.text+0x1fb7): undefined reference to `XRRSelectInput'
    /usr/lib/gcc/i486-linux-gnu/4.3.2/../../../../lib/libglfw.a(x11_fullscreen.o): In function `_glfwPlatformGetVideoModes':
    (.text+0x195): undefined reference to `XRRGetScreenInfo'
    /usr/lib/gcc/i486-linux-gnu/4.3.2/../../../../lib/libglfw.a(x11_fullscreen.o): In function `_glfwPlatformGetVideoModes':
    (.text+0x1a6): undefined reference to `XRRConfigSizes'
    /usr/lib/gcc/i486-linux-gnu/4.3.2/../../../../lib/libglfw.a(x11_fullscreen.o): In function `_glfwPlatformGetVideoModes':
    (.text+0x1e6): undefined reference to `XRRFreeScreenConfigInfo'
    /usr/lib/gcc/i486-linux-gnu/4.3.2/../../../../lib/libglfw.a(x11_fullscreen.o): In function `_glfwSetVideoModeMODE':
    (.text+0x2e7): undefined reference to `XRRGetScreenInfo'
    /usr/lib/gcc/i486-linux-gnu/4.3.2/../../../../lib/libglfw.a(x11_fullscreen.o): In function `_glfwSetVideoModeMODE':
    (.text+0x302): undefined reference to `XRRConfigCurrentConfiguration'
    /usr/lib/gcc/i486-linux-gnu/4.3.2/../../../../lib/libglfw.a(x11_fullscreen.o): In function `_glfwSetVideoModeMODE':
    (.text+0x352): undefined reference to `XRRSetScreenConfigAndRate'
    /usr/lib/gcc/i486-linux-gnu/4.3.2/../../../../lib/libglfw.a(x11_fullscreen.o): In function `_glfwSetVideoModeMODE':
    (.text+0x36a): undefined reference to `XRRSetScreenConfig'
    /usr/lib/gcc/i486-linux-gnu/4.3.2/../../../../lib/libglfw.a(x11_fullscreen.o): In function `_glfwGetClosestVideoMode':
    (.text+0x3b9): undefined reference to `XRRGetScreenInfo'
    /usr/lib/gcc/i486-linux-gnu/4.3.2/../../../../lib/libglfw.a(x11_fullscreen.o): In function `_glfwGetClosestVideoMode':
    (.text+0x3ca): undefined reference to `XRRConfigSizes'
    /usr/lib/gcc/i486-linux-gnu/4.3.2/../../../../lib/libglfw.a(x11_fullscreen.o): In function `_glfwGetClosestVideoMode':
    (.text+0x445): undefined reference to `XRRConfigRates'
    /usr/lib/gcc/i486-linux-gnu/4.3.2/../../../../lib/libglfw.a(x11_fullscreen.o): In function `_glfwGetClosestVideoMode':
    (.text+0x496): undefined reference to `XRRFreeScreenConfigInfo'
    /usr/lib/gcc/i486-linux-gnu/4.3.2/../../../../lib/libglfw.a(x11_fullscreen.o): In function `_glfwSetVideoModeMODE':
    (.text+0x37c): undefined reference to `XRRFreeScreenConfigInfo'
    collect2: ld returned 1 exit status

    can someone help me please, i am trying to compile one of the examples in glfw site but gets these errors.

  2. #2
    Junior Member Regular Contributor
    Join Date
    Mar 2007
    Location
    Latvia
    Posts
    225

    Re: glfw linker error on ubuntu

    Add -lXrandr to linker options.

  3. #3
    Junior Member Newbie
    Join Date
    Feb 2009
    Posts
    9

    Re: glfw linker error on ubuntu

    Thanks! (It wasn't on the the list that glfw example)

  4. #4
    Junior Member Newbie
    Join Date
    May 2009
    Posts
    1

    Re: glfw linker error on ubuntu

    Quote Originally Posted by martinsm
    Add -lXrandr to linker options.
    I get "ld: cannot find -lXrandr" when i try that on CodeBlocks. Any hint on what other flags i an use or why it doesn't work?

  5. #5
    Super Moderator OpenGL Lord
    Join Date
    Dec 2003
    Location
    Grenoble - France
    Posts
    5,655

    Re: glfw linker error on ubuntu

    try to install it :

    sudo apt-get install libxrandr-dev

    but on my ubuntu 8.04 it is already there by default. What ubuntu version do you have ?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •