我正在尝试使用 C++ 学习 YAML,我使用 CMake 使用 VC++ Express 2010 将给定的 yaml-cpp 文件转换为 .dll 和 .lib 文件。我设置项目的方式与设置 SFML 等其他库的方式相同。
我的问题是,当我尝试构建 yaml-cpp 站点上给出的示例代码的发布版本时,我得到:
Ogre
Dragon
Wizzard
但是,当我尝试构建调试版本时,我得到:
Assertion failed: false, file d:\microsoft visual studio 10.0\vc\include\yaml-cp
p\nodeimpl.h, line 39
我不知道如何处理这个。我需要构建库的调试版本吗?如果是,如何?如果我设法改变某些东西,我不知道哪些项目选项会影响这一点。
当我编译时,我得到一个警告:
d:\microsoft visual studio 10.0\vc\include\yaml-cpp\conversion.h(51): warning C4146: unary minus operator applied to unsigned type, result still unsigned
有很多模板打印输出,fe:
1> d:\microsoft visual studio 10.0\vc\include\yaml-cpp\nodereadimpl.h(35) : see reference to function template instantiation 'bool YAML::ConvertScalar<T>(const YAML::Node &,T &)' being compiled
1> with
1> [
1> T=unsigned int
1> ]
这是我这边的问题吗?错误的 CMake 文件和编译?