PDA

View Full Version : Crosscompile Qt in Linux



Morea
8th April 2006, 01:43
Hi.
Is it possible to setup Linux and gcc so that I can compile my Qt apps in Linux, but compile them both for both Linux and MS Windows (and perhaps even Mac) with gcc?
Any advice on how to do it, if possible?

ankurjain
8th April 2006, 08:04
Hi,
i think u can write the platform specific codes in your .cpp files, .h files and .pro file also so that it may compile and make an executable for all platforms, but compiling for other platform on some other platform, i don think its possible.

But what u want to do by getting the exec. for all the platforms ... they gonna work the same way ... though the look and feel can be different on them all..

Then also this is my thinking .... somebody experienced can put some more light on this topic

L.Marvell
8th April 2006, 12:08
As I know you may compile and install crosscompiler under Linux, for example MinGW (http://mingw.org) and compile windows executables with it. Also read this: build a Win32 x-compiler for Linux (http://mingw.org/MinGWiki/index.php/build%20a%20Win32%20x-compiler%20for%20Linux)
P.S. My attempt to compile it failed. Please share your experience with us.

jrideout
9th April 2006, 19:14
I have had success compiling very simple w32 apps on linux with the debian packges for ming32 on my debian box. I haven't tried with Qt. I think you would have to compile the windows qt4 with ming and possible hack them to use the wine libs for a the system calls, I'm not sure.

e8johan
13th April 2006, 19:19
If you take the libs from $QTDIR/lib and headers from $QTDIR/include your aught to be able to build a cross compiled mingw-compatible version using the Qt-dlls provided with the win32 version of Qt.