Solved Cross Compile Qt
-
I'm trying to cross-compile Qt5.9.3 host(MinGw64 - 5.3.0 - officially supported) target(RPI 3 Stretch linux arm toolchain)
C:\Qt\Qt5.9.3\qt-build>C:\Qt\Qt5.9.3\configure -platform win32-g++ -xplatform linux-arm-gnueabi-g++ -release -linuxfb -device linux-rasp-pi3-g++ -sysroot C:/SysGCC/Raspberry/arm-linux-gnueabihf/sysroot + cd qtbase + C:\Qt\Qt5.9.3\qtbase\configure.bat -top-level -platform win32-g++ -xplatform linux-arm-gnueabi-g++ -release -linuxfb -device linux-rasp-pi3-g++ -sysroot C:/SysGCC/Raspberry/arm-linux-gnueabihf/sysroot Bootstrapping qmake ... mingw32-make: Nothing to be done for 'first'. ERROR: Cannot specify both -xplatform and -device.
It seems it's the only way(using xplatform and device parameters) to cross compile qt?
-
It was doing good until it gets this part;
g++ -o "../bin/qmake.exe" project.o option.o property.o main.o ioutils.o proitems.o qmakevfs.o qmakeglobals.o qmakeparser.o qmakeevaluator.o qmakebuiltins.o makefile.o unixmake2.o unixmake.o mingw_make.o winmakefile.o projectgenerator.o meta.o makefiledeps.o metamakefile.o xmloutput.o pbuilder_pbx.o msvc_vcproj.o msvc_vcxproj.o msvc_nmake.o msvc_objectmodel.o msbuild_objectmodel.o qtextcodec.o qutfcodec.o qstring.o qstring_compat.o qstringbuilder.o qtextstream.o qiodevice.o qringbuffer.o qdebug.o qmalloc.o qglobal.o qarraydata.o qbytearray.o qbytearraymatcher.o qdatastream.o qbuffer.o qlist.o qfiledevice.o qfile.o qfilesystementry.o qfilesystemengine.o qfsfileengine.o qfsfileengine_iterator.o qregexp.o qbitarray.o qdir.o qdiriterator.o quuid.o qhash.o qfileinfo.o qdatetime.o qstringlist.o qabstractfileengine.o qtemporaryfile.o qmap.o qmetatype.o qsettings.o qsystemerror.o qvariant.o qvsnprintf.o qlocale.o qlocale_tools.o qlinkedlist.o qnumeric.o qcryptographichash.o qxmlstream.o qxmlutils.o qlogging.o qoperatingsystemversion.o qjson.o qjsondocument.o qjsonparser.o qjsonarray.o qjsonobject.o qjsonvalue.o qfilesystemengine_win.o qfilesystemiterator_win.o qfsfileengine_win.o qlocale_win.o qsettings_win.o qoperatingsystemversion_win.o qsystemlibrary.o registry.o qlibraryinfo.o -static -s -lole32 -luuid -ladvapi32 -lkernel32 -Wl,--gc-sections Info: creating super cache file C:\Qt\Qt5.9.3\qt-build\.qmake.super ERROR: Cannot specify both -xplatform and -device. C:\Qt\Qt5.9.3\qt-build>qtbase\bin\qmake.exe -v QMake version 3.1 Using Qt version 5.9.3 in C:/Qt/Qt5.9.3/qt-build/qtbase/bin/lib
-
Hi,
Just remove the
-xplatform
option as the-device
option should set everything needed for cross-compilation tailored to that device.