On Wednesday, 4 July 2018 at 02:54:47 UTC, Joe wrote:
On Wednesday, 4 July 2018 at 02:16:00 UTC, Seb wrote:
Hmm, calling e.g. fprintf with stdout should just work:
---
void main()
{
import core.stdc.stdio;
fprintf(stdout, "Hello %s", "world".ptr);
}
---
Could you maybe provide your whole code?
This short test program shows the error:
---
import std.stdio;
void main()
{
extern (C) void list(FILE *fd);
list(stdout);
}
---
Now I fixed this by changing the import to core.stdc.stdio. I
guess the problem is if you import std.stdio (which brings in
the other one), there are two slightly incompatible stdout's
and the D takes precedence.
`stdout.getFP` (stdout is of the D std.stdio.File struct type and
with getFP you get the underlying FILE*)