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

2018-08-15 Thread Mike Franklin via Digitalmars-d
On Wednesday, 15 August 2018 at 06:21:39 UTC, Rel wrote: There are other ways to do minimalist programming in D without -betterC. See https://dlang.org/changelog/2.079.0.html#minimal_runtime Well, what would be the difference between betterC and writing my own minimal runtime? It depend on

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

2018-08-15 Thread Kagamin via Digitalmars-d
On Tuesday, 14 August 2018 at 13:34:51 UTC, rikki cattermole wrote: On 15/08/2018 1:11 AM, 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? Sure, but you can't let dmd link and it'll be a right pain (at

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

2018-08-14 Thread Allen Garvey via Digitalmars-d
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? If you use either the current beta or master branch of LDC I believe they have disabled the C runtime for WebA

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

2018-08-14 Thread Rel via Digitalmars-d
There are other ways to do minimalist programming in D without -betterC. See https://dlang.org/changelog/2.079.0.html#minimal_runtime Well, what would be the difference between betterC and writing my own minimal runtime? For the time being doing betterC looks preferable, so I don't need to re

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

2018-08-14 Thread Rel via Digitalmars-d
printf() and exit() are part of the CRT. Well, yes, but there is implementation for them in msvcrt.dll, which is installed on all Windows platforms. So I can link to it and use it for free, without adding the whole CRT to my executable. Otherwise I could use MessageBox and ExitProcess for te

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

2018-08-14 Thread Walter Bright via Digitalmars-d
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.

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

2018-08-14 Thread Mike Franklin via Digitalmars-d
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? -betterC currently expects the C standard library, and consequently the C runtime. Under the hood DMD calls `

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

2018-08-14 Thread Seb via Digitalmars-d
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? Have a look at example 3 of the 2.079 changelog: https://dlang.org/changelog/2.079.0.html#minimal_runtime

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

2018-08-14 Thread Rel via Digitalmars-d
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.

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

2018-08-14 Thread rikki cattermole via Digitalmars-d
On 15/08/2018 1:11 AM, 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? Sure, but you can't let dmd link and it'll be a right pain (at least on Windows) to not have a libc to deal with the entry point for

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

2018-08-14 Thread Rel via Digitalmars-d
Can I or is it even possible to remove the CRT (C's runtime library) completely from my executables compiled with betterC flag?