0

After VS19 got updated to 16.3.8, I cannot build my project and I receive the following error:

C:\Program Files\Microsoft SDKs\Kinect\v2.0_1409\inc\Kinect.h(8574,28): error C2872: 'boolean': ambiguous symbol
C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\shared\rpcndr.h(193,23): message : could be 'unsigned char boolean'
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.23.28105\include\concepts(213,9): message : or 'bool std::boolean'

I have tried to check the kinect.h header, but I do not have permissions to modify it and I do not want to mess with something that I am not familiar with. It used to be working before the update (VS19 16.0.0). I have also tried to clean, reboot, and double checked for any using namespace but the error is still there.

Based on the error:

The concepts file includes the following line

#define _STL_BOOLEAN_CONCEPT boolean 

The rpcndr.h

typedef unsigned char boolean; 

and then kinect.h

virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_IsInertial( 
        /* [annotation][out][retval] */ 
        _Out_  boolean *value) = 0;
question_1
  • 102
  • 1
  • 10
  • 3
    My guess is that you have this line in your code `using namespace std;` and that is causing a conflict with the library you are using. – drescherjm Nov 08 '19 at 18:15
  • If that is the case you may want to consult this Q&A: [https://stackoverflow.com/questions/1452721/why-is-using-namespace-std-considered-bad-practice](https://stackoverflow.com/questions/1452721/why-is-using-namespace-std-considered-bad-practice) – drescherjm Nov 08 '19 at 18:27
  • @drescherjm I had already removed using namespace std; from my code, before asking. – question_1 Nov 08 '19 at 18:32
  • 1
    You probably need to recompile clean especially if you are using precompiled headers. And make sure that no other header that you are using has .`using namespace std;` – drescherjm Nov 08 '19 at 18:35
  • @drescherjm I have tried, but the error is still there. Could it be the concepts file from VS that creates this conflict? I do not know if it was there before the update. – question_1 Nov 08 '19 at 18:58
  • You probably want to complain to Microsoft on their Forums. – drescherjm Nov 08 '19 at 19:41
  • 1
    What `c++` language standard are you using? Possibly you can set it back to `c++17` and not get this. [https://stackoverflow.com/questions/41308933/how-to-enable-c17-compiling-in-visual-studio](https://stackoverflow.com/questions/41308933/how-to-enable-c17-compiling-in-visual-studio) – drescherjm Nov 08 '19 at 19:46
  • @drescherjm I did set it to c++17 and it was successfully built. Thanks! – question_1 Nov 08 '19 at 19:55
  • Since you figured out it was concepts (and you need the rep more than me), I don't mind if you answer the question in the answers section not the question. I would upvote that. You should not put the answer in the question. – drescherjm Nov 08 '19 at 19:58
  • Let us [continue this discussion in chat](https://chat.stackoverflow.com/rooms/202078/discussion-between-lainos88-and-drescherjm). – question_1 Nov 09 '19 at 01:48

1 Answers1

1

Based on the comments and by setting the C++ Language Standard to C++ 17, I was able to successfully built my project.

question_1
  • 102
  • 1
  • 10