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
On Wednesday, 4 July 2018 at 02:54:47 UTC, Joe wrote:
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.
If you import both
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:
On Wednesday, 4 July 2018 at 02:08:11 UTC, Joe wrote:
On Wednesday, 4 July 2018 at 01:58:15 UTC, Seb wrote:
So just add the declaration to your D file:
---
extern(C) void myCfunction(FILE* stream);
---
I do have a similar declaration in D. It appears the problem
is that the C program I'm
On Wednesday, 4 July 2018 at 01:58:15 UTC, Seb wrote:
So just add the declaration to your D file:
---
extern(C) void myCfunction(FILE* stream);
---
I do have a similar declaration in D. It appears the problem is
that the C program I'm trying to convert passes stdout as the
argument and the
On Wednesday, 4 July 2018 at 01:06:36 UTC, Joe wrote:
The subject basically says it all. The C function uses the
argument to call fprintf and also passes it to other functions
where it's used to call fileno, fprintf or putc.
Like you would with C's fprintf
The subject basically says it all. The C function uses the
argument to call fprintf and also passes it to other functions
where it's used to call fileno, fprintf or putc.