gpt4 book ai didi

c++ - Windows 7下编译Qt3D

转载 作者:太空宇宙 更新时间:2023-11-04 11:35:42 25 4
gpt4 key购买 nike

我正在尝试通过以下说明编译和安装 Qt3D:

http://qt-project.org/wiki/Qt3D-Installation

我正在使用 Windows MinGW方法,我正在使用 Qt MinGW 终端。

我第一次做这个过程,它提示缺少Perl .这似乎与教程相反。所以我安装了Strawberry Perl .我找不到关于这些构建脚本在 Windows 上期望的 Perl 风格的建议。

当我说:

qmake qt3d.pro

它的执行速度快得令人怀疑。

当我说:

mingw32-make -j 3 install 

我收到此错误:

:\qt3d>mingw32-make -j 3 install
d src/ && ( test -e Makefile || C:/Qt/5.1.1/mingw48_32/bin/qmake.exe C:/qt3d/src/src.pro -o Makefile ) && mingw32-make -f Makefile install
ingw32-make[1]: Entering directory 'c:/qt3d/src'
d threed/ && ( test -e Makefile || c:/Qt/5.1.1/mingw48_32/bin/qmake.exe C:/qt3d/src/threed/threed.pro -o Makefile ) && c:/Qt/Tools/mingw48_32/bin/mingw32-make
f Makefile install
usr/bin/sh: c:/Qt/Tools/mingw48_32/bin/mingw32-make: Invalid argument
akefile:64: recipe for target 'sub-threed-install_subtargets-ordered' failed
ingw32-make[1]: *** [sub-threed-install_subtargets-ordered] Error 126
ingw32-make[1]: Leaving directory 'c:/qt3d/src'
akefile:55: recipe for target 'sub-src-install_subtargets' failed
ingw32-make: *** [sub-src-install_subtargets] Error 2

坦率地说,我不确定该错误是怎么回事。

我可能做错了什么?

上述错误是使用 Qt 5.1 产生的。

这是我通过完全相同的过程为 Qt 5.3 产生的类似错误。

C:\qt3d>mingw32-make -j 3 install
cd src/ && ( test -e Makefile || C:/Qt/Qt5.3.0/5.3/mingw482_32/bin/qmake.exe C:/qt3d/src/src.pro -o Makefile ) && mingw32-make -f Makefile install
mingw32-make[1]: Entering directory 'c:/qt3d/src'
cd threed/ && ( test -e Makefile || c:/Qt/5.1.1/mingw48_32/bin/qmake.exe C:/qt3d/src/threed/threed.pro -o Makefile ) && c:/Qt/Qt5.3.0/Tools/mingw482_32/bin/ming
w32-make -f Makefile install
mingw32-make[2]: Entering directory 'c:/qt3d/src/threed'
c:/Qt/Qt5.3.0/Tools/mingw482_32/bin/mingw32-make -f Makefile.Release install
c:/Qt/Qt5.3.0/Tools/mingw482_32/bin/mingw32-make -f Makefile.Debug install
mingw32-make[3]: Entering directory 'c:/qt3d/src/threed'
g++ -c -pipe -fno-keep-inline-dllexport -O2 -fexceptions -mthreads -std=gnu++0x -frtti -Wall -Wextra -DUNICODE -DQT_BUILD_3D_LIB -DQT_BUILDING_QT -DQT_NO_CAST_T
O_ASCII -DQT_ASCII_CAST_WARNINGS -DQT_MOC_COMPAT -DQT_USE_QSTRINGBUILDER -DQT_DEPRECATED_WARNINGS -DQT_DISABLE_DEPRECATED_BEFORE=0x040800 -D_USE_MATH_DEFINES -D
_SCL_SECURE_NO_WARNINGS -D_CRT_SECURE_NO_WARNINGS -DQT_NO_EGL -DQT_NO_DEBUG -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_NETWORK_LIB -DQT_CO
RE_LIB -I. -I'../../include' -I'../../include/Qt3D' -I'../../include/Qt3D/5.3.0' -I'../../include/Qt3D/5.3.0/Qt3D' -I'tmp' -I'../private' -I'global' -I'painting
' -I'arrays' -I'effects' -I'materials' -I'geometry' -I'viewing' -I'math3d' -I'scene' -I'scene_ai' -I'../../3rdparty/assimp' -I'../../3rdparty/assimp/code' -I'..
/../3rdparty/assimp/code/BoostWorkaround' -I'../../3rdparty/assimp/include' -I'../../3rdparty/assimp/include/Compiler' -I'../../3rdparty/assimp/contrib/ConvertU
TF' -I'../../3rdparty/assimp/contrib/zlib' -I'../../3rdparty/assimp/contrib/irrXML' -I'../../3rdparty/assimp/contrib/unzip' -I'scene_bezier' -I'network' -I'grap
hicsview' -I'textures' -I'surfaces' -I'api' -I'C:/Qt/5.1.1/mingw48_32/include' -I'C:/Qt/5.1.1/mingw48_32/include/QtOpenGL' -I'C:/Qt/5.1.1/mingw48_32/include/QtW
idgets' -I'C:/Qt/5.1.1/mingw48_32/include/QtGui' -I'C:/Qt/5.1.1/mingw48_32/include/QtGui/5.1.1' -I'C:/Qt/5.1.1/mingw48_32/include/QtGui/5.1.1/QtGui' -I'C:/Qt/5.
1.1/mingw48_32/include/QtCore' -I'C:/Qt/5.1.1/mingw48_32/include/QtCore/5.1.1' -I'C:/Qt/5.1.1/mingw48_32/include/QtCore/5.1.1/QtCore' -I'C:/Qt/5.1.1/mingw48_32/
include/QtNetwork' -I'.moc/release_shared' -I'C:/Qt/5.1.1/mingw48_32/mkspecs/win32-g++' -o .obj/release_shared/qglpainter.o painting/qglpainter.cpp
g++ -c -pipe -fno-keep-inline-dllexport -O2 -fexceptions -mthreads -std=gnu++0x -frtti -Wall -Wextra -DUNICODE -DQT_BUILD_3D_LIB -DQT_BUILDING_QT -DQT_NO_CAST_T
O_ASCII -DQT_ASCII_CAST_WARNINGS -DQT_MOC_COMPAT -DQT_USE_QSTRINGBUILDER -DQT_DEPRECATED_WARNINGS -DQT_DISABLE_DEPRECATED_BEFORE=0x040800 -D_USE_MATH_DEFINES -D
_SCL_SECURE_NO_WARNINGS -D_CRT_SECURE_NO_WARNINGS -DQT_NO_EGL -DQT_NO_DEBUG -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_NETWORK_LIB -DQT_CO
RE_LIB -I. -I'../../include' -I'../../include/Qt3D' -I'../../include/Qt3D/5.3.0' -I'../../include/Qt3D/5.3.0/Qt3D' -I'tmp' -I'../private' -I'global' -I'painting
' -I'arrays' -I'effects' -I'materials' -I'geometry' -I'viewing' -I'math3d' -I'scene' -I'scene_ai' -I'../../3rdparty/assimp' -I'../../3rdparty/assimp/code' -I'..
/../3rdparty/assimp/code/BoostWorkaround' -I'../../3rdparty/assimp/include' -I'../../3rdparty/assimp/include/Compiler' -I'../../3rdparty/assimp/contrib/ConvertU
TF' -I'../../3rdparty/assimp/contrib/zlib' -I'../../3rdparty/assimp/contrib/irrXML' -I'../../3rdparty/assimp/contrib/unzip' -I'scene_bezier' -I'network' -I'grap
hicsview' -I'textures' -I'surfaces' -I'api' -I'C:/Qt/5.1.1/mingw48_32/include' -I'C:/Qt/5.1.1/mingw48_32/include/QtOpenGL' -I'C:/Qt/5.1.1/mingw48_32/include/QtW
idgets' -I'C:/Qt/5.1.1/mingw48_32/include/QtGui' -I'C:/Qt/5.1.1/mingw48_32/include/QtGui/5.1.1' -I'C:/Qt/5.1.1/mingw48_32/include/QtGui/5.1.1/QtGui' -I'C:/Qt/5.
1.1/mingw48_32/include/QtCore' -I'C:/Qt/5.1.1/mingw48_32/include/QtCore/5.1.1' -I'C:/Qt/5.1.1/mingw48_32/include/QtCore/5.1.1/QtCore' -I'C:/Qt/5.1.1/mingw48_32/
include/QtNetwork' -I'.moc/release_shared' -I'C:/Qt/5.1.1/mingw48_32/mkspecs/win32-g++' -o .obj/release_shared/qglattributedescription.o arrays/qglattributedesc
ription.cpp
mingw32-make[3]: Entering directory 'c:/qt3d/src/threed'
g++ -c -pipe -fno-keep-inline-dllexport -g -fexceptions -mthreads -std=gnu++0x -frtti -Wall -Wextra -DUNICODE -DQT_BUILD_3D_LIB -DQT_BUILDING_QT -DQT_NO_CAST_TO
_ASCII -DQT_ASCII_CAST_WARNINGS -DQT_MOC_COMPAT -DQT_USE_QSTRINGBUILDER -DQT_DEPRECATED_WARNINGS -DQT_DISABLE_DEPRECATED_BEFORE=0x040800 -D_USE_MATH_DEFINES -D_
SCL_SECURE_NO_WARNINGS -D_DEBUG -D_CRT_SECURE_NO_WARNINGS -DQT_NO_EGL -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB
-I. -I'../../include' -I'../../include/Qt3D' -I'../../include/Qt3D/5.3.0' -I'../../include/Qt3D/5.3.0/Qt3D' -I'tmp' -I'../private' -I'global' -I'painting' -I'a
rrays' -I'effects' -I'materials' -I'geometry' -I'viewing' -I'math3d' -I'scene' -I'scene_ai' -I'../../3rdparty/assimp' -I'../../3rdparty/assimp/code' -I'../../3r
dparty/assimp/code/BoostWorkaround' -I'../../3rdparty/assimp/include' -I'../../3rdparty/assimp/include/Compiler' -I'../../3rdparty/assimp/contrib/ConvertUTF' -I
'../../3rdparty/assimp/contrib/zlib' -I'../../3rdparty/assimp/contrib/irrXML' -I'../../3rdparty/assimp/contrib/unzip' -I'scene_bezier' -I'network' -I'graphicsvi
ew' -I'textures' -I'surfaces' -I'api' -I'C:/Qt/5.1.1/mingw48_32/include' -I'C:/Qt/5.1.1/mingw48_32/include/QtOpenGL' -I'C:/Qt/5.1.1/mingw48_32/include/QtWidgets
' -I'C:/Qt/5.1.1/mingw48_32/include/QtGui' -I'C:/Qt/5.1.1/mingw48_32/include/QtGui/5.1.1' -I'C:/Qt/5.1.1/mingw48_32/include/QtGui/5.1.1/QtGui' -I'C:/Qt/5.1.1/mi
ngw48_32/include/QtCore' -I'C:/Qt/5.1.1/mingw48_32/include/QtCore/5.1.1' -I'C:/Qt/5.1.1/mingw48_32/include/QtCore/5.1.1/QtCore' -I'C:/Qt/5.1.1/mingw48_32/includ
e/QtNetwork' -I'.moc/debug_shared' -I'C:/Qt/5.1.1/mingw48_32/mkspecs/win32-g++' -o .obj/debug_shared/qglpainter.o painting/qglpainter.cpp
g++ -c -pipe -fno-keep-inline-dllexport -g -fexceptions -mthreads -std=gnu++0x -frtti -Wall -Wextra -DUNICODE -DQT_BUILD_3D_LIB -DQT_BUILDING_QT -DQT_NO_CAST_TO
_ASCII -DQT_ASCII_CAST_WARNINGS -DQT_MOC_COMPAT -DQT_USE_QSTRINGBUILDER -DQT_DEPRECATED_WARNINGS -DQT_DISABLE_DEPRECATED_BEFORE=0x040800 -D_USE_MATH_DEFINES -D_
SCL_SECURE_NO_WARNINGS -D_DEBUG -D_CRT_SECURE_NO_WARNINGS -DQT_NO_EGL -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB
-I. -I'../../include' -I'../../include/Qt3D' -I'../../include/Qt3D/5.3.0' -I'../../include/Qt3D/5.3.0/Qt3D' -I'tmp' -I'../private' -I'global' -I'painting' -I'a
rrays' -I'effects' -I'materials' -I'geometry' -I'viewing' -I'math3d' -I'scene' -I'scene_ai' -I'../../3rdparty/assimp' -I'../../3rdparty/assimp/code' -I'../../3r
dparty/assimp/code/BoostWorkaround' -I'../../3rdparty/assimp/include' -I'../../3rdparty/assimp/include/Compiler' -I'../../3rdparty/assimp/contrib/ConvertUTF' -I
'../../3rdparty/assimp/contrib/zlib' -I'../../3rdparty/assimp/contrib/irrXML' -I'../../3rdparty/assimp/contrib/unzip' -I'scene_bezier' -I'network' -I'graphicsvi
ew' -I'textures' -I'surfaces' -I'api' -I'C:/Qt/5.1.1/mingw48_32/include' -I'C:/Qt/5.1.1/mingw48_32/include/QtOpenGL' -I'C:/Qt/5.1.1/mingw48_32/include/QtWidgets
' -I'C:/Qt/5.1.1/mingw48_32/include/QtGui' -I'C:/Qt/5.1.1/mingw48_32/include/QtGui/5.1.1' -I'C:/Qt/5.1.1/mingw48_32/include/QtGui/5.1.1/QtGui' -I'C:/Qt/5.1.1/mi
ngw48_32/include/QtCore' -I'C:/Qt/5.1.1/mingw48_32/include/QtCore/5.1.1' -I'C:/Qt/5.1.1/mingw48_32/include/QtCore/5.1.1/QtCore' -I'C:/Qt/5.1.1/mingw48_32/includ
e/QtNetwork' -I'.moc/debug_shared' -I'C:/Qt/5.1.1/mingw48_32/mkspecs/win32-g++' -o .obj/debug_shared/qglvertexbundle.o arrays/qglvertexbundle.cpp
painting/qglpainter.cpp: In member function 'int QGLPainter::pickObject(int, int) const':
painting/qglpainter.cpp:2348:29: error: 'class QOpenGLFunctions' has no member named 'glReadPixels'
context()->functions()->glReadPixels(x, y, 1, 1, GL_RGBA, GL_UNSIGNED_BYTE, data);
^
painting/qglpainter.cpp: In member function 'int QGLPainter::pickObject(int, int) const':
painting/qglpainter.cpp:2348:29: error: 'class QOpenGLFunctions' has no member named 'glReadPixels'
context()->functions()->glReadPixels(x, y, 1, 1, GL_RGBA, GL_UNSIGNED_BYTE, data);
^
Makefile.Release:4156: recipe for target '.obj/release_shared/qglpainter.o' failed
mingw32-make[3]: *** [.obj/release_shared/qglpainter.o] Error 1
mingw32-make[3]: Leaving directory 'c:/qt3d/src/threed'
Makefile:44: recipe for target 'release-install' failed
mingw32-make[2]: *** [release-install] Error 2
mingw32-make[2]: *** Waiting for unfinished jobs....
g++ -c -pipe -fno-keep-inline-dllexport -g -fexceptions -mthreads -std=gnu++0x -frtti -Wall -Wextra -DUNICODE -DQT_BUILD_3D_LIB -DQT_BUILDING_QT -DQT_NO_CAST_TO
_ASCII -DQT_ASCII_CAST_WARNINGS -DQT_MOC_COMPAT -DQT_USE_QSTRINGBUILDER -DQT_DEPRECATED_WARNINGS -DQT_DISABLE_DEPRECATED_BEFORE=0x040800 -D_USE_MATH_DEFINES -D_
SCL_SECURE_NO_WARNINGS -D_DEBUG -D_CRT_SECURE_NO_WARNINGS -DQT_NO_EGL -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB
-I. -I'../../include' -I'../../include/Qt3D' -I'../../include/Qt3D/5.3.0' -I'../../include/Qt3D/5.3.0/Qt3D' -I'tmp' -I'../private' -I'global' -I'painting' -I'a
rrays' -I'effects' -I'materials' -I'geometry' -I'viewing' -I'math3d' -I'scene' -I'scene_ai' -I'../../3rdparty/assimp' -I'../../3rdparty/assimp/code' -I'../../3r
dparty/assimp/code/BoostWorkaround' -I'../../3rdparty/assimp/include' -I'../../3rdparty/assimp/include/Compiler' -I'../../3rdparty/assimp/contrib/ConvertUTF' -I
'../../3rdparty/assimp/contrib/zlib' -I'../../3rdparty/assimp/contrib/irrXML' -I'../../3rdparty/assimp/contrib/unzip' -I'scene_bezier' -I'network' -I'graphicsvi
ew' -I'textures' -I'surfaces' -I'api' -I'C:/Qt/5.1.1/mingw48_32/include' -I'C:/Qt/5.1.1/mingw48_32/include/QtOpenGL' -I'C:/Qt/5.1.1/mingw48_32/include/QtWidgets
' -I'C:/Qt/5.1.1/mingw48_32/include/QtGui' -I'C:/Qt/5.1.1/mingw48_32/include/QtGui/5.1.1' -I'C:/Qt/5.1.1/mingw48_32/include/QtGui/5.1.1/QtGui' -I'C:/Qt/5.1.1/mi
ngw48_32/include/QtCore' -I'C:/Qt/5.1.1/mingw48_32/include/QtCore/5.1.1' -I'C:/Qt/5.1.1/mingw48_32/include/QtCore/5.1.1/QtCore' -I'C:/Qt/5.1.1/mingw48_32/includ
e/QtNetwork' -I'.moc/debug_shared' -I'C:/Qt/5.1.1/mingw48_32/mkspecs/win32-g++' -o .obj/debug_shared/qarray.o arrays/qarray.cpp
Makefile.Debug:4155: recipe for target '.obj/debug_shared/qglpainter.o' failed
mingw32-make[3]: *** [.obj/debug_shared/qglpainter.o] Error 1
mingw32-make[3]: *** Waiting for unfinished jobs....
mingw32-make[3]: Leaving directory 'c:/qt3d/src/threed'
Makefile:58: recipe for target 'debug-install' failed
mingw32-make[2]: *** [debug-install] Error 2
mingw32-make[2]: Leaving directory 'c:/qt3d/src/threed'
Makefile:64: recipe for target 'sub-threed-install_subtargets-ordered' failed
mingw32-make[1]: *** [sub-threed-install_subtargets-ordered] Error 2
mingw32-make[1]: Leaving directory 'c:/qt3d/src'
Makefile:55: recipe for target 'sub-src-install_subtargets' failed
mingw32-make: *** [sub-src-install_subtargets] Error 2

C:\qt3d>

类似的错误。我在这里做错了什么?

最佳答案

我遇到了与 Qt 5.3 相同的问题,在 Windows 7 上使用 Qt 5.2.1 构建 Qt3D。我通过更改 context->functions()->glReadPixels() 解决了这个问题只是 glReadPixels () 在 qglpainter.cpp 的第 2348 行。

是因为终端出现这个错误:

painting/qglpainter.cpp: In member function 'int QGLPainter::pickObject(int, int) const':
painting/qglpainter.cpp:2348:29: error: 'class QOpenGLFunctions' has no member named 'glReadPixels'
context()->functions()->glReadPixels(x, y, 1, 1, GL_RGBA, GL_UNSIGNED_BYTE, data);

现在安装了 Qt3D。

关于c++ - Windows 7下编译Qt3D,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23138895/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com