MARTIN Pierre schreef op vr 11-05-2012 om 15:58 [+0200]: > Now, i am trying to configure Qt 4.8.1 to compile it with MinGW-w64 (i > am willing to compile it on windows XP 32 bits for Windows XP 32 > bits). But my problem right now is that i can't seem to understand how > to give it the build triplet. i have tried pretty much everything that > would usually work, but it just fails.
The qmake build system doesn't work with build triplets, but with so-called mkspecs profiles. These profiles are located in the mkspecs folder which is part of the Qt source tarball. If you open the file mkspecs/win32-g++/qmake.conf in an editor you can set all the compiler arguments. For compiling Qt on a Windows host it shouldn't be necessary to make any modifications to this file (depending on the compiler toolchain you have installed). When cross-compiling Qt from (for example) a Linux host it is needed to adjust this profile or create your own. In Fedora Linux we created our own mkspecs profiles called win32-g++-cross (for win32, [1]) and win32-g++-cross-x64 (for win64, [2]). > Creating qmake. Please wait... > g++ -c -o project.o -DQMAKE_OPENSOURCE_EDITION -g -I. -Igenerators > -Igenerators/unix -Igenerators/win32 -Igenerators/mac > -Igenerators/symbian -Igenerators/integrity > -I/QtSDK/Desktop/Qt/4.8.1/i686-w64-mingw32/include > -I/QtSDK/Desktop/Qt/4.8.1/i686-w64-mingw32/include/QtCore > -I/QtSDK/Desktop/Qt/4.8.1/i686-w64-mingw32/src/corelib/global > -I/QtSDK/Desktop/Qt/4.8.1/i686-w64-mingw32/src/corelib/xml > -I/QtSDK/Desktop/Qt/4.8.1/i686-w64-mingw32/tools/shared -DQT_NO_PCRE > -DQT_BUILD_QMAKE -DQT_BOOTSTRAPPED -DQLIBRARYINFO_EPOCROOT > -DQT_NO_TEXTCODEC -DQT_NO_UNICODETABLES -DQT_NO_COMPONENT -DQT_NO_STL > -DQT_NO_COMPRESS > -I/QtSDK/Desktop/Qt/4.8.1/i686-w64-mingw32/mkspecs/win32-g++ > -DHAVE_QCONFIG_CPP -DQT_NO_THREAD -DQT_NO_QOBJECT -DQT_NO_GEOM_VARIANT > -DQT_NO_DEPRECATED project.cpp > g++.exe: error: CreateProcess: No such file or directory > make.exe: *** [project.o] Error 1 This output sounds like a broken build environment. It looks like the g++.exe binary fails to start. Does manually running g++.exe work? It may also be caused by a broken make.exe which fails to launch other binaries > Is there anyone here successfull in compiling Qt 4.8.1 with MinGW-w64 > using MSys? If yes, how? I wouldn't recommend compiling from a msys environment as it is awfully slow. Cross-compiling from a Linux host is way faster. As already mentioned by Ruben we've been successful in cross-compiling Qt using Fedora Linux and openSuSE Linux. The 'build recipe' for Fedora can be found at [3]. This 'build recipe' builds a release/static copy, a debug/shared copy, and a release/shared copy of Qt for both win32 and win64 targets) Kind regards, Erik van Pienbroek [1]: http://pkgs.fedoraproject.org/gitweb/?p=mingw-qt.git;a=blob;f=qmake.conf.win32 [2]: http://pkgs.fedoraproject.org/gitweb/?p=mingw-qt.git;a=blob;f=qmake.conf.win64 [3]: http://pkgs.fedoraproject.org/gitweb/?p=mingw-qt.git;a=blob;f=mingw-qt.spec ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ Mingw-w64-public mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
