I’m using the latest MinGW:
MINGWBASEDIR=C:\mingw
gcc version 4.7.0 (GCC)
gcc version 4.7.0 (GCC)
GNU gdb (GDB) 7.5
GNU ld (GNU Binutils) 2.22
GNU windres (GNU Binutils) 2.22
GNU dlltool (GNU Binutils) 2.22
GNU Make 3.82.90
#define __MINGW32_VERSION 3.20
#define __W32API_VERSION 3.17
This is the source file (test.cpp):
#include <stdio.h>
#include <windows.h>
int main(int Argc,char** Args) {
printf("%d",sizeof(TITLEBARINFO));
}
This is how I compile it:
g++ -c test.cpp
And this is the error message reported by MinGW:
C:\temp>g++ -c test.cpp
test.cpp: In function 'int main(int, char**)':
test.cpp:5:22: error: 'TITLEBARINFO' was not declared in this scope
TITLEBARINFO is supposed to be declared in winuser.h which windows.h includes.
I’ve checked these 2 header files in mingw/include dir, the definition of TITLEBARINFO is truly there. But I still get this compiler error, how strange!
gcc -c -D_WIN32_WINDOWS=0x0410 test.cppMinGW apparently defaults to 0x0400.