Root of that problem with float.h is 2 different version of this file
  • %MINGW%\include\float.h
  • %MINGW%\include\с++\4.1.1\float.h


The including %MINGW%\include\float.h are means also including
%MINGW%\include\с++\4.1.1\float.h, look at line "#include_next<float.h>"
The including %MINGW%\include\с++\4.1.1\float.h are means including
just one this file and losing _clear87 declaration.
Include dirs must be in right order (%MINGW%\include is first).

I use:
  • binutils-2.17.50-20060824.tar.gz
  • mingw-runtime-3.11.tar.gz
  • mingw-make-3.80.0-3.tar.gz
  • w32api-3.8.tar.gz
  • Compiled from source GCC version 4.1.1


To compile Qt 4.2.2 Open Source Edition with MinGW GCC 4.1.1 do this:

  1. Create new environment variable with correct include dirs order:
    CPLUS_INCLUDE_PATH=%MINGW%\include;%MINGW%\include \с++\4.1.1;%MINGW%\lib\gcc\mingw32\4.1.1\inclu de
    (Or remove "#include_next<float.h>" in %MINGW%\include\float.h
    and add "#include_next<float.h>" in %MINGW%\include\с++\4.1.1\float.h)
    I don't know how compile %MINGW%\libexec\gcc\mingw32\4.1.1\cc1plus.exe with
    correct inlude dir order inside. Please, tell me if you know.

    (Correct several small bugs)
  2. Add to begin of file %QTDIR%\src\corelib\kernel\qeventdispatcher_win.cp p
    this declaration (any place before line 150: "QEventDispatcherWin32Private::~QEventDispatcherWi n32Private()"):
    LRESULT CALLBACK qt_internal_proc(HWND hwnd, UINT message, WPARAM wp, LPARAM lp);
  3. Replace line 578 in file %QTDIR%\src\gui\kernel\qkeymapper_win.cpp
    from:
    LCID newLCID = MAKELCID(GetKeyboardLayout(0), SORT_DEFAULT);
    to:
    LCID newLCID = MAKELCID(LOWORD(GetKeyboardLayout(0)), SORT_DEFAULT);
  4. Add to begin of file %QTDIR%\src\gui\qwininputcontext_win.cpp
    this declaration (any place before line 451: "bool QWinInputContext::endComposition()"):
    extern bool qt_sendSpontaneousEvent(QObject *receiver, QEvent *event); // in qapplication_xxx.cpp
  5. Compilation qaccessible_win.cpp will generate some errors.
    I just "configure -no-accessibility"

Now you can complile Qt "mingw32-make".

P.S. Sorry my little English. My mother tongue is Russian.