Author Topic: Issues with imported Win32 Dev-C++ Projects  (Read 306 times)

Offline whoever

  • Single posting newcomer
  • *
  • Posts: 2
Issues with imported Win32 Dev-C++ Projects
« on: May 28, 2017, 05:21:39 pm »
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?

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 10118
Re: Issues with imported Win32 Dev-C++ Projects
« Reply #1 on: May 28, 2017, 06:09:54 pm »
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.
<debugger plugin maintainer>
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline whoever

  • Single posting newcomer
  • *
  • Posts: 2
Re: Issues with imported Win32 Dev-C++ Projects
« Reply #2 on: June 05, 2017, 08:32:07 pm »
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...

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 10118
Re: Issues with imported Win32 Dev-C++ Projects
« Reply #3 on: June 05, 2017, 08:57:17 pm »
This is why it is better to add such settings to the project files, not to the globals.
<debugger plugin maintainer>
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]