On 16-09-2012 19:39, deed wrote:
I get this error from a minimal windows example:import core.runtime; import std.c.windows.windows; import std.string; pragma(lib, "gdi32.lib"); extern (Windows) { int WinMain( ... ) { ... } HRESULT appMain( ... ) { ... WNDCLASS wc; ... wc.lpfnWndProc = &wndProc; ... } HRESULT wndProc( ... ) { ... } } Error: cannot implicitly convert expression (& wndProc) of type extern (Windows) int function(void* hwnd, uint message, uint wParam, int lParam) to extern (Windows) int function(void*, uint, uint, int) nothrow shell returned 1 What does the nothrow stems from? Is this something new?
nothrow is a function attribute meaning "this function does not throw exceptions". Just mark your wndProc function as nothrow and it should go away.
http://dlang.org/function.html#nothrow-functions -- Alex Rønne Petersen [email protected] http://lycus.org
