[Qt-creator] Problems building with Qt Creator
jaff at student.dei.uc.pt
jaff at student.dei.uc.pt
Tue Jul 13 14:05:14 CEST 2010
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
I'm using Qt Creator in Windows XP 32 bits. From what I found online,
similar problems were solved by reinstalling Qt, adding settings to the
.obj file, disabling shadow building in the pro.user file... I tried
the last two solutions, none worked. The best I got was no errors but
the building stopped and consequently was not completed.
Anyone know how to solve this. If anyone knows, please sahre it with
me, because my work is getting delayed :| I will include the project
files as attachments, since it's only a login dialog and there's only a
few lines of code on it.
Thanks in advance,
João
----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.
-------------- next part --------------
#include "logindialog.h"
#include "ui_logindialog.h"
LoginDialog::LoginDialog(QWidget *parent) :
QDialog(parent),
ui(new Ui::LoginDialog)
{
ui->setupUi(this);
ui->lineEdit_2->setEchoMode(QLineEdit::Password);
}
LoginDialog::~LoginDialog()
{
delete ui;
}
void LoginDialog::clearButtonClickedHandler()
{
ui->lineEdit->clear();
ui->lineEdit_2->clear();
ui->lineEdit_3->clear();
}
void LoginDialog::connectToServer()
{
// QString server = ui->label_3->text();
// if(server=="")
// tcpSocket.connectToHost(QHostAddress::LocalHost, 6178);
// else
// tcpSocket.connectToHost(server, 6178);
}
-------------- next part --------------
#ifndef LOGINDIALOG_H
#define LOGINDIALOG_H
#include <QDialog>
#include <QtNetwork/QTcpSocket>
#include <QtNetwork/QHostAddress>
#include <QString>
namespace Ui
{
class LoginDialog;
}
class LoginDialog : public QDialog
{
Q_OBJECT
public:
explicit LoginDialog(QWidget *parent = 0);
~LoginDialog();
public slots:
void clearButtonClickedHandler();
void connectToServer();
private:
Ui::LoginDialog *ui;
QTcpSocket tcpSocket;
};
#endif // LOGINDIALOG_H
-------------- next part --------------
A non-text attachment was scrubbed...
Name: logindialog.ui
Type: application/x-designer
Size: 3261 bytes
Desc: not available
Url : http://lists.qt-project.org/pipermail/qt-creator-old/attachments/20100713/1e2e7fda/attachment.bin
-------------- next part --------------
#include <QtGui/QApplication>
#include "logindialog.h"
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
LoginDialog w;
w.show();
return a.exec();
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Backoffice.pro
Type: application/octet-stream
Size: 318 bytes
Desc: not available
Url : http://lists.qt-project.org/pipermail/qt-creator-old/attachments/20100713/1e2e7fda/attachment.obj
More information about the Qt-creator-old
mailing list