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
The rpcndr.h
typedef unsigned char boolean;
然后是kinect.h
virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_IsInertial(
/* [annotation][out][retval] */
_Out_ boolean *value) = 0;
基于注释并将C ++语言标准设置为C ++ 17,我能够成功构建我的项目。