Not a big issue, but compiling and linking this file:
module win;
import core.sys.windows.windows;
void main()
{
MessageBoxA(null, "hi", "there", MB_OK);
}
with
> dmd -m32 win.d
used to work, but after the change to COFF by default, it produces
win.obj : error LNK2019: unresolved external symbol _MessageBoxA@16 referenced in function __Dmain
win.exe : fatal error LNK1120: 1 unresolved externals
This is caused by not specifiying the library user32.lib on the command line. In contrast, invoking optlink automatically adds it (and kernel32.lib).
Maybe the same should be done for COFF to avoid breaking existing build scripts.
Comment #1 by robert.schadek — 2024-12-13T19:21:06Z