Hi,
I've got a little issue porting my app (Qt4.1) under window.
All works fine while I'm compiling under linux (gcc4 ; kdevelop ; qt 4.1) but I've got compilation error trying to compile the SAME sources under windows (g++, Qt 4.1).
The error seems to be coming while the linking phase, and only for QTcpSocket class :
I've got that kind of g++ command :
g++ -c -O2 -O2 -frtti -fexceptions -Wall -DUNICODE -DQT_LARGEFILE_SUPPORT -DQT_DLL -DQT_NO_DEBUG -DQT_QT3SUPPORT_LIB -DQT3_SUPPORT -DQT_GUI_LIB -DQT_CORE_LIB -D
QT_THREAD_SUPPORT -DQT_NEEDS_QMAIN -I"C:/Qt/4.1.0/include/QtCore" -I"C:/Qt/4.1.0/include/QtGui" -I"C:/Qt/4.1.0/include/Qt3Support" -I"C:/Qt/4.1.0/include" -I"."
-I"C:/Qt/4.1.0/include/ActiveQt" -I"release" -I"." -I"C:/Qt/4.1.0/mkspecs/win32-g++" -o release\moc_p2mroom.o release\moc_p2mroom.cpp
C:\Qt\4.1.0\bin\moc.exe -DUNICODE -DQT_LARGEFILE_SUPPORT -DQT_DLL -DQT_NO_DEBUG -DQT_QT3SUPPORT_LIB -DQT3_SUPPORT -DQT_GUI_LIB -DQT_CORE_LIB -DQT_THREAD_SUPPORT
-DQT_NEEDS_QMAIN -I"C:/Qt/4.1.0/include/QtCore" -I"C:/Qt/4.1.0/include/QtGui" -I"C:/Qt/4.1.0/include/Qt3Support" -I"C:/Qt/4.1.0/include" -I"." -I"C:/Qt/4.1.0/i
nclude/ActiveQt" -I"release" -I"." -I"C:/Qt/4.1.0/mkspecs/win32-g++" -D__GNUC__ -DWIN32 p2muser.h -o release\moc_p2muser.cpp
g++ -c -O2 -O2 -frtti -fexceptions -Wall -DUNICODE -DQT_LARGEFILE_SUPPORT -DQT_DLL -DQT_NO_DEBUG -DQT_QT3SUPPORT_LIB -DQT3_SUPPORT -DQT_GUI_LIB -DQT_CORE_LIB -D
QT_THREAD_SUPPORT -DQT_NEEDS_QMAIN -I"C:/Qt/4.1.0/include/QtCore" -I"C:/Qt/4.1.0/include/QtGui" -I"C:/Qt/4.1.0/include/Qt3Support" -I"C:/Qt/4.1.0/include" -I"."
-I"C:/Qt/4.1.0/include/ActiveQt" -I"release" -I"." -I"C:/Qt/4.1.0/mkspecs/win32-g++" -o release\moc_p2mroom.o release\moc_p2mroom.cpp
C:\Qt\4.1.0\bin\moc.exe -DUNICODE -DQT_LARGEFILE_SUPPORT -DQT_DLL -DQT_NO_DEBUG -DQT_QT3SUPPORT_LIB -DQT3_SUPPORT -DQT_GUI_LIB -DQT_CORE_LIB -DQT_THREAD_SUPPORT
-DQT_NEEDS_QMAIN -I"C:/Qt/4.1.0/include/QtCore" -I"C:/Qt/4.1.0/include/QtGui" -I"C:/Qt/4.1.0/include/Qt3Support" -I"C:/Qt/4.1.0/include" -I"." -I"C:/Qt/4.1.0/i
nclude/ActiveQt" -I"release" -I"." -I"C:/Qt/4.1.0/mkspecs/win32-g++" -D__GNUC__ -DWIN32 p2muser.h -o release\moc_p2muser.cpp
To copy to clipboard, switch view to plain text mode
and the following errors :
./release\p2mircconnexion.o(.text+0x70):p2mircconnexion.cpp: undefined reference to `_imp___ZN10QTcpSocketC1EP7QObject'
./release\p2mircconnexion.o(.text+0x242):p2mircconnexion.cpp: undefined reference to `QTcpSocket::~QTcpSocket()'
./release\p2mircconnexion.o(.text+0x2dc):p2mircconnexion.cpp: undefined reference to `_imp___ZN10QTcpSocketC1EP7QObject'
./release\p2mircconnexion.o(.text+0x4b2):p2mircconnexion.cpp: undefined reference to `QTcpSocket::~QTcpSocket()'
.
/release\p2mircconnexion.
o(.
text+0x586
):p2mircconnexion.
cpp: undefined reference to `
QTcpSocket::~
QTcpSocket()'./release\p2mircconnexion.o(.text+0x644):p2mircconnexion.cpp: undefined reference to `QTcpSocket::~QTcpSocket()'
.
/release\p2mircconnexion.
o(.
text+0x6f6
):p2mircconnexion.
cpp: undefined reference to `
QTcpSocket::~
QTcpSocket()'./release\p2mircconnexion.o(.text+0x7b4):p2mircconnexion.cpp: undefined reference to `QTcpSocket::~QTcpSocket()'
.
/release\p2mircconnexion.
o(.
text+0x866
):p2mircconnexion.
cpp: more undefined references to `
QTcpSocket::~
QTcpSocket()' follow./release\p2mircconnexion.o(.text+0x9d0):p2mircconnexion.cpp: undefined reference to `_imp___ZNK15QAbstractSocket5stateEv'
./release\p2mircconnexion.o(.text+0xab0):p2mircconnexion.cpp: undefined reference to `_imp___ZN15QAbstractSocket5flushEv'
./release\p2mircconnexion.o(.text+0xbd9):p2mircconnexion.cpp: undefined reference to `_imp___ZN15QAbstractSocket13connectToHostERK7QStringt6QFlagsIN9QIODevice12
OpenModeFlagEE'
./release\p2mircconnexion.o(.text+0xcd1):p2mircconnexion.cpp: undefined reference to `_imp___ZN15QAbstractSocket5flushEv'
./release\p2mircconnexion.o(.text+0xceb):p2mircconnexion.cpp: undefined reference to `QAbstractSocket::close()'
./release\p2mircconnexion.o(.text+0xd3c):p2mircconnexion.cpp: undefined reference to `_imp___ZNK15QAbstractSocket5stateEv'
./release\p2mircconnexion.o(.text+0x95b9):p2mircconnexion.cpp: undefined reference to `QAbstractSocket::canReadLine() const'
collect2: ld returned 1 exit status
mingw32-make[1]: *** [release\src.exe] Error 1
mingw32-make[1]: Leaving directory `D:/DOCUME~2/PROGRA~1/FREECO~1/FREECO~1.QT4/src'
mingw32-make: *** [release] Error 2
./release\p2mircconnexion.o(.text+0x70):p2mircconnexion.cpp: undefined reference to `_imp___ZN10QTcpSocketC1EP7QObject'
./release\p2mircconnexion.o(.text+0x242):p2mircconnexion.cpp: undefined reference to `QTcpSocket::~QTcpSocket()'
./release\p2mircconnexion.o(.text+0x2dc):p2mircconnexion.cpp: undefined reference to `_imp___ZN10QTcpSocketC1EP7QObject'
./release\p2mircconnexion.o(.text+0x4b2):p2mircconnexion.cpp: undefined reference to `QTcpSocket::~QTcpSocket()'
./release\p2mircconnexion.o(.text+0x586):p2mircconnexion.cpp: undefined reference to `QTcpSocket::~QTcpSocket()'
./release\p2mircconnexion.o(.text+0x644):p2mircconnexion.cpp: undefined reference to `QTcpSocket::~QTcpSocket()'
./release\p2mircconnexion.o(.text+0x6f6):p2mircconnexion.cpp: undefined reference to `QTcpSocket::~QTcpSocket()'
./release\p2mircconnexion.o(.text+0x7b4):p2mircconnexion.cpp: undefined reference to `QTcpSocket::~QTcpSocket()'
./release\p2mircconnexion.o(.text+0x866):p2mircconnexion.cpp: more undefined references to `QTcpSocket::~QTcpSocket()' follow
./release\p2mircconnexion.o(.text+0x9d0):p2mircconnexion.cpp: undefined reference to `_imp___ZNK15QAbstractSocket5stateEv'
./release\p2mircconnexion.o(.text+0xab0):p2mircconnexion.cpp: undefined reference to `_imp___ZN15QAbstractSocket5flushEv'
./release\p2mircconnexion.o(.text+0xbd9):p2mircconnexion.cpp: undefined reference to `_imp___ZN15QAbstractSocket13connectToHostERK7QStringt6QFlagsIN9QIODevice12
OpenModeFlagEE'
./release\p2mircconnexion.o(.text+0xcd1):p2mircconnexion.cpp: undefined reference to `_imp___ZN15QAbstractSocket5flushEv'
./release\p2mircconnexion.o(.text+0xceb):p2mircconnexion.cpp: undefined reference to `QAbstractSocket::close()'
./release\p2mircconnexion.o(.text+0xd3c):p2mircconnexion.cpp: undefined reference to `_imp___ZNK15QAbstractSocket5stateEv'
./release\p2mircconnexion.o(.text+0x95b9):p2mircconnexion.cpp: undefined reference to `QAbstractSocket::canReadLine() const'
collect2: ld returned 1 exit status
mingw32-make[1]: *** [release\src.exe] Error 1
mingw32-make[1]: Leaving directory `D:/DOCUME~2/PROGRA~1/FREECO~1/FREECO~1.QT4/src'
mingw32-make: *** [release] Error 2
To copy to clipboard, switch view to plain text mode
Any idea ?
Bookmarks