News:

Check out the latest MegaGlest news on our e-mail newsletter (subscribe), Twitter, Facebook and Google+.

Main Menu

[SOLVED] Glest 3.2.2 won't link

Started by scavenger, 29 July 2009, 14:18:13

scavenger

I downloaded the Glest 3.2.2 source today, tried to compile it and, well... failed. The compilation went okay, but when it was time to link the binary, LD complained about an undefined reference to 'XLoadQueryFont'.

I have all X libraries, dev packages and everything installed, and it seems the compiler can reach them, but the linker can't.

Does anyone of you know what going on here?

(yes, I am aware that there are precompiled binaries availible)

hailstone

Please post the exact error message.
Glest Advanced Engine - Admin/Programmer
https://sourceforge.net/projects/glestae/

scavenger

Here goes:


myusername@myhostname:~/Projects/svn/trunk/mk/linux$ jam
...found 499 target(s)...
...updating 1 target(s)...
LinkApplication glest
/usr/bin/ld: ./build/i686-pc-linux-gnu/optimize/shared_lib/sources/libglestlib.a(gl_wrap.o): in function Shared::Platform::createGlFontBitmaps(unsigned int&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int, int, int, Shared::Graphics::FontMetrics&):gl_wrap.cpp(.text+0x2e5): error: undefined reference to 'XLoadQueryFont'
collect2: ld returned 1 exit status

    g++ -o glest < lots of object file names here, snipped >  ./build/i686-pc-linux-gnu/optimize/shared_lib/sources/libglestlib.a   -L/usr/lib -lSDL -lGL  -lm -lGLU -lGL  -lm -lxerces-c -lpthread  -lvorbis -lm -lvorbisfile  -logg -lopenal -L/usr/lib -llua5.1

...failed LinkApplication glest ...
...failed updating 1 target(s)...

hailstone

XLoadQueryFont appears to be in GLX which I have in libgl1-mesa-dev.

You might need to tell the configure script which version if you have multiple versions.
Glest Advanced Engine - Admin/Programmer
https://sourceforge.net/projects/glestae/

scavenger

Sorry, it was my bad. I had the experimental 'Gold' (Ubuntu package binutils-gold) linker installed, which is a lot faster, but apparently incompatible with Glest. I removed it and it linked perfectly.

Again, I apologize if I wasted anyone's time. I won't let it happen again  :)