[Gtkradiant] Compile errors on Ubuntu 11.10

Ben Noordhuis info at bnoordhuis.nl
Thu Jan 5 13:47:13 EST 2012

On Thu, Jan 5, 2012 at 19:39, Nerius Landys <nlandys at gmail.com> wrote:
> A problem was reported by a guy named "neil".  I confirmed his problem
> by trying out compiling GtkRadiant on Ubuntu Desktop 11.10 i386 (32
> bit).
> The problem is "undefined reference errors".  I don't have an exact
> output for the problem at the moment, but I could possibly reproduce
> the problem tonight and attach the output.
> neil fixed the problem himself.  He says, he edited
> SConscript.radiant, SConscript.module, and SConscript.q3map2, where he
> replaced:
>  env = Environment()
> with:
>  LINKFLAGS='-Wl,--no-as-needed'
>  env = Environment(LINKFLAGS=LINKFLAGS)
> I'm not too good at SCons, and I'm not sure what these changes mean.
> TTimo says he may get around to looking into this problem and
> committing a change (since he's fairly familiar with SCons).
> Neil (who is bcc'ed), if you want to join the developer discussion
> info is here: http://icculus.org/mailman/listinfo/gtkradiant

Ubuntu 11.10 and newer link with --as-needed by default. In most cases
you solve it by putting libraries to link against after the object
files instead of before.

As an example, this:

  cc -ldl -lrt -o a.out main.c


  cc -o a.out main.c -ldl -lrt

More information about the Gtkradiant mailing list