On Friday, 28 February 2014 at 06:45:25 UTC, Tolga Cakiroglu wrote:

If I don't use GCC, and use a build code as below, following is the error of compiler:

dmd lib.d -shared -fPIC -debug -gc -g -w -wi
/usr/bin/ld: /usr/lib/x86_64-linux-gnu/libphobos2.a(lifetime_46f_7db.o): relocation R_X86_64_32 against `_D15TypeInfo_Shared7__ClassZ' can not be used when making a shared object; recompile with -fPIC /usr/lib/x86_64-linux-gnu/libphobos2.a: error adding symbols: Bad value
collect2: error: ld returned 1 exit status
--- errorlevel 1
make: *** [libnogcc] Error 1

http://dlang.org/dll-linux.html#dso7

dmd lib.d -shared -fPIC -debug -gc -g -w -wi -defaultlib=libphobos2.so

Reply via email to