Я пытаюсь скомпилировать и установить Qt3D по следующим направлениям:
http://qt-project.org/wiki/Qt3D-Installation
Я использую винду MinGW метод, и я использую терминал Qt MinGW.
В первый раз, когда я сделал процесс, он пожаловался на отсутствие Perl. Это, кажется, идет вразрез с учебником. Итак, я установил Клубника перл. Я не смог найти рекомендации по вкусу Perl, который эти сценарии сборки ожидают от Windows.
Когда я сказал:
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>
Похожая ошибка. Что я здесь не так делаю?
Превращаю мой комментарий в правильный ответ:
Q: Это выполняется подозрительно быстро.
Вы хотите запустить qmake рекурсивно в структуре системы рекурсивной сборки, такой как Qt3D
, Это означает, что вам нужно будет передать опцию -r в qmake, которая передается по умолчанию, если вы используете QtCreator. Вы должны быть явно указаны в командной строке при запуске qmake вручную.
Также обратите внимание на то, что «старая» (текущая основная) база кода Qt3D не поддерживается, поэтому могут возникнуть проблемы с будущими версиями Qt, хотя в ней уже есть некоторые патчи для лучшей работы с Qt 5. Если у вас возникнут проблемы из-за новой версии Qt, вы можете создать и, надеюсь, отправить исправления или просто понизить вашу основную версию Qt.
У меня была та же проблема, что и у вас с Qt 5.3, сборка Qt3D с Qt 5.2.1 для Windows 7. Я решил ее, изменив context->functions()->glReadPixels()
просто glReadPixels ()
в строке 2348 в qglpainter.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);
Теперь Qt3D установлен.
Все, у кого все еще есть проблемы во время компиляции, после установки perl на ваш компьютер, смотрят путь к папке qt3d. Там не должно быть пробелов.