Open AndrejMitrovic opened 2 years ago
Thanks for reporting, I'm on it. I've added the imports, but I'm not sure about the extra annotations.
__gshared:
and extern(C)
should be redundant, not sure what export
does, and the lack of @nogc
nothrow
should not be a problem when you use the prototype from apinative.d, but I'll have to look into it when I boot on Windows.
I think I might be mistaken about the linker issues. I thought linking failed, but it's just some strange warning:
LINK : warning LNK4217: symbol 'glfwGetWin32Window' defined in 'app.obj' is imported by 'app.obj' in function <long-mangled-name-here>
not sure what
export
does
I've run into this. export
specifies on Windows that this is part of the exported DLL data symbols. If you don't include export
, it won't link (for DLLs). this is not needed for functions for some reason. See e.g. I had to do this here: https://github.com/schveiguy/raylib-d/commit/6c58d346f18382cc22cf7cdd97d7965f0e2e5ba2
Hi!
I've tried using
apinative.d
as I need access to the native window handle. But I get import errors, and also linking errors.This patch seems to fix it:
Not sure it's the best way to do it. Let me know if you want me to PR it. Cheers~