Pyd thread
Ellery Newcomer
ellery-newcomer at utulsa.edu
Wed Nov 14 18:51:07 PST 2012
Just tried building a shared library on linux with dmd (and calling it
from C).
It works! Holy crap, it even runs my static constructors and unittests!
I only had to screw with the linking process a little bit!
It doesn't work for x64, though. Gives me
/usr/bin/ld: /usr/lib64/dmd/libphobos2.a(object__c_58c.o): relocation
R_X86_64_32 against `_D10TypeInfo_m6__initZ' can not be used when making
a shared object; recompile with -fPIC
/usr/lib64/dmd/libphobos2.a: could not read symbols: Bad value
collect2: ld returned 1 exit status
--- errorlevel 1
Though why it doesn't do this for x32 is beyond me. Those object files
don't appear to be -fPIC either.
More information about the Digitalmars-d
mailing list