How to call a C function from D that takes a FILE * as an argument?
Joe
jma at freedomcircle.com
Wed Jul 4 02:08:11 UTC 2018
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 D compiler complains somewhat like the following:
Error: function foo.main.myCfunction (shared(_IO_FILE)* stream)
is not callable using argument types (File)
So I guess the question is what to pass instead of stdout.
More information about the Digitalmars-d-learn
mailing list