Hi!
I configured my system (WinXP) to statically compile Qt.
I have set up the mingw binaries in my path and everything needed for the compilation.
I configured the qt sources with:
configure -static -release -nomake demo -nomake examples -platform win32-g++
The configure ended perfectly with no errors.
I entered 'mingw32-make sub-src' and after a while these errors came up:

Qt Code:
  1. release/main.o:main.cpp:(.text+0x3e2a): undefined reference to `qFree(void*)'
  2. release/main.o:main.cpp:(.text+0x3e81): undefined reference to `qFree(void*)'
  3. release/main.o:main.cpp:(.text+0x3ebf): undefined reference to `QHashData::free_
  4. helper(void (*)(QHashData::Node*))'
  5. release/main.o:main.cpp:(.text+0x3ef8): undefined reference to `qt_assert_x(char
  6. const*, char const*, char const*, int)'
  7. release/main.o:main.cpp:(.text+0x3f41): undefined reference to `QByteArray::oper
  8. ator=(QByteArray const&)'
  9. release/main.o:main.cpp:(.text$_ZN5QListI7QStringE4freeEPN9QListData4DataE[QList
  10. <QString>::free(QListData::Data*)]+0x34): undefined reference to `QString::free(
  11. QString::Data*)'
  12. release/main.o:main.cpp:(.text$_ZN5QListI7QStringE4freeEPN9QListData4DataE[QList
  13. <QString>::free(QListData::Data*)]+0x57): undefined reference to `qFree(void*)'
  14. release/main.o:main.cpp:(.text$_ZN5QListIN12Preprocessor11IncludePathEE4freeEPN9
  15. QListData4DataE[QList<Preprocessor::IncludePath>::free(QListData::Data*)]+0x42):
  16. undefined reference to `qFree(void*)'
  17. release/main.o:main.cpp:(.text$_ZN5QListIN12Preprocessor11IncludePathEE4freeEPN9
  18. QListData4DataE[QList<Preprocessor::IncludePath>::free(QListData::Data*)]+0x6f):
  19. undefined reference to `qFree(void*)'
  20. release/main.o:main.cpp:(.text$_ZN5QListIN12Preprocessor11IncludePathEE6appendER
  21. KS1_[QList<Preprocessor::IncludePath>::append(Preprocessor::IncludePath const&)]
  22. +0x3e): undefined reference to `QListData::detach_grow(int*, int)'
  23. release/main.o:main.cpp:(.text$_ZN5QListIN12Preprocessor11IncludePathEE6appendER
  24. KS1_[QList<Preprocessor::IncludePath>::append(Preprocessor::IncludePath const&)]
  25. +0x15f): undefined reference to `QListData::append()'
  26. release/main.o:main.cpp:(.text$_ZN4QMapI10QByteArrayS0_ED1Ev[QMap<QByteArray, QB
  27. yteArray>::~QMap()]+0x34): undefined reference to `QMapData::continueFreeData(in
  28. t)'
  29. release/main.o:main.cpp:(.text$_ZN4QMapI10QByteArrayS0_ED1Ev[QMap<QByteArray, QB
  30. yteArray>::~QMap()]+0x5a): undefined reference to `qFree(void*)'
  31. release/main.o:main.cpp:(.text$_ZN4QMapI10QByteArrayS0_ED1Ev[QMap<QByteArray, QB
  32. yteArray>::~QMap()]+0x70): undefined reference to `qFree(void*)'
  33. release/main.o:main.cpp:(.text$_ZN5QListI8ClassDefED1Ev[QList<ClassDef>::~QList(
  34. )]+0x6d): undefined reference to `qFree(void*)'
  35. collect2: ld returned 1 exit status
  36. mingw32-make[2]: *** [..\..\..\bin\moc.exe] Error 1
  37. mingw32-make[2]: Leaving directory `C:/Qt/2010.05/qt/src/tools/moc'
  38. mingw32-make[1]: *** [release] Error 2
  39. mingw32-make[1]: Leaving directory `C:/Qt/2010.05/qt/src/tools/moc'
  40. mingw32-make: *** [sub-moc-sub_src_target_ordered] Error 2
  41.  
  42. C:\Qt\2010.05\qt>
To copy to clipboard, switch view to plain text mode 

Please, can you tell me where the problem is?
What should I do so that these errors don't come up anymore and to build Qt statically correctly?

P.S.: This is my fifth attempt to compile Qt statically after four other attempts with four different versions of Qt in the past and each one of them ending in an error like this (mostly ending like this in the "moc" directory, if I remember correctly) in the "make" phase. It seems like building Qt statically is impossible!