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 :

Qt Code:
  1. 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
  2. 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"."
  3. -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
  4. 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
  5. -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
  6. 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 :

Qt Code:
  1. ./release\p2mircconnexion.o(.text+0x70):p2mircconnexion.cpp: undefined reference to `_imp___ZN10QTcpSocketC1EP7QObject'
  2. ./release\p2mircconnexion.o(.text+0x242):p2mircconnexion.cpp: undefined reference to `QTcpSocket::~QTcpSocket()'
  3. ./release\p2mircconnexion.o(.text+0x2dc):p2mircconnexion.cpp: undefined reference to `_imp___ZN10QTcpSocketC1EP7QObject'
  4. ./release\p2mircconnexion.o(.text+0x4b2):p2mircconnexion.cpp: undefined reference to `QTcpSocket::~QTcpSocket()'
  5. ./release\p2mircconnexion.o(.text+0x586):p2mircconnexion.cpp: undefined reference to `QTcpSocket::~QTcpSocket()'
  6. ./release\p2mircconnexion.o(.text+0x644):p2mircconnexion.cpp: undefined reference to `QTcpSocket::~QTcpSocket()'
  7. ./release\p2mircconnexion.o(.text+0x6f6):p2mircconnexion.cpp: undefined reference to `QTcpSocket::~QTcpSocket()'
  8. ./release\p2mircconnexion.o(.text+0x7b4):p2mircconnexion.cpp: undefined reference to `QTcpSocket::~QTcpSocket()'
  9. ./release\p2mircconnexion.o(.text+0x866):p2mircconnexion.cpp: more undefined references to `QTcpSocket::~QTcpSocket()' follow
  10. ./release\p2mircconnexion.o(.text+0x9d0):p2mircconnexion.cpp: undefined reference to `_imp___ZNK15QAbstractSocket5stateEv'
  11. ./release\p2mircconnexion.o(.text+0xab0):p2mircconnexion.cpp: undefined reference to `_imp___ZN15QAbstractSocket5flushEv'
  12. ./release\p2mircconnexion.o(.text+0xbd9):p2mircconnexion.cpp: undefined reference to `_imp___ZN15QAbstractSocket13connectToHostERK7QStringt6QFlagsIN9QIODevice12
  13. OpenModeFlagEE'
  14. ./release\p2mircconnexion.o(.text+0xcd1):p2mircconnexion.cpp: undefined reference to `_imp___ZN15QAbstractSocket5flushEv'
  15. ./release\p2mircconnexion.o(.text+0xceb):p2mircconnexion.cpp: undefined reference to `QAbstractSocket::close()'
  16. ./release\p2mircconnexion.o(.text+0xd3c):p2mircconnexion.cpp: undefined reference to `_imp___ZNK15QAbstractSocket5stateEv'
  17. ./release\p2mircconnexion.o(.text+0x95b9):p2mircconnexion.cpp: undefined reference to `QAbstractSocket::canReadLine() const'
  18. collect2: ld returned 1 exit status
  19. mingw32-make[1]: *** [release\src.exe] Error 1
  20. mingw32-make[1]: Leaving directory `D:/DOCUME~2/PROGRA~1/FREECO~1/FREECO~1.QT4/src'
  21. mingw32-make: *** [release] Error 2
To copy to clipboard, switch view to plain text mode 

Any idea ?