DUB / compiling same source and config to different windows subsystems in 32/64 bit

Mike Parker aldacron at gmail.com
Tue Mar 5 07:25:40 UTC 2019


On Tuesday, 5 March 2019 at 07:10:51 UTC, Robert M. Münch wrote:
t.
>
> My missing point was, that I didn't expect to work with two 
> different links. And I totally agree, DUB needs to mention 
> this. Make everyones live easy. I don't want to dig through 
> fragmented information, collect and sort all pieces etc. That's 
> just waste of time. If I use DUB, I want to see all things 
> around building D programs. That simple... Is there an
>
> I have never seen *-x86_mscoff mentioned anywhere...

Again, this has nothing to do with dub. It's the behavior of the 
linkers. When you use WinMain, the MS Linker will give you a 
windows subsystem by default. When you use main, it will give you 
a console subsystem.

DMD gained the -m32mscoff a good while ago in order to enable 
coff output and compatibility with the MS linker in 32-bit mode. 
Built-in dub support came much later with x86_mscoff. *That* 
needs to be documented in the dub docs, but the behavior of the 
various linkers out there is beyond the scope of dub's 
documentation. Instead, it belongs in the DMD windows 
documentation. It's currently missing:

https://dlang.org/dmd-windows.html#linking


More information about the Digitalmars-d-learn mailing list