我正在尝试为windows下的android编译qt3d for qt5。 为此,我遵循了以下步骤:http://qt-project.org/wiki/Qt5ForAndroidBuilding
我没有自己构建QtCreator和Qt5,而是从这个页面下载了Windows的Android版本:http://qt-project.org/downloads 这适用于为android构建常见的qt项目,但是为android编译qt3d并没有按预期工作。 我已经从qit下载了qt3d,通过右侧的下载按钮(不是该存储库的克隆),打开该项目,将其配置为使用我的qt5-android并尝试下载。
我总是遇到编译错误:
C:\Qt\qt3d\qt-qt3d\src\threed\global\qglnamespace.h:45: Fehler:Qt3D/qt3dglobal.h: No such file or directory
看起来,它试图包含不存在的头文件...至少不在项目文件夹结构中。如果我查看include目录,则存在这些文件夹(QT3D,QTQuick3d),但没有必要的头文件。所以我认为qmake过程在某些时候失败了。
在分析.pro文件时,编译过程会抛出一些引用cmake的其他错误:
Project MESSAGE: cmake executable not found. Not running CMake unit tests
整个编译输出:
14:31:52: Führe Schritte für Projekt qt3d aus...
14:31:52: Starte "C:\Qt\Qt5.1.1\5.1.1\android_armv7\bin\qmake.exe" C:\Qt\qt3d\qt-qt3d\qt3d.pro -r -spec android-g++
Info: creating cache file C:/Qt/qt3d/qt-qt3d/.qmake.cache
Reading C:/Qt/qt3d/qt-qt3d/src/src.pro
Reading C:/Qt/qt3d/qt-qt3d/src/threed/threed.pro
Reading C:/Qt/qt3d/qt-qt3d/src/quick3d/quick3d.pro
Reading C:/Qt/qt3d/qt-qt3d/src/imports/imports.pro
Reading C:/Qt/qt3d/qt-qt3d/src/imports/threed/threed.pro
Reading C:/Qt/qt3d/qt-qt3d/tools/tools.pro
Reading C:/Qt/qt3d/qt-qt3d/tools/qt3d/qt3d.pro
Reading C:/Qt/qt3d/qt-qt3d/tools/qt3d/qglinfo/qglinfo.pro
Reading C:/Qt/qt3d/qt-qt3d/tools/meshcvt/meshcvt.pro
Reading C:/Qt/qt3d/qt-qt3d/examples/examples.pro
Reading C:/Qt/qt3d/qt-qt3d/examples/qt3d/qt3d.pro
Reading C:/Qt/qt3d/qt-qt3d/examples/qt3d/basket/basket.pro
Reading C:/Qt/qt3d/qt-qt3d/examples/qt3d/builder/builder.pro
Reading C:/Qt/qt3d/qt-qt3d/examples/qt3d/cube/cube.pro
Reading C:/Qt/qt3d/qt-qt3d/examples/qt3d/cylinder/cylinder.pro
Reading C:/Qt/qt3d/qt-qt3d/examples/qt3d/geometry/geometry.pro
Reading C:/Qt/qt3d/qt-qt3d/examples/qt3d/nesting/nesting.pro
Reading C:/Qt/qt3d/qt-qt3d/examples/qt3d/solarsystem/solarsystem.pro
Reading C:/Qt/qt3d/qt-qt3d/examples/qt3d/tank/tank.pro
Reading C:/Qt/qt3d/qt-qt3d/examples/qt3d/teapot/teapot.pro
Reading C:/Qt/qt3d/qt-qt3d/examples/qt3d/load_model/load_model.pro
Reading C:/Qt/qt3d/qt-qt3d/examples/quick3d/quick3d.pro
Reading C:/Qt/qt3d/qt-qt3d/examples/quick3d/basket/basket.pro
Reading C:/Qt/qt3d/qt-qt3d/examples/quick3d/cube/cube.pro
Reading C:/Qt/qt3d/qt-qt3d/examples/quick3d/forest/forest.pro
Reading C:/Qt/qt3d/qt-qt3d/examples/quick3d/lander/lander.pro
Reading C:/Qt/qt3d/qt-qt3d/examples/quick3d/matrix_animation/matrix_animation.pro
Reading C:/Qt/qt3d/qt-qt3d/examples/quick3d/positional_lighting/positional_lighting.pro
Reading C:/Qt/qt3d/qt-qt3d/examples/quick3d/monkeygod/monkeygod.pro
Reading C:/Qt/qt3d/qt-qt3d/examples/quick3d/moon/moon.pro
Reading C:/Qt/qt3d/qt-qt3d/examples/quick3d/photoroom/photoroom.pro
Reading C:/Qt/qt3d/qt-qt3d/examples/quick3d/shaders/shaders.pro
Reading C:/Qt/qt3d/qt-qt3d/examples/quick3d/sphere/sphere.pro
Reading C:/Qt/qt3d/qt-qt3d/examples/quick3d/animations/animations.pro
Reading C:/Qt/qt3d/qt-qt3d/demos/demos.pro
Reading C:/Qt/qt3d/qt-qt3d/demos/qt3d/qt3d.pro
Reading C:/Qt/qt3d/qt-qt3d/demos/qt3d/teaservice/teaservice.pro
Reading C:/Qt/qt3d/qt-qt3d/demos/qt3d/shapes/shapes.pro
Reading C:/Qt/qt3d/qt-qt3d/demos/qt3d/pageflip/pageflip.pro
Reading C:/Qt/qt3d/qt-qt3d/demos/qt3d/cubehouse/cubehouse.pro
Reading C:/Qt/qt3d/qt-qt3d/demos/qt3d/photobrowser3d/photobrowser3d.pro
Reading C:/Qt/qt3d/qt-qt3d/demos/quick3d/quick3d.pro
Reading C:/Qt/qt3d/qt-qt3d/demos/quick3d/robo_bounce/robo_bounce.pro
Reading C:/Qt/qt3d/qt-qt3d/demos/quick3d/tea_service/tea_service.pro
Reading C:/Qt/qt3d/qt-qt3d/demos/quick3d/flickr3d/flickr3d.pro
Reading C:/Qt/qt3d/qt-qt3d/tests/tests.pro
Reading C:/Qt/qt3d/qt-qt3d/tests/manual/manual.pro
Reading C:/Qt/qt3d/qt-qt3d/tests/manual/animations/animations.pro
Reading C:/Qt/qt3d/qt-qt3d/tests/manual/basic/basic.pro
Reading C:/Qt/qt3d/qt-qt3d/tests/manual/background/background.pro
Reading C:/Qt/qt3d/qt-qt3d/tests/manual/displaymodel/displaymodel.pro
Reading C:/Qt/qt3d/qt-qt3d/tests/manual/fullreferencing/fullreferencing.pro
Reading C:/Qt/qt3d/qt-qt3d/tests/manual/model3ds/model3ds.pro
Reading C:/Qt/qt3d/qt-qt3d/tests/manual/navigation1/navigation1.pro
Reading C:/Qt/qt3d/qt-qt3d/tests/manual/qrc/qrc.pro
Reading C:/Qt/qt3d/qt-qt3d/tests/manual/rotation/rotation.pro
Reading C:/Qt/qt3d/qt-qt3d/tests/manual/scaling/scaling.pro
Reading C:/Qt/qt3d/qt-qt3d/tests/manual/shapes/shapes.pro
Reading C:/Qt/qt3d/qt-qt3d/tests/manual/submesh/submesh.pro
Reading C:/Qt/qt3d/qt-qt3d/tests/manual/translation/translation.pro
Reading C:/Qt/qt3d/qt-qt3d/tests/manual/transformations/transformations.pro
Reading C:/Qt/qt3d/qt-qt3d/tests/auto/auto.pro
Reading C:/Qt/qt3d/qt-qt3d/tests/auto/threed/threed.pro
Reading C:/Qt/qt3d/qt-qt3d/tests/auto/threed/qareaallocator/qareaallocator.pro
Reading C:/Qt/qt3d/qt-qt3d/tests/auto/threed/qarray/qarray.pro
Reading C:/Qt/qt3d/qt-qt3d/tests/auto/threed/qbox3d/qbox3d.pro
Reading C:/Qt/qt3d/qt-qt3d/tests/auto/threed/qcolor4ub/qcolor4ub.pro
Reading C:/Qt/qt3d/qt-qt3d/tests/auto/threed/qcustomdataarray/qcustomdataarray.pro
Reading C:/Qt/qt3d/qt-qt3d/tests/auto/threed/qgeometrydata/qgeometrydata.pro
Reading C:/Qt/qt3d/qt-qt3d/tests/auto/threed/qglabstractsurface/qglabstractsurface.pro
Reading C:/Qt/qt3d/qt-qt3d/tests/auto/threed/qglattributedescription/qglattributedescription.pro
Reading C:/Qt/qt3d/qt-qt3d/tests/auto/threed/qglattributeset/qglattributeset.pro
Reading C:/Qt/qt3d/qt-qt3d/tests/auto/threed/qglattributevalue/qglattributevalue.pro
Reading C:/Qt/qt3d/qt-qt3d/tests/auto/threed/qglbezierpatches/qglbezierpatches.pro
Reading C:/Qt/qt3d/qt-qt3d/tests/auto/threed/qglbuilder/qglbuilder.pro
Reading C:/Qt/qt3d/qt-qt3d/tests/auto/threed/qglcamera/qglcamera.pro
Reading C:/Qt/qt3d/qt-qt3d/tests/auto/threed/qglcameraanimation/qglcameraanimation.pro
Reading C:/Qt/qt3d/qt-qt3d/tests/auto/threed/qglcube/qglcube.pro
Reading C:/Qt/qt3d/qt-qt3d/tests/auto/threed/qglindexbuffer/qglindexbuffer.pro
Reading C:/Qt/qt3d/qt-qt3d/tests/auto/threed/qgllightmodel/qgllightmodel.pro
Reading C:/Qt/qt3d/qt-qt3d/tests/auto/threed/qgllightparameters/qgllightparameters.pro
Reading C:/Qt/qt3d/qt-qt3d/tests/auto/threed/qglmaterial/qglmaterial.pro
Reading C:/Qt/qt3d/qt-qt3d/tests/auto/threed/qglmaterialcollection/qglmaterialcollection.pro
Reading C:/Qt/qt3d/qt-qt3d/tests/auto/threed/qglpainter/qglpainter.pro
Reading C:/Qt/qt3d/qt-qt3d/tests/auto/threed/qglpickcolors/qglpickcolors.pro
Reading C:/Qt/qt3d/qt-qt3d/tests/auto/threed/qglrender/qglrender.pro
Reading C:/Qt/qt3d/qt-qt3d/tests/auto/threed/qglscenenode/qglscenenode.pro
Reading C:/Qt/qt3d/qt-qt3d/tests/auto/threed/qglsection/qglsection.pro
Reading C:/Qt/qt3d/qt-qt3d/tests/auto/threed/qglsphere/qglsphere.pro
Reading C:/Qt/qt3d/qt-qt3d/tests/auto/threed/qglvertexbundle/qglvertexbundle.pro
Reading C:/Qt/qt3d/qt-qt3d/tests/auto/threed/qgraphicstransform3d/qgraphicstransform3d.pro
Reading C:/Qt/qt3d/qt-qt3d/tests/auto/threed/qplane3d/qplane3d.pro
Reading C:/Qt/qt3d/qt-qt3d/tests/auto/threed/qray3d/qray3d.pro
Reading C:/Qt/qt3d/qt-qt3d/tests/auto/threed/qglcylinder/qglcylinder.pro
Reading C:/Qt/qt3d/qt-qt3d/tests/auto/threed/qsphere3d/qsphere3d.pro
Reading C:/Qt/qt3d/qt-qt3d/tests/auto/threed/qtriangle3d/qtriangle3d.pro
Reading C:/Qt/qt3d/qt-qt3d/tests/auto/threed/qvectorarray/qvectorarray.pro
Reading C:/Qt/qt3d/qt-qt3d/tests/auto/threed/load_model/load_model.pro
Reading C:/Qt/qt3d/qt-qt3d/tests/auto/threed/qglcolladafxeffectfactory/qglcolladafxeffectfactory.pro
Reading C:/Qt/qt3d/qt-qt3d/tests/auto/cmake/cmake.pro
Das System kann den angegebenen Pfad nicht finden.
Reading C:/Qt/qt3d/qt-qt3d/tests/auto/imports/imports.pro
Reading C:/Qt/qt3d/qt-qt3d/tests/auto/imports/qcapsulemesh/qcapsulemesh.pro
Reading C:/Qt/qt3d/qt-qt3d/tests/auto/imports/qcylindermesh/qcylindermesh.pro
Reading C:/Qt/qt3d/qt-qt3d/tests/auto/imports/qspheremesh/qspheremesh.pro
Reading C:/Qt/qt3d/qt-qt3d/tests/auto/imports/qline/qline.pro
Reading C:/Qt/qt3d/qt-qt3d/tests/auto/imports/qpoint/qpoint.pro
Reading C:/Qt/qt3d/qt-qt3d/tests/auto/qml3d/qml3d.pro
Reading C:/Qt/qt3d/qt-qt3d/tests/auto/qml3d_visual/qml3d_visual.pro
Reading C:/Qt/qt3d/qt-qt3d/tests/auto/qml3d_cpp/qml3d_cpp.pro
Reading C:/Qt/qt3d/qt-qt3d/tests/auto/qml3d_cpp/picking/picking.pro
Reading C:/Qt/qt3d/qt-qt3d/tests/benchmarks/benchmarks.pro
Reading C:/Qt/qt3d/qt-qt3d/tests/benchmarks/qarray/qarray.pro
Reading C:/Qt/qt3d/qt-qt3d/tests/benchmarks/qglbuilder_perf/qglbuilder_perf.pro
Reading C:/Qt/qt3d/qt-qt3d/tests/benchmarks/matrix_properties/matrix_properties.pro
Reading C:/Qt/qt3d/qt-qt3d/tutorials/tutorials.pro
Reading C:/Qt/qt3d/qt-qt3d/tutorials/qt3d/qt3d.pro
Reading C:/Qt/qt3d/qt-qt3d/tutorials/qt3d/penguin/penguin.pro
Reading C:/Qt/qt3d/qt-qt3d/tutorials/qt3d/penguin_advanced/penguin_advanced.pro
Reading C:/Qt/qt3d/qt-qt3d/tutorials/qt3d/cube1/cube1.pro
Reading C:/Qt/qt3d/qt-qt3d/tutorials/qt3d/cube2/cube2.pro
Reading C:/Qt/qt3d/qt-qt3d/tutorials/qt3d/cube3/cube3.pro
Reading C:/Qt/qt3d/qt-qt3d/tutorials/qt3d/cube4/cube4.pro
Reading C:/Qt/qt3d/qt-qt3d/tutorials/quick3d/quick3d.pro
Reading C:/Qt/qt3d/qt-qt3d/tutorials/quick3d/shadertut/shadertut.pro
Reading C:/Qt/qt3d/qt-qt3d/tutorials/quick3d/teapot_bounce_qml/teapot_bounce_qml.pro
Reading C:/Qt/qt3d/qt-qt3d/tutorials/quick3d/teapot_qml/teapot_qml.pro
Project MESSAGE: cmake executable not found. Not running CMake unit tests
14:33:08: Der Prozess "C:\Qt\Qt5.1.1\5.1.1\android_armv7\bin\qmake.exe" wurde normal beendet.
14:33:08: Starte "C:\Qt\Qt5.1.1\Tools\mingw48_32\bin\mingw32-make.exe"
cd src\ && ( if not exist Makefile C:\Qt\Qt5.1.1\5.1.1\android_armv7\bin\qmake.exe C:\Qt\qt3d\qt-qt3d\src\src.pro -spec android-g++ -o Makefile ) && C:/Qt/Qt5.1.1/Tools/mingw48_32/bin/mingw32-make -f Makefile
mingw32-make[1]: Entering directory 'C:/Qt/qt3d/qt-qt3d/src'
cd threed\ && ( if not exist Makefile C:\Qt\Qt5.1.1\5.1.1\android_armv7\bin\qmake.exe C:\Qt\qt3d\qt-qt3d\src\threed\threed.pro -spec android-g++ -o Makefile ) && C:/Qt/Qt5.1.1/Tools/mingw48_32/bin/mingw32-make -f Makefile
mingw32-make[2]: Entering directory 'C:/Qt/qt3d/qt-qt3d/src/threed'
C:\Qt\android-ndk-r8e/toolchains/arm-linux-androideabi-4.7/prebuilt/windows/bin/arm-linux-androideabi-g++ -c -Wno-psabi -march=armv7-a -mfloat-abi=softfp -mfpu=vfp -ffunction-sections -funwind-tables -fstack-protector -fno-short-enums -DANDROID -Wa,--noexecstack -std=gnu++0x -O2 -mthumb -Os -fomit-frame-pointer -fno-strict-aliasing -finline-limit=64 -fvisibility=hidden -fvisibility-inlines-hidden -Wall -Wno-psabi -W -D_REENTRANT -fPIC -DQT_NO_PRINTDIALOG -DQT_NO_XKBCOMMON -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=0x050000 -DQT_NO_DEBUG -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -IC:\Qt\Qt5.1.1\5.1.1\android_armv7\mkspecs\android-g++ -I. -I..\..\include -I..\..\include\Qt3D -IC:/Qt/qt3d/qt-qt3d/include/Qt3D/5.3.0 -IC:/Qt/qt3d/qt-qt3d/include/Qt3D/5.3.0/Qt3D -I..\private -Iglobal -Ipainting -Iarrays -Ieffects -Imaterials -Igeometry -Iviewing -Imath3d -Iscene -Iscene_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\ConvertUTF -I..\..\3rdparty\assimp\contrib\zlib -I..\..\3rdparty\assimp\contrib\irrXML -I..\..\3rdparty\assimp\contrib\unzip -Iscene_bezier -Inetwork -Igraphicsview -Itextures -Isurfaces -Iapi -IC:\Qt\Qt5.1.1\5.1.1\android_armv7\include -IC:\Qt\Qt5.1.1\5.1.1\android_armv7\include\QtOpenGL -IC:\Qt\Qt5.1.1\5.1.1\android_armv7\include\QtWidgets -IC:\Qt\Qt5.1.1\5.1.1\android_armv7\include\QtGui -IC:\Qt\Qt5.1.1\5.1.1\android_armv7\include\QtGui\5.1.1 -IC:\Qt\Qt5.1.1\5.1.1\android_armv7\include\QtGui\5.1.1\QtGui -IC:\Qt\Qt5.1.1\5.1.1\android_armv7\include\QtCore -IC:\Qt\Qt5.1.1\5.1.1\android_armv7\include\QtCore\5.1.1 -IC:\Qt\Qt5.1.1\5.1.1\android_armv7\include\QtCore\5.1.1\QtCore -IC:\Qt\Qt5.1.1\5.1.1\android_armv7\include\QtNetwork -I.moc\release_shared -IC:\Qt\android-ndk-r8e\sources\cxx-stl\gnu-libstdc++\4.7\include -IC:\Qt\android-ndk-r8e\sources\cxx-stl\gnu-libstdc++\4.7\libs\armeabi-v7a\include -IC:\Qt\android-ndk-r8e\platforms\android-9\arch-arm\usr\include -o .obj\release_shared\qglnamespace.obj global\qglnamespace.cpp
In file included from global\qglnamespace.cpp:42:0:
global\qglnamespace.h:45:29: fatal error: Qt3D/qt3dglobal.h: No such file or directory
compilation terminated.
Makefile:8497: recipe for target '.obj\release_shared\qglnamespace.obj' failed
mingw32-make[2]: *** [.obj\release_shared\qglnamespace.obj] Error 1
mingw32-make[2]: Leaving directory 'C:/Qt/qt3d/qt-qt3d/src/threed'
Makefile:40: recipe for target 'sub-threed-make_first-ordered' failed
mingw32-make[1]: *** [sub-threed-make_first-ordered] Error 2
mingw32-make[1]: Leaving directory 'C:/Qt/qt3d/qt-qt3d/src'
mingw32-make: *** [sub-src-make_first] Error 2
makefile:43: recipe for target 'sub-src-make_first' failed
14:33:12: Der Prozess "C:\Qt\Qt5.1.1\Tools\mingw48_32\bin\mingw32-make.exe" wurde mit dem Rückgabewert 2 beendet.
Fehler beim Erstellen/Deployment des Projekts qt3d(Kit: Android für arm (GCC 4.7, Qt 5.1.1)-Qt 5.1.1 for Android armv7)
Bei der Ausführung von Schritt 'Make'
我的其他一些同事说我应该克隆整个存储库,因为下载有问题。在我看来,qmake过程不能正常工作。
的qmake:
qmake.exe C:\Qt\qt3d\qt-qt3d\qt3d.pro -r -spec android-g++
制作:
mingw32-make.exe in C:\Qt\qt3d\qt-qt3d
非常感谢你提前...
答案 0 :(得分:2)
我能解决这个问题。问题是从gitorious定期下载qt-3d。有必要完全克隆那个qt-3d git。这个简单的下载会产生错误,因为头文件没有复制到include文件夹。克隆并编译存储库后,创建了qt-3d库。仍然没有将这些库复制到我的qt5安装中。我必须手动完成(将lib,inc,mkspecs复制到你的qt5安装)。只有在那之后qt3d-module才被识别并且有些可用。
现在我想尝试运行一个示例项目。
14:24:48: Running steps for project teapot...
14:24:48: Configuration unchanged, skipping qmake step.
14:24:48: Starting: "C:\Qt\Qt5.1.1\Tools\mingw48_32\bin\mingw32-make.exe"
C:\Qt\android-ndk-r8e/toolchains/arm-linux-androideabi-4.7/prebuilt/windows/bin/arm-linux-androideabi-g++ -c -Wno-psabi -march=armv7-a -mfloat-abi=softfp -mfpu=vfp -ffunction-sections -funwind-tables -fstack-protector -fno-short-enums -DANDROID -Wa,--noexecstack -std=gnu++0x -O2 -mthumb -Os -fomit-frame-pointer -fno-strict-aliasing -finline-limit=64 -fno-exceptions -Wall -Wno-psabi -W -D_REENTRANT -fPIE -DQT_NO_PRINTDIALOG -DQT_NO_XKBCOMMON -DQT_NO_EXCEPTIONS -DQT_NO_DEBUG -DQT_3D_LIB -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -IC:\Qt\Qt5.1.1\5.1.1\android_armv7\mkspecs\android-g++ -I. -I..\..\..\include -I..\..\..\include\Qt3D -IC:\Qt\Qt5.1.1\5.1.1\android_armv7\include -IC:\Qt\Qt5.1.1\5.1.1\android_armv7\include\QtOpenGL -IC:\Qt\Qt5.1.1\5.1.1\android_armv7\include\QtWidgets -IC:\Qt\Qt5.1.1\5.1.1\android_armv7\include\QtGui -IC:\Qt\Qt5.1.1\5.1.1\android_armv7\include\QtCore -I.moc\release_shared -IC:\Qt\android-ndk-r8e\sources\cxx-stl\gnu-libstdc++\4.7\include -IC:\Qt\android-ndk-r8e\sources\cxx-stl\gnu-libstdc++\4.7\libs\armeabi-v7a\include -IC:\Qt\android-ndk-r8e\platforms\android-14\arch-arm\usr\include -o .obj\release_shared\teapotview.obj teapotview.cpp
C:\Qt\android-ndk-r8e/toolchains/arm-linux-androideabi-4.7/prebuilt/windows/bin/arm-linux-androideabi-g++ -c -Wno-psabi -march=armv7-a -mfloat-abi=softfp -mfpu=vfp -ffunction-sections -funwind-tables -fstack-protector -fno-short-enums -DANDROID -Wa,--noexecstack -std=gnu++0x -O2 -mthumb -Os -fomit-frame-pointer -fno-strict-aliasing -finline-limit=64 -fno-exceptions -Wall -Wno-psabi -W -D_REENTRANT -fPIE -DQT_NO_PRINTDIALOG -DQT_NO_XKBCOMMON -DQT_NO_EXCEPTIONS -DQT_NO_DEBUG -DQT_3D_LIB -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -IC:\Qt\Qt5.1.1\5.1.1\android_armv7\mkspecs\android-g++ -I. -I..\..\..\include -I..\..\..\include\Qt3D -IC:\Qt\Qt5.1.1\5.1.1\android_armv7\include -IC:\Qt\Qt5.1.1\5.1.1\android_armv7\include\QtOpenGL -IC:\Qt\Qt5.1.1\5.1.1\android_armv7\include\QtWidgets -IC:\Qt\Qt5.1.1\5.1.1\android_armv7\include\QtGui -IC:\Qt\Qt5.1.1\5.1.1\android_armv7\include\QtCore -I.moc\release_shared -IC:\Qt\android-ndk-r8e\sources\cxx-stl\gnu-libstdc++\4.7\include -IC:\Qt\android-ndk-r8e\sources\cxx-stl\gnu-libstdc++\4.7\libs\armeabi-v7a\include -IC:\Qt\android-ndk-r8e\platforms\android-14\arch-arm\usr\include -o .obj\release_shared\main.obj main.cpp
C:\Qt\Qt5.1.1\5.1.1\android_armv7\bin\moc.exe -DQT_NO_PRINTDIALOG -DQT_NO_XKBCOMMON -DQT_NO_EXCEPTIONS -DQT_NO_DEBUG -DQT_3D_LIB -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -IC:\Qt\Qt5.1.1\5.1.1\android_armv7\mkspecs\android-g++ -I. -I..\..\..\include -I..\..\..\include\Qt3D -IC:\Qt\Qt5.1.1\5.1.1\android_armv7\include -IC:\Qt\Qt5.1.1\5.1.1\android_armv7\include\QtOpenGL -IC:\Qt\Qt5.1.1\5.1.1\android_armv7\include\QtWidgets -IC:\Qt\Qt5.1.1\5.1.1\android_armv7\include\QtGui -IC:\Qt\Qt5.1.1\5.1.1\android_armv7\include\QtCore -I.moc\release_shared -IC:\Qt\android-ndk-r8e\sources\cxx-stl\gnu-libstdc++\4.7\include -IC:\Qt\android-ndk-r8e\sources\cxx-stl\gnu-libstdc++\4.7\libs\armeabi-v7a\include -IC:\Qt\android-ndk-r8e\platforms\android-14\arch-arm\usr\include -I/usr/include -I/usr/local/include teapotview.h -o .moc\release_shared\moc_teapotview.cpp
C:\Qt\android-ndk-r8e/toolchains/arm-linux-androideabi-4.7/prebuilt/windows/bin/arm-linux-androideabi-g++ -c -Wno-psabi -march=armv7-a -mfloat-abi=softfp -mfpu=vfp -ffunction-sections -funwind-tables -fstack-protector -fno-short-enums -DANDROID -Wa,--noexecstack -std=gnu++0x -O2 -mthumb -Os -fomit-frame-pointer -fno-strict-aliasing -finline-limit=64 -fno-exceptions -Wall -Wno-psabi -W -D_REENTRANT -fPIE -DQT_NO_PRINTDIALOG -DQT_NO_XKBCOMMON -DQT_NO_EXCEPTIONS -DQT_NO_DEBUG -DQT_3D_LIB -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -IC:\Qt\Qt5.1.1\5.1.1\android_armv7\mkspecs\android-g++ -I. -I..\..\..\include -I..\..\..\include\Qt3D -IC:\Qt\Qt5.1.1\5.1.1\android_armv7\include -IC:\Qt\Qt5.1.1\5.1.1\android_armv7\include\QtOpenGL -IC:\Qt\Qt5.1.1\5.1.1\android_armv7\include\QtWidgets -IC:\Qt\Qt5.1.1\5.1.1\android_armv7\include\QtGui -IC:\Qt\Qt5.1.1\5.1.1\android_armv7\include\QtCore -I.moc\release_shared -IC:\Qt\android-ndk-r8e\sources\cxx-stl\gnu-libstdc++\4.7\include -IC:\Qt\android-ndk-r8e\sources\cxx-stl\gnu-libstdc++\4.7\libs\armeabi-v7a\include -IC:\Qt\android-ndk-r8e\platforms\android-14\arch-arm\usr\include -o .obj\release_shared\moc_teapotview.obj .moc\release_shared\moc_teapotview.cpp
C:\Qt\android-ndk-r8e/toolchains/arm-linux-androideabi-4.7/prebuilt/windows/bin/arm-linux-androideabi-g++ --sysroot=C:\Qt\android-ndk-r8e/platforms/android-14/arch-arm/ -Wl,-soname,libteapot.so -Wl,-rpath-link=C:/Qt/Qt5.1.1/5.1.1/android_armv7/lib -Wl,--no-undefined -Wl,-z,noexecstack -shared -o ..\..\..\bin\libteapot.so .obj\release_shared\teapotview.obj .obj\release_shared\main.obj .obj\release_shared\moc_teapotview.obj -LC:\Qt\android-ndk-r8e/sources/cxx-stl/gnu-libstdc++/4.7/libs/armeabi-v7a -LC:\Qt\android-ndk-r8e/platforms/android-14/arch-arm//usr/lib -LC:/Qt/qt-3d/lib -lQt53D -lgnustl_shared -lsupc++ -llog -lz -lm -ldl -lc -lgcc -LC:\Qt\Qt5.1.1\5.1.1\android_armv7\lib -lQt5OpenGL -lQt5Widgets -lQt5Gui -lQt5Core -lGLESv2
14:24:56: The process "C:\Qt\Qt5.1.1\Tools\mingw48_32\bin\mingw32-make.exe" exited normally.
14:24:56: Elapsed time: 00:08.
因此,茶壶示例的编辑看起来很好。但部署失败......
14:27:22: The process "C:\Qt\Qt5.1.1\Tools\mingw48_32\bin\mingw32-make.exe" exited normally.
14:27:22: Starting: "C:\Qt\Qt5.1.1\Tools\mingw48_32\bin\mingw32-make.exe" INSTALL_ROOT="C:\Qt\qt-3d\examples\qt3d\teapot\android" install
Die Syntax fr den Dateinamen, Verzeichnisnamen oder die Datentr„gerbezeichnung ist falsch.
makefile:1686: recipe for target 'install_target' failed
mingw32-make: *** [install_target] Error 1
14:27:24: The process "C:\Qt\Qt5.1.1\Tools\mingw48_32\bin\mingw32-make.exe" exited with code 2.
Error while building/deploying project teapot (kit: Android für arm (GCC 4.7, Qt 5.1.1)-Qt 5.1.1 for Android armv7)
When executing step 'Anwendungsdaten kopieren'
14:27:24: Elapsed time: 00:04.
部署后,Normaly应该创建一个apk文件,但不会发生这种情况。对于该茶壶示例,创建了一个带有一些obj文件的.obj文件夹,但是创建可执行文件失败了。
答案 1 :(得分:1)
我在尝试编译qt3d 1.x for Qt 4.8.4 for BB10时遇到了同样的错误。缺少的标题是一些私有标题,这些标题在BB NDK的预构建Qt SDK中不可用,但是如果您下载Qt源并自行编译它们,它们就可用。我没有为Q10 4.8.4编译Qt 4.8.4,而是搜索了Qt 4.8.4的头文件名,并将它们复制到我现有Qt安装的相应位置。希望有所帮助。