0

After migrating my c++ project from QT version 4.2.8 to version 5.5.0 I get the following errors while compiling for some of my files:

C:\program files (x86)\microsoft sdks\windows\v7.0a\include\rpcndr.h(162): error C2632: 'char' followed by 'int' is illegal

C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\wtypes.h(1123): error C2371: 'BOOLEAN' : redefinition; different basic types

C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\include\winnt.h(959) : see declaration of 'BOOLEAN'

95% of my project is compiling, but the last piece is missing and I don't know where to look anymore.

When I open file rpcndr.h, the error is thrown on the last line of this piece of code.

define small char
typedef unsigned char byte;
typedef byte cs_byte;
typedef unsigned char boolean;

Nowhere in the whole project I use the word boolean, so I don't know where the error message is coming from.

Does anybody have has the same problem? Or maybe kowns the solution?

I don't know anymore.

Roy
  • 51
  • 2
  • 10
  • define need a # – Oblivion Oct 22 '19 at 15:20
  • Why would you use *those* typedefs / define in the first place?? C++ has `std::byte` and using a `unsigned char` rather than a proper `bool` is just wrong. And your `define` should be `#define` in any case. – Jesper Juhl Oct 22 '19 at 15:22
  • 1
    Correct me if I am wrong but these files are not files you write. It seems to me that your project imports the wrong version of the Microsoft SDK. Check your project settings –  Oct 22 '19 at 15:27
  • 1
    Maybe check https://stackoverflow.com/questions/5874215/what-is-rpcndr-h –  Oct 22 '19 at 15:29
  • Thanks for the answers. I will check it tomorrow when I'm back at work. – Roy Oct 22 '19 at 15:58
  • I cannot change this files because it is in the Microsoft SDK indeed. @Nico238, Can you maybe say the exact thing I have to check? I will check your link. – Roy Oct 23 '19 at 06:40
  • 1
    @Roy Project Settings -> Configuration Properties -> C/C++ -> Advanced -> Show Includes –  Oct 23 '19 at 06:48
  • @Nico238 Yes, thank you! I found out there was an old GtGui included. This caused the errors. – Roy Oct 23 '19 at 07:06
  • @Nico238 Do you have also experience with the folowing error? : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall QListWidget::addItem(class QListWidgetItem *)" – Roy Oct 23 '19 at 07:56

0 Answers0