How to stop DMD from linking against phobos

Martin Nowak dawg at dawgfoto.de
Mon Dec 12 03:01:41 PST 2011


On Fri, 09 Dec 2011 10:17:00 +0100, mta`chrono  
<chrono at mta-international.net> wrote:

>>> 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.

Because you need the C runtime startup objects.


More information about the Digitalmars-d mailing list