A. Jung wrote:
After further research, I'm still convinced that this is a bug in DMD.
In your example above, you used "link.exe" to link the obj files into the final exe.
Codeblocks, however, uses "dmd.exe" to link the obj files.
This is valid and the preferred way according to the DMD docs: "Linking is done
directly by the dmd compiler after a successful compile. To prevent dmd from running the
linker, use the -c switch.".
Codeblocks generates the following expanded console output, which looks
reasonable to me:
"-------------- Build: debug in test2 ---------------
dmd.exe -g -debug -IC:\dmd\src\phobos -c hello.d -ofobj\debug\hello.obj
dmd.exe bin\debug\test2.exe obj\debug\hello.obj phobos.lib
Shouldn't that be "dmd.exe -ofbin\debug\test2.exe ..."?