Error: expected initializer before "BOOL CALLBACK _export Function" in Bloodshed Dev-C++ 5.11

475 views Asked by At

I tried to compile in Bloodshed Dev-C++ 5.11 following code:

BOOL CALLBACK _export DialogStartProc(HWND hWnd,UINT Message,WPARAM wParam,LPARAM lParam);
BOOL CALLBACK _export DialogRegProc(HWND hDg1, UINT msg, WPARAM wParam, LPARAM lParam);

and got error:

... [Error] expected initializer before 'DialogStartProc'
... [Error] expected initializer before 'DialogRegProc'
... C:\Program Files\Dev-Cpp\MinGW64\x86_64-w64-mingw32\include\windows.h   In file included from C:/Program Files/Dev-Cpp/MinGW64/x86_64-w64-mingw32/include/windows.h

I get the same errors in both Windows XP 32bit and Windows 8.1 64bit + Bloodshed Dev-C++ 5.11 with TDM-GCC 4.9.2 32-bit and 64-bit compiler.

Before I used Bloodshed Dev-C++ 4 and compiled this code without any errors. (with old GNU GCC-2.95.2 compiler)

And in CODE::BLOCK with GNU GCC 4.9 compiler this code compiles without any problem too.

Probably I have to change compiler settings?

1

There are 1 answers

0
Aleksey On

Those errors occur only with newest MinGW-w64 - for 32 and 64 bit Windows compiler (TDM-GCC 4.9.2 32/64bit).

I think there are bugs in new winuser.h file (last modified December 7 2014 20:48) and corresponding lib file.

If you can - please tell to MinGW-w64' developers about it.