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 2 of 2

Thread: Linking error: undefined reference to glXSwapIntervalEXT

  1. #1
    Junior Member Regular Contributor
    Join Date
    Mar 2009
    Location
    California
    Posts
    192

    Linking error: undefined reference to glXSwapIntervalEXT

    I am trying to call glXSwapIntervalEXT in my Linux application.

    I declared GLX_GLXEXT_PROTOTYPES in the user definitions, and the header file is found. However, my program cannot link due to an undefined reference to this function.

    I am trying this text in the compiler options in Code::Bliocks:
    -lGLEW -lglut -lGL -lGLU -lXext

    I also tried adding "/usr/lib/x86_64-linux-gnu/libGLEW.so.1.6" in the linker settings, but to no avail.

    Any idea what I need to add to make this build?
    Last edited by JoshKlint; 11-22-2013 at 05:19 PM.

  2. #2
    Senior Member OpenGL Guru Dark Photon's Avatar
    Join Date
    Oct 2004
    Location
    Druidia
    Posts
    3,224
    This should be defined by your libGL library, not GLEW.

    Try:

    Code :
    > nm -Do /usr/lib64/libGL.so | grep glXSwapIntervalEXT
    /usr/lib64/libGL.so:000000000007d3c0 T glXSwapIntervalEXT
     
    > nm -Do /usr/lib/libGL.so | grep glXSwapIntervalEXT
    /usr/lib/libGL.so:00062100 T glXSwapIntervalEXT
     
    > glxinfo | grep OpenGL
    OpenGL vendor string: NVIDIA Corporation
    OpenGL renderer string: GeForce GTX 560 Ti/PCIe/SSE2
    OpenGL version string: 4.4.0 NVIDIA 325.05.14
    OpenGL shading language version string: 4.40 NVIDIA via Cg compiler
    OpenGL extensions:

    Are you compiling 32-bit or 64-bit? Check the appropriate library in that case.

    /usr/lib/x86_64-linux-gnu/libGLEW.so.1.6
    That's a really odd path. Why are your GLEW libs stuffed in that dir?

Posting Permissions

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