using scons on 64-bit platform, with gdc
eles
eles at eles.com
Wed Sep 18 00:09:26 PDT 2013
Hi,
Not sure it is a bug or a misuse of scons, but on Saucy 64, with
scons --version
script: v2.3.0, 2013/03/03 09:48:35, by garyo on reepicheep
engine: v2.3.0, 2013/03/03 09:48:35, by garyo on reepicheep
and a simple SConstruct like:
import os
env = Environment(ENV = os.environ)
env.Program(target='test01', source=Split('test01.d'));
it tries to execute:
scons: Reading SConscript files ...
scons: done reading SConscript files.
scons: Building targets ...
gcc -o test01 -m32 test01.o -L/usr/lib -lphobos2 -lpthread -lm
/usr/bin/ld: cannot find -lphobos2
collect2: error: ld returned 1 exit status
scons: *** [test01] Error 1
scons: building terminated because of errors.
which is expected to fail since:
1) the architecture (and the libraries) are m64, not m32 (why
does scons believe that?)
2) the gdc's phobos libraries is called libgphobos2, not
libphobos2
Manually correcting and executing the offending line:
gcc -o test01 -m64 test01.o -L/usr/lib -lgphobos2 -lpthread -lm
works as expected.
More information about the Digitalmars-d-learn
mailing list