Build Qt für Android mit MinGW

Alles rund um die Programmierung mit Qt
Antworten
cyberduck
Beiträge: 16
Registriert: 14. Juli 2010 12:07

Build Qt für Android mit MinGW

Beitrag von cyberduck »

Hallo,

beim Kompilieren von Qt 5.2.1 mit MinGW erhalte ich unter Windows 7 SP1 32-Bit die folgende Fehlermeldungen. Wie kann ich das Problem beheben?

Code: Alles auswählen

mingw32-make[3]: Entering directory 'C:/qt/qtactiveqt/src/tools'
cd idc\ && ( if not exist Makefile C:\qt\qtbase\bin\qmake C:\qt\qtactiveqt\src\t
ools\idc\idc.pro -o Makefile ) && mingw32-make -f Makefile
mingw32-make[4]: Entering directory 'C:/qt/qtactiveqt/src/tools/idc'
mingw32-make -f Makefile.Release
mingw32-make[5]: Entering directory 'C:/qt/qtactiveqt/src/tools/idc'
g++ -c -pipe -fno-keep-inline-dllexport -O2 -std=c++0x -fno-exceptions -frtti -W
all -Wextra -DUNICODE -DQT_NO_XKBCOMMON -DQT_NO_EXCEPTIONS -DQT_NO_DEBUG -DQT_BO
OTSTRAP_LIB -DQT_BOOTSTRAPPED -DQT_LITE_UNICODE -DQT_NO_CAST_TO_ASCII -DQT_NO_CO
DECS -DQT_NO_DATASTREAM -DQT_NO_LIBRARY -DQT_NO_QOBJECT -DQT_NO_SYSTEMLOCALE -DQ
T_NO_THREAD -DQT_NO_UNICODETABLES -DQT_NO_USING_NAMESPACE -DQT_NO_DEPRECATED -DQ
T_NO_TRANSLATION -DQT_QMAKE_LOCATION="C:/qt/qtbase/bin/qmake" -I. -I"C:\qt\qtbas
e\include" -I"C:\qt\qtbase\include\QtCore" -I"C:\qt\qtbase\include\QtXml" -I"C:\
qt\qtbase\include\QtCore\5.2.1" -I"C:\qt\qtbase\include\QtCore\5.2.1\QtCore" -I"
C:\qt\qtbase\include\QtXml\5.2.1" -I"C:\qt\qtbase\include\QtXml\5.2.1\QtXml" -I"
C:\qt\qtbase\include" -I"C:\icu\include" -I"C:\qt\qtbase\mkspecs\win32-g++" -o .
obj\release\main.o main.cpp
g++ -Wl,-s -Wl,-subsystem,console -o C:\qt\qtbase\bin\idc.exe .obj/release/main.
o  -Lc:\qt\qtbase\lib -Lc:\icu\lib -LC:/qt/qtbase/lib -lQt5Bootstrap -luser32 -l
ole32 -ladvapi32
.obj/release/main.o:main.cpp:(.text+0x1c9): undefined reference to `QProcess::QP
rocess(QObject*)'
.obj/release/main.o:main.cpp:(.text+0x1dc): undefined reference to `QProcess::sy
stemEnvironment()'
.obj/release/main.o:main.cpp:(.text+0x401): undefined reference to `QLibraryInfo
::location(QLibraryInfo::LibraryLocation)'
.obj/release/main.o:main.cpp:(.text+0x617): undefined reference to `QProcess::se
tEnvironment(QStringList const&)'
.obj/release/main.o:main.cpp:(.text+0x632): undefined reference to `QProcess::st
art(QString const&, QFlags<QIODevice::OpenModeFlag>)'
.obj/release/main.o:main.cpp:(.text+0x645): undefined reference to `QProcess::wa
itForFinished(int)'
.obj/release/main.o:main.cpp:(.text+0x651): undefined reference to `QProcess::ex
itCode() const'
.obj/release/main.o:main.cpp:(.text+0x6e0): undefined reference to `QProcess::~Q
Process()'
c:/mingw/bin/../lib/gcc/i686-w64-mingw32/4.8.0/../../../../i686-w64-mingw32/bin/
ld.exe: .obj/release/main.o: bad reloc address 0x1b in section `.text$_Z7fprintf
P6_iobufPKcz[__Z7fprintfP6_iobufPKcz]'
collect2.exe: error: ld returned 1 exit status
Makefile.Release:77: recipe for target 'C:\qt\qtbase\bin\idc.exe' failed
mingw32-make[5]: *** [C:\qt\qtbase\bin\idc.exe] Error 1
mingw32-make[5]: Leaving directory 'C:/qt/qtactiveqt/src/tools/idc'
Makefile:34: recipe for target 'release' failed
mingw32-make[4]: *** [release] Error 2
mingw32-make[4]: Leaving directory 'C:/qt/qtactiveqt/src/tools/idc'
Makefile:38: recipe for target 'sub-idc-make_first' failed
mingw32-make[3]: *** [sub-idc-make_first] Error 2
mingw32-make[3]: Leaving directory 'C:/qt/qtactiveqt/src/tools'
Makefile:82: recipe for target 'sub-tools-make_first-ordered' failed
mingw32-make[2]: *** [sub-tools-make_first-ordered] Error 2
mingw32-make[2]: Leaving directory 'C:/qt/qtactiveqt/src'
Makefile:41: recipe for target 'sub-src-make_first' failed
mingw32-make[1]: *** [sub-src-make_first] Error 2
mingw32-make[1]: Leaving directory 'C:/qt/qtactiveqt'
makefile:314: recipe for target 'module-qtactiveqt-make_first' failed
mingw32-make: *** [module-qtactiveqt-make_first] Error 2
Diese Umgebungsvariablen wurden gesetzt:

Code: Alles auswählen

SETX QMAKESPEC "win32-g++"
SETX QTDIR "c:\qt"
SETX include "c:\qt\qtbase\include;c:\icu\include"
SETX lib "c:\qt\qtbase\lib;c:\icu\lib"
SETX PATH "c:\perl\perl\bin;c:\perl\perl\site\bin;c:\mingw\bin;c:\qt\qtbase\bin;c:\qt\qtrepotools\bin;c:\qt\gnuwin32\bin;c:\python\installdir;c:\icu\bin"

SETX ANDROID_NDK_PLATFORM "android-9"
SETX ANDROID_TARGET_ARCH "armeabi-v7a"
SETX ANDROID_BUILD_TOOLS_REVISION "19.0.2"
SETx ANDROID_NDK_HOST "windows"
Danach wurde Qt so konfigureirt und das kommpilieren gestartet:

Code: Alles auswählen

configure -platform win32-g++ -debug-and-release -opengl desktop -xplatform android-g++ -android-ndk c:\android-ndk -android-sdk c:\android-sdk -android-toolchain-version 4.7 -opensource
Antworten