Can someone help me with this: I have a library which I try to import from D //funcs.lib //windows includes... HWND hwnd; int setHWND(HWND extHwnd){ hwnd = extHwnd; return 0; }
//main.d pragma(lib, "gdi32.lib"); import core.runtime; import core.sys.windows.windows; extern (C++) { int setHWND(HWND hwnd); } int main(int argc, char **argv) { //windows initializers setHWND(hwnd); return 0; } but when I try to import that function this comes: Error 42: Symbol Undefined ?setHWND@@YAHPAX@Z (int cdecl setHWND(void *)) --- errorlevel 1 it seems like I cannot use HWND directly.