我使用以下命令和VS2012 64位编译器从源代码编译了Qt 5.2.1:
configure -prefix c:\ Qt \ Qt5.2.1 \ msvc2012_opengl -mp -debug-and-release -opengl desktop -c ++ 11 -opensource -D _CRT_SECURE_NO_WARNINGS -nomake examples -skip qtwebkit-examples&& nmake&& nmake安装
现在在QtEditor中使用VS2012编译器编译我的项目时,我在qhash.h中收到此错误:
C:\ Qt \ Qt5.2.1 \ 5.2.1 \ msvc2012_opengl \ include \ QtCore \ qhash.h:777:错误: C2872:'uint':模棱两可的符号
为什么我得到它以及如何解决?
即使仅使用QApplication编译main.cpp,我也能得到它:
#include <QApplication>
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
return a.exec();
}
更新
我找到了它。它是GLM Math库的typedefs uint。我通过对每个glm类型使用glm :: namespace来解决它。实际上我想知道为什么Qt API没有命名空间这样的常用定义。
答案 0 :(得分:0)
您可能在Qt之外的该类型的定义存在冲突,例如在Qt / C ++和您正在使用的第三方依赖项。
作为旁注,没有QtEditor
这样的东西。