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: Error compiling Tutorials for "Learning Modern 3D Graphics Programming" - McKeesson

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

    Error compiling Tutorials for "Learning Modern 3D Graphics Programming" - McKeesson

    Heya,

    I found several threads on these forums where people had a problem compiling the tutorials to the book "Learning Modern 3D Graphics Programming" by Jason McKesson. They have all gotten helpful answers so I just registered and will try the same ... . Thanks in advance!

    So this is what happens: I unzip all the files, build the SDK with premake4 and make, then generate the giant makefile in the rootdirectory with premake4 and run make. This is what I get:

    Linking framework
    ==== Building Tut 14 Basic Texture (debug) ====
    Creating obj/Debug/Tut 14 Basic Texture
    Basic Texture.cpp
    Linking Tut 14 Basic Texture
    /usr/bin/ld: ../glsdk/freeglut/lib/libfreeglutD.a(freeglut_state.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
    make[1]: *** [Tut 14 Basic TextureD] Error 1
    make: *** [Tut 14 Basic Texture] Error 2
    (same for a release build)

    Am I doing anything wrong? Am on a Ubuntu 13.04 running on a modern Laptop.

  2. #2
    Newbie Newbie
    Join Date
    Oct 2013
    Posts
    2
    So I was able to solve the problem and the ones that popped up afterwards by:

    1.) Adding X11 to framework.lua:

    configuration "linux"
    links {"GL", "GLU", "X11"}
    followed by running premake4 and make again, and

    2.) adding

    typedef std:air<float, float> MaxIntensityData;
    typedef std::vector<MaxIntensityData> MaxIntensityVector;
    typedef std:air<glm::vec4, float> LightVectorData;
    typedef std::vector<LightVectorData> LightVector;

    float distance(const glm::vec3 &lhs, const glm::vec3 &rhs);
    glm::vec4 GetValue(const LightVectorData &data);
    float GetTime(const LightVectorData &data);
    float GetValue(const MaxIntensityData &data);
    float GetTime(const MaxIntensityData &data);
    to both Lights.h in tutorial 12 and LightEnv.h in tutorial 16.

Posting Permissions

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