Well, for me it works. I do use the error level in some scripts I've written, and it outputs 0 when linking. I'm not linking in the lib file, though.

Try it from the command line. I know you want it to work in the IDE, but the first step is to determine whose bug it is. From the command line, just execute the commands your IDE echos, and after each issue echo %errorlevel%. So:

dmd.exe  -g -debug    -IC:\dmd\src\phobos  -c hello.d -ofobj\debug\hello.obj
echo %errorlevel%
dmd.exe bin\debug\test2.exe  obj\debug\hello.obj   phobos.lib
echo %errorlevel%

If both times it returns 0, something funny is happening. Also, dmd.exe's return code is directly related to link.exe's return code.

You could try using the link.exe from 2.016, and see if that works. If it does, maybe there's a bug in link.exe.

If you can get a non-zero errorlevel, use dmd -v, it will output what it sends to link.exe... see if that command also gives the same errorlevel.


A. Jung wrote:
For confirmation: same input, but DMD 2.016:

"-------------- 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 Output size is 96.53 KB
Process terminated with status 0 (0 minutes, 0 seconds)
0 errors, 0 warnings"

Reply via email to