On Wednesday, 13 January 2016 at 18:37:09 UTC, Adam D. Ruppe wrote:
You just need to explicitly mark it nothrow in the signature. Add `nothrow` to the end of the param list:

extern(Windows)
LRESULT WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) nothrow

and then you'll be cool

Oh wow that's easy. They should really make that more clear in the dlang reference. They way it sounds there made me think that if a function doesn't throw any errors it automatically is 'nothrow'

@Dav1d do I need to implicitly link WGL to any dlls or anything? Now I'm getting linking errors

..\dlibgui\lib\dlibgui.lib(window)
 Error 42: Symbol Undefined _wglMakeCurrent@8
..\dlibgui\lib\dlibgui.lib(window)
 Error 42: Symbol Undefined _wglCreateContext@4
..\dlibgui\lib\dlibgui.lib(window)
 Error 42: Symbol Undefined _ChoosePixelFormat@8
..\dlibgui\lib\dlibgui.lib(window)
 Error 42: Symbol Undefined _SetPixelFormat@12
..\dlibgui\lib\dlibgui.lib(window)
 Error 42: Symbol Undefined _wglDeleteContext@4
--- errorlevel 5
dmd failed with exit code 5.

Reply via email to