Glad and WGL

Dav1d via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Wed Jan 13 10:35:26 PST 2016


On Wednesday, 13 January 2016 at 18:34:14 UTC, Josh Phillips 
wrote:
> So I started using Glad but I can't get WGL to work with it, 
> though I think this is more of a Win32 issue than WGL.
>
> wndclass.lpfnWndProc   = &WndProc;
>
> Gives me an error no matter what:
> Error: cannot implicitly convert expression (& WndProc) of type 
> int function(void* hWnd, uint message, uint wParam, int lParam) 
> to extern (Windows) int function(void*, uint, uint, int) nothrow
>
> I think the error has to do with the nothrow but I tried making 
> the function empty
>
> extern(Windows)
> LRESULT WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM 
> lParam)
> {
>    return 0;
> }
>
> And still got the same exact error. Any ideas/help?

Your function isnt marked nothrow.


More information about the Digitalmars-d-learn mailing list