[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-cygwin
Subject:    Re: QT 3/Windows Free Edition: MinGW cross compiler
From:       "Stefan Jahn" <stefan () gruft ! de>
Date:       2005-03-01 8:45:10
Message-ID: 7519.217.10.50.85.1109666710.squirrel () service ! rules ! org
[Download RAW message or body]

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.

["qt.diff" (text/plain)]

diff -ur qt-3-orig/mkspecs/win32-g++/qtcrtentrypoint.cpp qt-3/mkspecs/win32-g++/qtcrtentrypoint.cpp
--- qt-3-orig/mkspecs/win32-g++/qtcrtentrypoint.cpp	Tue Feb 15 00:01:39 2005
+++ qt-3/mkspecs/win32-g++/qtcrtentrypoint.cpp	Thu Feb 24 22:53:22 2005
@@ -15,6 +15,8 @@
  * any new files created by the user.
  */
 
+extern "C" int       _setmode (int, int);
+extern "C" void            _fpreset (void);        /* Reset the FPU */
 extern int _fmode; 
 extern "C"  int* __p__fmode(void); /* To access the dll _fmode */
 extern int _CRT_fmode;
diff -ur qt-3-orig/src/kernel/qfontdatabase_win.cpp qt-3/src/kernel/qfontdatabase_win.cpp
--- qt-3-orig/src/kernel/qfontdatabase_win.cpp	Thu Feb 17 00:01:46 2005
+++ qt-3/src/kernel/qfontdatabase_win.cpp	Sun Feb 27 07:04:56 2005
@@ -40,6 +40,7 @@
 
 #include <qdatetime.h>
 #include <qpaintdevicemetrics.h>
+#include <ctype.h>
 
 #include "qt_windows.h"
 
diff -ur qt-3-orig/src/kernel/qfontengine_win.cpp qt-3/src/kernel/qfontengine_win.cpp
--- qt-3-orig/src/kernel/qfontengine_win.cpp	Sun Feb 13 00:01:08 2005
+++ qt-3/src/kernel/qfontengine_win.cpp	Sun Feb 27 00:00:33 2005
@@ -32,6 +32,7 @@
 ** not clear to you.
 **
 **********************************************************************/
+#include <windows.h>
 #include <limits.h>
 
 #include "qbitmap.h"
diff -ur qt-3-orig/src/kernel/qt_windows.h qt-3/src/kernel/qt_windows.h
--- qt-3-orig/src/kernel/qt_windows.h	Mon Dec 20 00:01:32 2004
+++ qt-3/src/kernel/qt_windows.h	Thu Feb 24 17:45:17 2005
@@ -27,6 +27,7 @@
 #endif
 
 #include <windows.h>
+#include <ole2.h>
 
 #include "qnamespace.h"
 
diff -ur qt-3-orig/src/tools/quuid.h qt-3/src/tools/quuid.h
--- qt-3-orig/src/tools/quuid.h	Sun Jan 30 00:01:48 2005
+++ qt-3/src/tools/quuid.h	Sun Feb 27 07:02:09 2005
@@ -43,6 +43,8 @@
 #endif // QT_H
 
 #include <string.h>
+#include <windows.h>
+#include <winnt.h>
 
 #if defined(Q_OS_WIN32)
 #ifndef GUID_DEFINED

_______________________________________________
kde-cygwin mailing list
kde-cygwin@kde.org
https://mail.kde.org/mailman/listinfo/kde-cygwin


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic