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);
    }

    // dmd -c -m32mscoff -betterC -of=test32.obj test.d
    // dmd -c -m64 -betterC -of=test64.obj test.d
    // gcc -o test32.exe -m32 -nostdlib -s test32.obj -lmsvcrt
    // gcc -o test64.exe -m64 -nostdlib -s test64.obj -lmsvcrt

Reply via email to