Glad and WGL

Josh Phillips via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Wed Jan 13 11:05:30 PST 2016


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 at 8
..\dlibgui\lib\dlibgui.lib(window)
  Error 42: Symbol Undefined _wglCreateContext at 4
..\dlibgui\lib\dlibgui.lib(window)
  Error 42: Symbol Undefined _ChoosePixelFormat at 8
..\dlibgui\lib\dlibgui.lib(window)
  Error 42: Symbol Undefined _SetPixelFormat at 12
..\dlibgui\lib\dlibgui.lib(window)
  Error 42: Symbol Undefined _wglDeleteContext at 4
--- errorlevel 5
dmd failed with exit code 5.


More information about the Digitalmars-d-learn mailing list