本文介绍了使用vccorlib.h标头出现奇怪的编译错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,


我们正在尝试为通用Windows平台构建我们的项目,我们正在使用CMake为VS 2017生成项目。


我们无法理解以下编译错误:


vccorlib.h(1560):错误C3946:'T':typeid无法应用于此类型


vccorlib.h(1561):错误C3536:'__ typeCode':在初始化之前无法使用(编译源文件C:\ Users \Public \ main \ Drawing \\ \\ Examples \WinWUP \OdaUWPApp \OdaUWPApp \ commonmon \SuspensionManager.cpp)


vccorlib.h(1561):错误C2664:'Platform :: Object ^ Platform :: Details :: CreateValue(Platform :: TypeCode,const void *)':无法将参数1从'int'转换为'Platform :: TypeCode'(编译源文件C:\ Users \Public \\\\Drawing \\ \\示例\WinWUP \OdaUWPApp \ OdaUWPApp \ common.com \\\\\\\\\\\\\\\\\\\\\\\\\\\我们的代码或项目究竟出了什么问题?也许vs 2017没有找到正确的sdk?



问候。

解决方案


Hello,

we're trying to build our project for Universal Windows Platform, we're using CMake to generate the project for VS 2017.

We're having trouble understanding the following compile errors:

vccorlib.h(1560): error C3946: 'T': typeid cannot be applied to this type

vccorlib.h(1561): error C3536: '__typeCode': cannot be used before it is initialized (compiling source file C:\Users\Public\main\Drawing\Examples\WinWUP\OdaUWPApp\OdaUWPApp\common\SuspensionManager.cpp)

vccorlib.h(1561): error C2664: 'Platform::Object ^Platform::Details::CreateValue(Platform::TypeCode,const void *)': cannot convert argument 1 from 'int' to 'Platform::TypeCode' (compiling source file C:\Users\Public\main\Drawing\Examples\WinWUP\OdaUWPApp\OdaUWPApp\common\SuspensionManager.cpp)

Can anyone clarify what exactly is wrong with our code or project? Perhaps there is something with vs 2017 not finding a correct sdk?

Regards.

解决方案


这篇关于使用vccorlib.h标头出现奇怪的编译错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-20 04:43