Search code examples
dcommand-promptplatform-independent

Remove command-prompt in D?


I'm writing an SDL app in D (therefore I'd like to maintain a high amount of platform-independence), and I'm looking for a way to stop the command prompt opening up release builds. How does one do this?


Solution

  • Call DMD with the option -L-Subsystem:Windows.

    Just make sure that your main gets changed to WinMain, with the appropriate arguments.