I'm trying to compile a bit of open-source software in Windows using Code::Blocks/MinGW. It's been a bit of a nightmare so far, I don't think anyone's ever tried compiling this software on this platform with this compiler. Anyway, I've got it to the point where it trips up trying to compile the program's resources. The problem, it thinks, is on this line of the resource file:
PUSHBUTTON "Close",IDCLOSE,172,237,50,14
Specifically, it doesn't like IDCLOSE. On inspection, IDCLOSE is defined in winuser.h, inside a preprocessor block as so:
#if (WINVER >= 0x0400)
#define IDCLOSE 8
#define IDHELP 9
#endif
I have WINVER=0x0500 set up as part of my compiler defines in the IDE, so it seems that the resource compiler windres.exe is not using these definitions (I can see that the code compiler is acknowledging these defines because if I type garbage inside this #if/endif block it bombs out before it ever gets to the resource compilation stage). Indeed, if I replicate the windres.exe call that Code::Blocks is making on the command line, and add the WINVER definition to it, it compiles cleanly. Of course, I don't want to have to drop to the command-line for every compilation that requires the resource compiler to use preprocessor variables. How are you supposed to do this within the Code::Blocks GUI?