Linking to MSVCRT
Lionello Lunesu
lionello at lunesu.remove.com
Wed Jan 24 10:55:39 PST 2007
"Robin Allen" <r.a3 at ntlworld.com> wrote in message
news:ep7tei$26c3$1 at digitaldaemon.com...
> The Windows C runtime (MSVCRT.DLL) defines some functions, namely
> _open_osfhandle and _fdopen, that I need to use in my D program.
>
> However, D doesn't seem to link to the necessary libs by default; the
> linker says:
>
> Symbol Undefined __open_osfhandle at 8
> Symbol Undefined __fdopen at 8
>
> Is there any way I can use these functions from D?
By the looks of it, those two seem to be simple wrappers for Win32's
CreateFile function. You could simply call CreateFile yourself. If you have
Visual Studio installed, you can peek at their source too, and just do
whatever those functions do in D.
L.
More information about the Digitalmars-d-learn
mailing list