So I added ``` "dflags": ["-L/SUBSYSTEM:WINDOWS", "-L/ENTRY:wWinMainCRTStartup"], ```to `dub.json`, implemented `wWinMain()` as described at [D for Win32](https://wiki.dlang.org/D_for_Win32) (I think this needs to be updated for Unicode version, it's no sense to use non-Unicode if you are not programming for Windows 98) and everything was fine until I removed old `main()` function when decided the new one is good enough. After that seems linker just decided to drop all default dependencies including D runtime itself and I got a lot of `unresolved external` errors. It took me some time to figure out what caused this. Is this linker behavior intentional? Now I have empty `main()` function to be able to build the app.
Windows: SUBSYSTEM:WINDOWS, wWinMainCRTStartup and linker behavior
Alexander via Digitalmars-d-learn Sat, 06 Jun 2026 16:11:34 -0700
- Windows: SUBSYST... Alexander via Digitalmars-d-learn
- Re: Windows... Richard (Rikki) Andrew Cattermole via Digitalmars-d-learn
- Re: Windows... Adam D. Ruppe via Digitalmars-d-learn
