How to stop DMD from linking against phobos

mta`chrono chrono at mta-international.net
Fri Dec 9 01:17:00 PST 2011


>> Is there a way to stop dmd from linking against phobos?
>> (Most preferred would be some command line parameters to dmd)
> 
> We should fix defaultlib and debuglib to accept empty values.
> Can you make a bug report for it.

# dmd code.d -v -defaultlib=""

gcc code.o -o code -m64 -Xlinker -L/usr/lib32 -Xlinker -L/usr/lib64
-Xlinker --export-dynamic -lrt -l -lpthread -lm -lrt

This line works for me. I can't tell you why dmd invokes gcc instead of
ld. But you could also use -c switch and call the linker manually.


More information about the Digitalmars-d mailing list