Linking with C on Windows

Mark Isaacson via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Thu Jun 5 17:31:25 PDT 2014


Still unresolved, but a thought:

I decided to take a step back and try to link with C on Linux
first. I found out that if I did the linking step with dmd things
worked, but not with gcc. The reason then became apparent: dmd
knows to pass druntime and phobos and all of that stuff to the
linker. Running on the assumption that this was also my problem 
on Windows, I ran dmd with -v (verbose) to try and get the linker 
line it uses for a simple program that just uses some Phobos 
functions, the line I get is: C:\D\dmd2\windows\bin\link.exe 
test,nul,,user32+kernel32/noi;
Which does not appear to be helpful and seems to indicate that 
Phobos does not need to be passed to the linker?


More information about the Digitalmars-d-learn mailing list