[Qt-interest] Cross-compiling Qt (linux -> windows)
Atlant Schmidt
aschmidt at dekaresearch.com
Wed Sep 21 13:30:32 CEST 2011
Victor:
(Slightly OT)
This seems like an awful lot of time and work spent just
to avoid using Windows, and you still need to test on
Windows, right?
Atlant
From: qt-interest-bounces+aschmidt=dekaresearch.com at qt.nokia.com [mailto:qt-interest-bounces+aschmidt=dekaresearch.com at qt.nokia.com] On Behalf Of Victor Leschuk
Sent: Wednesday, September 21, 2011 05:53
To: qt-interest at qt.nokia.com
Subject: [Qt-interest] Cross-compiling Qt (linux -> windows)
Hello all,
I am trying to cross-compile Qt 4.7.4 from Linux x86_64 for Windows x86_64 using the following toolchain:
$ x86_64-w64-mingw32-g++ --version
x86_64-w64-mingw32-g++ (GCC) 4.5.4 20110822 (prerelease)
Found some articles/mails regarding this point int the web:
http://lists.trolltech.com/qt-interest/200...ead00351-0.html<http://lists.trolltech.com/qt-interest/2006-03/thread00351-0.html>
http://silmor.de/29 (also rather unclear to me part http://silmor.de/38 )
Most guys who did it recommend to build Qt libs on a windows host and than put them to Linux host for linkage.
I also took a look at cross-compiliing Qt for embedded systems from official docs.
I tried the following actions:
- Edit win32-g++ qmake.conf: make it use my cross-compiler and add some defines (-DWIN32 -DUNICODE)
- ./configure -platform win32-g++ ....
After that I get an error
x86_64-w64-mingw32-g++ -c -o qfsfileengine_unix.o -DWIN32 -DUNICODE -DQMAKE_OPENSOURCE_EDITION -g -I. -Igenerators -Igenerators/unix -Igenerators/win32 -Igenerators/mac -Igenerators/symbian -I/home/del/Downloads/qt/include -I/home/del/Downloads/qt/include/QtCore -I/home/del/Downloads/qt/src/corelib/global -I/home/del/Downloads/qt/src/corelib/xml -I/home/del/Downloads/qt/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/home/del/Downloads/qt/mkspecs/win32-g++ -DHAVE_QCONFIG_CPP -DQT_NO_THREAD -DQT_NO_QOBJECT -DQT_NO_GEOM_VARIANT /home/del/Downloads/qt/src/corelib/io/qfsfileengine_unix.cpp
In file included from /home/del/Downloads/qt/include/QtCore/private/qcore_unix_p.h:1:0,
from /home/del/Downloads/qt/src/corelib/io/qfsfileengine_unix.cpp:45:
/home/del/Downloads/qt/include/QtCore/private/../../../src/corelib/kernel/qcore_unix_p.h:59:3: error: #error "qcore_unix_p.h included on a non-Unix system"
In file included from /home/del/Downloads/qt/include/QtCore/private/qcore_unix_p.h:1:0,
from /home/del/Downloads/qt/src/corelib/io/qfsfileengine_unix.cpp:45:
/home/del/Downloads/qt/include/QtCore/private/../../../src/corelib/kernel/qcore_unix_p.h:66:22: fatal error: sys/wait.h: No such file or directory
compilation terminated.
make: *** [qfsfileengine_unix.o] Error 1
It seems that configure scripts somehow detect that running host is unix and use inappropriate defines and headers.
Did anyone manage to build Qt from Linux to Windows? If yes, please advice what am I doing wrong?
Thanks in advance.
--
Victor
Click here<https://www.mailcontrol.com/sr/7dmZldS1k9fTndxI!oX7UhHqCnr9FF1iVvMk7ezXL7YpxIvgJ5!yVRM8l5LFo75oWfSYUxmh2czwq3xXRfv08Q==> to report this email as spam.
________________________________
This e-mail and the information, including any attachments, it contains are intended to be a confidential communication only to the person or entity to whom it is addressed and may contain information that is privileged. If the reader of this message is not the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please immediately notify the sender and destroy the original message.
Thank you.
Please consider the environment before printing this email.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20110921/d57d4f9b/attachment.html
More information about the Qt-interest-old
mailing list