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: Linker problems with code from "Learning Modern 3D Graphics Programming" tutorial

  1. #1
    Newbie Newbie
    Join Date
    Jul 2013
    Posts
    2

    Linker problems with code from "Learning Modern 3D Graphics Programming" tutorial

    When trying to compile the example code from the above tutorial on a Debian Sid box, I get the following linker error:
    Code :
    ==== Building framework (release) ====
    ==== Building Tut 01 Main (release) ====
    Creating obj/Release
    tut1.cpp
    Linking Tut 01 Main
    /usr/bin/ld: ../glsdk/freeglut/lib/libfreeglut.a(freeglut_window.o): undefined reference to symbol 'XGetWindowAttributes'
    /usr/lib/x86_64-linux-gnu/libX11.so.6: error adding symbols: DSO missing from command line
    collect2: error: ld returned 1 exit status
    In an attempt to correct the problem I added "-lX11" to "LIBS +=" in the make file. The code then links without error but I get the following run time error:
    Code :
    ~/Tutorial 0.3.8/Tut 01 Hello Triangle$ ./Tut\ 01\ Main
    Inconsistency detected by ld.so: dl-version.c: 224: _dl_check_map_versions: Assertion `needed != ((void *)0)' failed!

    Any advice on how to solve this?

    Thanks in advance.

  2. #2
    Senior Member OpenGL Guru Dark Photon's Avatar
    Join Date
    Oct 2004
    Location
    Druidia
    Posts
    3,193
    Quote Originally Posted by norm_in_tx View Post
    When trying to compile the example code from the above tutorial on a Debian Sid box, ...I get the following run time error:
    Code :
    ~/Tutorial 0.3.8/Tut 01 Hello Triangle$ ./Tut\ 01\ Main
    Inconsistency detected by ld.so: dl-version.c: 224: _dl_check_map_versions: Assertion `needed != ((void *)0)' failed!

    Any advice on how to solve this?
    A websearch suggests your Debian is probably hosed:

    * http://www.unrealadmin.org/forums/sh...ad.php?t=31057

  3. #3
    Member Regular Contributor
    Join Date
    Jun 2013
    Posts
    490
    Quote Originally Posted by norm_in_tx View Post
    Code :
    /usr/bin/ld: ../glsdk/freeglut/lib/libfreeglut.a(freeglut_window.o): undefined reference to symbol 'XGetWindowAttributes'
    There should be an official freeglut package for whichever version of Debian you're using. Install it, and modify the Makefiles to use that instead of the version in ../glsdk.

  4. #4
    Newbie Newbie
    Join Date
    Jul 2013
    Posts
    2
    Thanks for the replies!

    Dark Photon - I update this unstable install a couple of times per week so I don't know whether the problem is the due to a package in transition or my install being broken. I was able to compile the code successfully in Debian testing on another partition on the same machine.

    GClements - I have dabbled with OpenGL in Qt using QGLWidget so the freeglut packages are installed. The tutorial is based on the Unofficial OpenGl SDK so getting the code to compile with Debian's package will involve more than just modifying the Makefiles. Probably more effort than I want to put into it.

    Edit: As a noob the site wouldn't let me post a link to the Unofficial OpenGL SDK page.

  5. #5
    Junior Member Newbie
    Join Date
    Sep 2013
    Posts
    4
    I started a GLFW3 port of these tutorials, as I find FreeGLUT outdated and was unable to make it run on OS X.

    I'm working on the OS X part here: https://github.com/rsanchezsaez/gltut-glfw

    I'm only providing an Xcode project (works straight away on OS X), but the code should be pretty much cross-platform and a Makefile should not be difficult to write. If anybody wants to make sure it build on Linux and contribute build files I'll merge the changes.

    Cheers!

Posting Permissions

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