Remove CRT (C's runtime) from betterC binaries?

Walter Bright newshound2 at digitalmars.com
Wed Aug 15 00:53:17 UTC 2018


On 8/14/2018 6:37 AM, Rel wrote:
> On Tuesday, 14 August 2018 at 13:11:57 UTC, Rel wrote:
>> Can I or is it even possible to remove the CRT (C's runtime library) 
>> completely from my executables compiled with betterC flag?
> 
> Okey, it seems I figure out how to do it with MinGW linker:
> 
>      import core.stdc.stdlib;
>      import core.stdc.stdio;
> 
>      extern (C) void start() {
>          printf("Hello World!");
>          exit(0);
>      }

printf() and exit() are part of the CRT.


More information about the Digitalmars-d mailing list