Can libgphobos be built as a shared object?

Sean Kelly sean at f4.ca
Thu Feb 22 16:28:03 PST 2007


Matt Brandt wrote:
> Statically linking in libgphobos.a makes every executable at least 600K. For an embedded system with limited storage this can be a problem. Is there a way to set it up to be used as a .so instead?

I believe you'll have to exclude phobos/internal/cmain.d from the 
library and call the setup routines in phobos/internal/dgccmain2.d 
manually.  I've never tried it, but that should work in theory.


Sean


More information about the D.gnu mailing list