Completely Remove C Runtime with DMD for win32

Walter Bright newshound2 at digitalmars.com
Sun Jul 15 21:24:21 UTC 2018


On 7/15/2018 1:29 PM, tcb wrote:
> I've been trying to compile a trivial program (extern C int main() {return 0;}) 
> without linking parts of the C runtime with no success.

Declaring a C function called "main" causes the C runtime library to be pulled 
in. After all, main() is not the program entry point, as main() requires a 
number of things to be set up first (such as argc and argv).

Call the function something else, and compile with -betterC.


More information about the Digitalmars-d mailing list