Version for windows/console compilation?
Adam D. Ruppe via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Thu Sep 10 11:10:41 PDT 2015
On Thursday, 10 September 2015 at 18:06:43 UTC, Prudence wrote:
> Is there a flag for knowing when a project is compiling for
> windows(Uses WinMain) vs a console(normal main)?
You'd have to choose the main yourself anyway, so document what
process you use for that for people to use.
BTW it is pretty rare that you should actually write a WinMain in
D. The right thing to do in most cases is to write a normal main
function. You can still get the windows gui subsystem with a
linker flag.
More information about the Digitalmars-d-learn
mailing list