[Qt-interest] Cross-compiling Win32 applications on Mac OS X

Konstantin Tokarev annulen at yandex.ru
Tue Mar 1 17:17:10 CET 2011



01.03.2011, 17:39, "Stefan Schmidt" <stschmail at gmx.de>:
> Hi,
> I have been working on a solution to cross-compile win32 applications on Snow Leopard. After several compiles and testing, I could finally create a MinGW cross-compiler (GCC 4.5.2) as well as compile Qt 4.7.2 using this compiler.
> To see this in action take a look at
> http://www.youtube.com/watch?v=7fMveh_Akgw
>
> If you want to have this yourself, first build and install a cross-compiler using the makefile provided below. To do this, set the path for the toolchain in the makefile's PREFIX variable. If you need root privileges, try commenting out the sudo line below it.
> After that, run
>   # make -f Makefile.cross-compiler
> and wait a while. Make sure that the PREFIX/bin directory is in your path, i.e. run
>   # export PATH=$PATH:PREFIX/bin  # replace PREFIX with the path you chose in the makefile.
>
> After that, create an empty directory and unpack qt-everywhere-opensource-src-4.7.2.tar.gz there. Put the configure and configure-win32 files next to the newly created qt-everywhere-opensource-src-4.7.2 directory. Finally run
>   # ./configure win32 && cd build-win32-4.7.2 && make && make install
> This will certainly take some time but at last, you will have a cross-compiled Qt in /usr/local/qt/4.7.2-win32. If you don't like that path, change the prefix variable in the configure script provided.
>
> One last word on library dependencies: The MinGW will include a dependency on mingwm10.dll in the Qt libraries. You can pick that from the compiler's PREFIX/i586-mingw32msvc/bin directory.
>
> Enjoy your new cross-compiled Qt-4.7.2!


Or get Gentoo Prefix, install crossdev and build any cross-compiler with one command :)


-- 
Regards,
Konstantin



More information about the Qt-interest-old mailing list