嗨
我按照使用从源代码编译的 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 时出现此错误:
.\qdeclarativeeffect.cpp(263) : error C2039: 'Options' : is not a member of 'QDeclarativePixmap'
d:\cpp\qt\qt-everywhere-opensource-src-4.7.3\qt-everywhere-opensource-src-4.7.3\include\qtdeclarative\private\../../../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:\cpp\qt\qt-everywhere-opensource-src-4.7.3\qt-everywhere-opensource-src-4.7.3\include\qtdeclarative\private\../../../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:\cpp\qt\qt-everywhere-opensource-src-4.7.3\qt-everywhere-opensource-src-4.7.3\include\qtdeclarative\private\../../../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 Files\Microsoft Visual Studio 9.0\VC\BIN\cl.EXE"' : return code '0x2'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio 9.0\VC\BIN\nmake.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 的已知问题并且已得到修复:
关于c++ - 尝试使用 visual studio 2008 在 Windows 中编译 qt-labs-qt3d 时出现错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6057900/