Postby Craige Hales » Thu Aug 25, 2022 1:12 pm
(Been a while since I've thought about this, and I suspect I am misunderstanding, but...)
It sounds like you've called C++ code which expects a C++ stream parameter, from C code using a FILE* argument. You can't make that work by casting a FILE* to a C++ stream; you'll need to write a bit of .cpp file to interface functions between your C code and the CPP code.
There might be a better way to use the library; it might have other API functions that will open the stream and return an opaque stream handle. Opaque means you can't see what the handle really holds because it belongs to the library, not to you.
Craige