QT 3/Windows Free Edition: MinGW cross compiler

Stefan Jahn stefan at gruft.de
Tue Mar 1 09:45:10 CET 2005


Hello!

>> Using the snapshot from yersterday (Qt 3.3.3) I was able to compile
>> the Qt sources using a MinGW cross compiler on my GNU/Linux.  The cross
>> compiler is based on s MinGW release about a year old.  I had to
>> made changes during the make run in:
>>  - Makefile's
>>  - headers
>>  - source files
>> The changes were minimal, but essential.  Unfortunately I wasn't able to
>> link the stuff because the ld tries to consumes about 180M of memory
>> which
>> I actually don't have @ my laptop.  Very very sad... so close.
>>
>> Anyway. Are you interested in the changes?
> It would be interesting to see what you had to change and how you set up
> your crosscompiler. Maybe you can make a compile instruction (see
> http://kde-cygwin.sourceforge.net/qt3-win32/compile-mingw.php).
>
> It consumes even more than 180MB - and tooks really long (more than 1hour
> on
> my duron 1300/512MB). MinGW's ld.exe seems to have problems:
> http://lists.trolltech.com/qt-interest/2004-11/msg00516.html

What I have done so far:

 - using 'i386-mingw32-gcc --version' -> 2.95.3-6
 - updates my cross-setup: binutils (including ld), mingw-runtime and
   w32api for cross-compiler
 - QMAKESPEC=win32-g++
 - ./configure -xplatform win32-g++
 - then apply the patch qt.diff (see attachment)
 - qmake isn't really meant to create files for cross-compilation, that's
   why I had to modify in the Makefiles:
     QMAKE_CXX  = i386-mingw32-g++
     QMAKE_CC   = i386-mingw32-gcc
     CXXFLAGS  += -fvtable-thunks
     QMAKE_LINK = i386-mingw32-g++
 - compilation worked fine
 - in order to link I tried:
     $ dd if=/dev/zero of=swappi bs=1M count=1024
     $ mkswap swappi
     $ swapon swappi
   though 1G of swap I had to wait about 10 hours, then my oom-killer
   killed the process, looks like 1G of virtual memory was not enough

So no luck with MinGW here.  Anyway I tried the native
setup-qt-win-msvc-3.1.0-b1.exe file and compiled my Qt application with
VC6.  Basically it works.  What is not working:

  - .png files can't be used
  - apparently something wrong with QProcess (the app tries to run
    helper programs (partly with stdin/stdout piping), but can't)
  - there is no print dialog

Anything else works like charm and looks great.  Good job!  Are the issues
known to you and are they going to be fixed?  Or are these already fixed
in the Qt 3.3.3 port?  If so:  Can someone create a binary release for
vc6 (I only see for .net)?

Thanks in addvance, Stefan.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: qt.diff
Url: http://mail.kde.org/pipermail/kde-cygwin/attachments/20050301/3f18e8dc/qt.cc


More information about the kde-cygwin mailing list