[Qt-creator] Problems building with Qt Creator

Christian Kandeler christian.kandeler at nokia.com
Tue Jul 13 14:30:52 CEST 2010


On 07/13/2010 02:05 PM, ext jaff at student.dei.uc.pt wrote:
> Hi all,
>
> I'm doing a simple login dialog and since I tried to use QTcpSockets
> I've been having some problems building my project.
> I receive these errors:
>
> logindialog.obj:: error:  unresolved external symbol
> "__declspec(dllimport) public: virtual __thiscall
> QTcpSocket::~QTcpSocket(void)" (__imp_??1QTcpSocket@@UAE at XZ) referenced
> in function "public: virtual __thiscall
> LoginDialog::~LoginDialog(void)" (??1LoginDialog@@UAE at XZ)
>
> logindialog.obj:: error:  unresolved external symbol
> "__declspec(dllimport) public: __thiscall QTcpSocket::QTcpSocket(class
> QObject *)" (__imp_??0QTcpSocket@@QAE at PAVQObject@@@Z) referenced in
> function "public: __thiscall LoginDialog::LoginDialog(class QWidget *)"
> (??0LoginDialog@@QAE at PAVQWidget@@@Z)
>
> debug\Backoffice.exe:: error:  2 unresolved externals

Your problem has nothing to do with Qt Creator.
The symbols are not found because you are not linking in Qt's network 
libraries, which contain QTcpSocket.
Add "QT += network" to your project file.


Christian



More information about the Qt-creator-old mailing list