On Thursday, 27 September 2012 at 19:57:13 UTC, Andrei Alexandrescu wrote:
So I think in order to enable "true" dynamic loading, I'll need to generate PIC for druntime and phobos, and then link liblib.so like this:

dmd -fPIC -c lib.d
gcc -shared lib.o -o liblib.so -L/path/to/phobos -lphobos2

Is that correct?

Yes, that is correct.

The other thing missing is a phobos2.so for dynamic runtime linking.

-rt

Reply via email to