Author Topic: [SOLVED] Glest 3.2.2 won't link  (Read 2274 times)

scavenger

  • Guest
[SOLVED] Glest 3.2.2 won't link
« on: 29 July 2009, 14:18:13 »
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)
« Last Edit: 1 August 2009, 11:49:18 by scavenger »

hailstone

  • GAE Team
  • Battle Machine
  • ********
  • Posts: 1,568
    • View Profile
Re: Glest 3.2.2 won't link
« Reply #1 on: 30 July 2009, 00:41:00 »
Please post the exact error message.
Glest Advanced Engine - Admin/Programmer
https://sourceforge.net/projects/glestae/

scavenger

  • Guest
Re: Glest 3.2.2 won't link
« Reply #2 on: 30 July 2009, 14:37:32 »
Here goes:

Code: [Select]
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

  • GAE Team
  • Battle Machine
  • ********
  • Posts: 1,568
    • View Profile
Re: Glest 3.2.2 won't link
« Reply #3 on: 31 July 2009, 03:08:19 »
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

  • Guest
Re: Glest 3.2.2 won't link
« Reply #4 on: 1 August 2009, 11:48:58 »
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  :)