在VS19更新到16.3.8之后,我无法构建我的项目,并收到以下错误:
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'
我试图检查kinect.h头文件,但我没有修改它的权限,我不想弄乱一些我不熟悉的东西。在更新(VS19 16.0.0)之前,它是有效的。我还尝试过清理、重新启动和仔细检查是否有任何使用名称空间的情况,但错误仍然存在。
基于错误:
concepts file包括以下行
#define _STL_BOOLEAN_CONCEPT boolean
rpcndr.h
typedef unsigned char boolean;
然后是kinect.h
virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_IsInertial(
/* [annotation][out][retval] */
_Out_ boolean *value) = 0;
发布于 2019-11-13 18:03:57
根据这些评论,通过将C++语言标准设置为C++ 17,我能够成功地构建我的项目。
https://stackoverflow.com/questions/58771761
复制相似问题