Report a bug
If you spot a problem with this page, click here to create a Bugzilla issue.
Improve this page
Quickly fork, edit online, and submit a pull request for this page. Requires a signed-in GitHub account. This works well for small changes. If you'd like to make larger changes you may want to consider using a local clone.


Entry point for DMD console version.
This modules defines the entry point (main) for DMD, as well as related utilities needed for arguments parsing, path manipulation, etc... This file is not shared with other compilers which use the DMD front-end.

Source main.d

int main(int argc, char** argv);
DMD's entry point, C main.
Without -lowmem, we need to switch to the bump-pointer allocation scheme right from the start, before any module ctors are run, so we need this hook before druntime is initialized and _Dmain is called.
Return code of the application
int _Dmain(char[][]);
Manual D main (for druntime initialization), which forwards to tryMain.
Return code of the application