On Wednesday, 11 June 2014 at 17:11:51 UTC, Tim wrote:
On Wednesday, 11 June 2014 at 10:09:50 UTC, FreeSlave wrote:
I conclude that because I have similar errors when trying to
build 64-bit library on 32-bit system.
/usr/bin/ld:
/usr/lib/x86_64-linux-gnu/libphobos2.a(format_712_5b3.o):
relocation R_X86_64_32 against `.rodata' 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
But paths in your error log look like you're on x64, so it's
probably not the case.
Yes, I'm using a x64 system (CentOS 6.5), but I also use dmd64.
It seems that -defaultlib=libphobos2.so solved the problem. When
I use the following compile command:
dmd test.d -shared -defaultlib=libphobos2.so
I don't get any error. I hope the shared object works as expect...