Up to now I have used Dev-C++. I have several Win32-C++11 (STL) - projects imported into Code:Blocks. Some Projects compile well without any issues or changes needed. Some projects do not compile because of issues with Win32 codewords, e. g. CLEARTYPE_QUALITY is marked as "not declared". When I compile the same project with Dev-C++ the project compiles without any error messages or warnings. CLEARTYPE_QUALITY should be declared in Wingdi.h, which should be automatically included when windows.h is included. I do include windows.h. But just to get sure I did then also include Wingdi.h. No change, CLEARTYPE_QUALITY still not declared.
Are there any settings I have not correctly set in Code:Blocks which cause this error or is there an issue with the Win32 implementation?
Please read the two links below:
http://wiki.codeblocks.org/index.php/FAQ-General#Q:_What_Code::Blocks_is_not.3F
http://wiki.codeblocks.org/index.php/FAQ-Compiling_(errors)#Q:_How_do_I_troubleshoot_a_compiler_problem.3F
Probably you're using different compilers in the two IDEs (Dev-C++ is also an IDE, not compiler), so they behave differently.
Or some setting is different. To find out build the projects in both ides and compare the full build log.
Now found the solution.
Had to add to Compiler settings #defines:
_WIN32_WINNT=0x0501
WINVER=0x0501
Otherwise certain windows header-Files will not be included. Had probably added that to the compiler settings of Dev-C++ long time ago...
This is why it is better to add such settings to the project files, not to the globals.