Link error with premake gmake

Issue #73 new
ekari
created an issue

Using 64-bit Arch Linux, the following happened in Tut 01, Tut 02, and Tut 03:
{{{
premake gmake
make
(compiling...)
Linking Tut 01 Main
/usr/bin/ld: ../glsdk/freeglut/lib/libfreeglutD.a(freeglut_main.o): undefined reference to symbol 'XPending'
/usr/bin/ld: note: 'XPending' is defined in DSO /usr/lib/libX11.so.6 so try adding it to the linker command line
/usr/lib/libX11.so.6: could not read symbols: Invalid operation
collect2: ld returned 1 exit status
make[1]: [Tut 01 MainD] Error 1
make:
[Tut 01 Main] Error 2
}}}
Then with the premake generated "Tut 01 Main.make", I changed:
{{{
LIBS += -lframeworkD -lglloadD -lglimgD -lglutilD -lglmeshD -lfreeglutD -lGL -lGLU
}}}
to
{{{
LIBS += -lX11 -lframeworkD -lglloadD -lglimgD -lglutilD -lglmeshD -lfreeglutD -lGL -lGLU
}}}
and after that everything ran as expected.

Comments (3)

  1. Igor Babuschkin

    In case anyone else wants to compile all tutorials on Linux:

    Changing

    	    configuration "linux"
    	        links {"GL", "GLU"}
    

    to

    	    configuration "linux"
    	        links {"GL", "GLU", "X11"}
    

    in framework/framework.lua fixed this for me globally.

    (I don't know if this is the proper solution, though)

  2. Log in to comment