尝试使用 Visual Studio 2008 在 Windows 中编译 qt-labs-qt3d 时出错

Getting errors when trying to compile qt-labs-qt3d in windows with visual studio 2008

本文关键字:Windows 编译 qt-labs-qt3d 出错 2008 Visual Studio      更新时间:2023-10-16

Hi我按照使用从源代码编译的Qt 4.7.3的网站说明进行操作:http://doc.qt.nokia.com/qt3d-snapshot/qt3d-building.html和

http://www.johanpaul.com/blog/2011/03/compiling-qt3d-for-windows但是在编译Qt3d IM时收到此错误:

.qdeclarativeeffect.cpp(263) : error C2039: 'Options' : is not a member of 'QDeclarativePixmap'
        d:cppqtqt-everywhere-opensource-src-4.7.3qt-everywhere-opensource-src-4.7.3includeqtdeclarativeprivate../../../src/declarative/util/qdeclarativepixmapcache_p.h(59) : see declaration of 'QDeclarativePixmap'
.qdeclarativeeffect.cpp(263) : error C2065: 'Options' : undeclared identifier
.qdeclarativeeffect.cpp(263) : error C2146: syntax error : missing ';' before identifier 'options'
.qdeclarativeeffect.cpp(263) : error C2065: 'options' : undeclared identifier
.qdeclarativeeffect.cpp(263) : error C2039: 'Cache' : is not a member of 'QDeclarativePixmap'
        d:cppqtqt-everywhere-opensource-src-4.7.3qt-everywhere-opensource-src-4.7.3includeqtdeclarativeprivate../../../src/declarative/util/qdeclarativepixmapcache_p.h(59) : see declaration of 'QDeclarativePixmap'
.qdeclarativeeffect.cpp(263) : error C2065: 'Cache' : undeclared identifier
.qdeclarativeeffect.cpp(265) : error C2065: 'options' : undeclared identifier
.qdeclarativeeffect.cpp(265) : error C2039: 'Asynchronous' : is not a member of 'QDeclarativePixmap'
        d:cppqtqt-everywhere-opensource-src-4.7.3qt-everywhere-opensource-src-4.7.3includeqtdeclarativeprivate../../../src/declarative/util/qdeclarativepixmapcache_p.h(59) : see declaration of 'QDeclarativePixmap'
.qdeclarativeeffect.cpp(265) : error C2065: 'Asynchronous' : undeclared identifier
.qdeclarativeeffect.cpp(266) : error C2065: 'options' : undeclared identifier
qdeclarativemesh.cpp
NMAKE : fatal error U1077: '"C:Program FilesMicrosoft Visual Studio 9.0VCBINcl.EXE"' : return code '0x2'
Stop.
NMAKE : fatal error U1077: '"C:Program FilesMicrosoft Visual Studio 9.0VCBINnmake.exe"' : return code '0x2'
Stop.
NMAKE : fatal error U1077: 'cd' : return code '0x2'
Stop.
NMAKE : fatal error U1077: 'cd' : return code '0x2'
Stop.

似乎这确实是 4.7.2 的已知问题,并且已得到修复:

https://bugreports.qt-project.org/browse/QTBUG-17872