elton.lika
10th October 2010, 03:41
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:
release/main.o:main.cpp:(.text+0x3e2a): undefined reference to `qFree(void*)'
release/main.o:main.cpp:(.text+0x3e81): undefined reference to `qFree(void*)'
release/main.o:main.cpp:(.text+0x3ebf): undefined reference to `QHashData::free_
helper(void (*)(QHashData::Node*))'
release/main.o:main.cpp:(.text+0x3ef8): undefined reference to `qt_assert_x(char
const*, char const*, char const*, int)'
release/main.o:main.cpp:(.text+0x3f41): undefined reference to `QByteArray::oper
ator=(QByteArray const&)'
release/main.o:main.cpp:(.text$_ZN5QListI7QStringE4freeEPN 9QListData4DataE[QList
<QString>::free(QListData::Data*)]+0x34): undefined reference to `QString::free(
QString::Data*)'
release/main.o:main.cpp:(.text$_ZN5QListI7QStringE4freeEPN 9QListData4DataE[QList
<QString>::free(QListData::Data*)]+0x57): undefined reference to `qFree(void*)'
release/main.o:main.cpp:(.text$_ZN5QListIN12Preprocessor11 IncludePathEE4freeEPN9
QListData4DataE[QList<Preprocessor::IncludePath>::free(QListData::Data*)]+0x42):
undefined reference to `qFree(void*)'
release/main.o:main.cpp:(.text$_ZN5QListIN12Preprocessor11 IncludePathEE4freeEPN9
QListData4DataE[QList<Preprocessor::IncludePath>::free(QListData::Data*)]+0x6f):
undefined reference to `qFree(void*)'
release/main.o:main.cpp:(.text$_ZN5QListIN12Preprocessor11 IncludePathEE6appendER
KS1_[QList<Preprocessor::IncludePath>::append(Preprocessor::IncludePath const&)]
+0x3e): undefined reference to `QListData::detach_grow(int*, int)'
release/main.o:main.cpp:(.text$_ZN5QListIN12Preprocessor11 IncludePathEE6appendER
KS1_[QList<Preprocessor::IncludePath>::append(Preprocessor::IncludePath const&)]
+0x15f): undefined reference to `QListData::append()'
release/main.o:main.cpp:(.text$_ZN4QMapI10QByteArrayS0_ED1 Ev[QMap<QByteArray, QB
yteArray>::~QMap()]+0x34): undefined reference to `QMapData::continueFreeData(in
t)'
release/main.o:main.cpp:(.text$_ZN4QMapI10QByteArrayS0_ED1 Ev[QMap<QByteArray, QB
yteArray>::~QMap()]+0x5a): undefined reference to `qFree(void*)'
release/main.o:main.cpp:(.text$_ZN4QMapI10QByteArrayS0_ED1 Ev[QMap<QByteArray, QB
yteArray>::~QMap()]+0x70): undefined reference to `qFree(void*)'
release/main.o:main.cpp:(.text$_ZN5QListI8ClassDefED1Ev[QList<ClassDef>::~QList(
)]+0x6d): undefined reference to `qFree(void*)'
collect2: ld returned 1 exit status
mingw32-make[2]: *** [..\..\..\bin\moc.exe] Error 1
mingw32-make[2]: Leaving directory `C:/Qt/2010.05/qt/src/tools/moc'
mingw32-make[1]: *** [release] Error 2
mingw32-make[1]: Leaving directory `C:/Qt/2010.05/qt/src/tools/moc'
mingw32-make: *** [sub-moc-sub_src_target_ordered] Error 2
C:\Qt\2010.05\qt>
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!
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:
release/main.o:main.cpp:(.text+0x3e2a): undefined reference to `qFree(void*)'
release/main.o:main.cpp:(.text+0x3e81): undefined reference to `qFree(void*)'
release/main.o:main.cpp:(.text+0x3ebf): undefined reference to `QHashData::free_
helper(void (*)(QHashData::Node*))'
release/main.o:main.cpp:(.text+0x3ef8): undefined reference to `qt_assert_x(char
const*, char const*, char const*, int)'
release/main.o:main.cpp:(.text+0x3f41): undefined reference to `QByteArray::oper
ator=(QByteArray const&)'
release/main.o:main.cpp:(.text$_ZN5QListI7QStringE4freeEPN 9QListData4DataE[QList
<QString>::free(QListData::Data*)]+0x34): undefined reference to `QString::free(
QString::Data*)'
release/main.o:main.cpp:(.text$_ZN5QListI7QStringE4freeEPN 9QListData4DataE[QList
<QString>::free(QListData::Data*)]+0x57): undefined reference to `qFree(void*)'
release/main.o:main.cpp:(.text$_ZN5QListIN12Preprocessor11 IncludePathEE4freeEPN9
QListData4DataE[QList<Preprocessor::IncludePath>::free(QListData::Data*)]+0x42):
undefined reference to `qFree(void*)'
release/main.o:main.cpp:(.text$_ZN5QListIN12Preprocessor11 IncludePathEE4freeEPN9
QListData4DataE[QList<Preprocessor::IncludePath>::free(QListData::Data*)]+0x6f):
undefined reference to `qFree(void*)'
release/main.o:main.cpp:(.text$_ZN5QListIN12Preprocessor11 IncludePathEE6appendER
KS1_[QList<Preprocessor::IncludePath>::append(Preprocessor::IncludePath const&)]
+0x3e): undefined reference to `QListData::detach_grow(int*, int)'
release/main.o:main.cpp:(.text$_ZN5QListIN12Preprocessor11 IncludePathEE6appendER
KS1_[QList<Preprocessor::IncludePath>::append(Preprocessor::IncludePath const&)]
+0x15f): undefined reference to `QListData::append()'
release/main.o:main.cpp:(.text$_ZN4QMapI10QByteArrayS0_ED1 Ev[QMap<QByteArray, QB
yteArray>::~QMap()]+0x34): undefined reference to `QMapData::continueFreeData(in
t)'
release/main.o:main.cpp:(.text$_ZN4QMapI10QByteArrayS0_ED1 Ev[QMap<QByteArray, QB
yteArray>::~QMap()]+0x5a): undefined reference to `qFree(void*)'
release/main.o:main.cpp:(.text$_ZN4QMapI10QByteArrayS0_ED1 Ev[QMap<QByteArray, QB
yteArray>::~QMap()]+0x70): undefined reference to `qFree(void*)'
release/main.o:main.cpp:(.text$_ZN5QListI8ClassDefED1Ev[QList<ClassDef>::~QList(
)]+0x6d): undefined reference to `qFree(void*)'
collect2: ld returned 1 exit status
mingw32-make[2]: *** [..\..\..\bin\moc.exe] Error 1
mingw32-make[2]: Leaving directory `C:/Qt/2010.05/qt/src/tools/moc'
mingw32-make[1]: *** [release] Error 2
mingw32-make[1]: Leaving directory `C:/Qt/2010.05/qt/src/tools/moc'
mingw32-make: *** [sub-moc-sub_src_target_ordered] Error 2
C:\Qt\2010.05\qt>
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!