On Sunday, 29 April 2018 at 15:40:20 UTC, Jacob Carlborg wrote:
On 2018-04-29 16:42, dd886k wrote:
[...]
Looks like "putchar" is inlined [1]. That means the "putchar"
you're referencing is not the one in the C standard library but
it's implemented in druntime. That means you need to link with
druntime/phobos, it's not enough to link with the C standard
library.
I don't know why it was done this way. Perhaps it's just a
macro on some platforms.
[1]
https://github.com/dlang/druntime/blob/master/src/core/stdc/stdio.d#L1289
Yes, putchar is often implemented as a the macro
#define putchar(x) putc(x, stdout)