I am attempting to install QT 4.2.2 Commercial on a Windows XP Pro system using Mingw. I also have MySQL Server 5.0 installed and want to include the drivers for mysql in the installation. Here is the configure line I use:

C:\Qt\4.2.2>configure -static -platform win32-g++ -qt-zlib -qt-gif -I "c:\MySQL\include" -L "c:\MySQL\lib" -qt-sql-mysql -qt-sql-sqlite -qt-sql-odbc

The configure completes successfully. I then type "mingw-make" to build the installation. It runs for an hour or so but eventually I get the following error messages:

g++ -mthreads -Wl,-enable-stdcall-fixup -Wl,-enable-auto-import -Wl,-enable-runtime-pseudo-reloc -Wl,-s -Wl,-s -Wl,-subsystem,console -o "..\..\..\bin\uic3.exe" object_script.uic3.Release -L"c:\Qt\4.2.2\lib" -L"c:\Qt\4.2.2\lib" -lQt3Support -lQtXml -lQtGui -lQtCore -lQtSql4 -lQtXml4 -lQtGui4 -lQtNetwork4 -lgdi32 -lcom
dlg32 -loleaut32 -limm32 -lwinmm -lwinspool -lmsimg32 -lQtCore4 -lkernel32 -luser32 -lshell32 -luuid -lole32 -ladvapi32 -lws2_32 -Lc:\MySQL\lib C:\MinGW\bin\..\lib\gcc\mingw32\3.4.2\..\..\..\..\ mingw32\bin\ld.exe: cannot find -lQtSql4
collect2: ld returned 1 exit status
mingw32-make[3]: *** [..\..\..\bin\uic3.exe] Error 1
mingw32-make[3]: Leaving directory `C:/Qt/4.2.2/src/tools/uic3'
mingw32-make[2]: *** [release] Error 2
mingw32-make[2]: Leaving directory `C:/Qt/4.2.2/src/tools/uic3'
mingw32-make[1]: *** [sub-tools_uic3-make_default] Error 2
mingw32-make[1]: Leaving directory `C:/Qt/4.2.2/src'
mingw32-make: *** [sub-src-make_default-ordered] Error 2

A search of the system reveals that a library is built called libQtSql.a (and libQtSqld.a for debug). No library named libQTSql4.lib or libQTSql4.a is anywhere on the system. I assume once it completes the release build it's going to want the library libQTSqld4.lib (or libQTSqld4.a) for the debug version as well.

Is this a bug, am I missing something in my environment, or is my configure command wrong?

I appreciate any inputs.

Karl