[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Very strange linking problem
From:       Giuseppe Torelli <lcdn () inwind ! it>
Date:       2003-07-16 9:08:21
[Download RAW message or body]

Hi, 

I have the following code:

#include "getaddress.h"
#include "stdio.h"

GetAddress::GetAddress(QWidget *parent, const char *name ) : 
QListView(parent,name)
{
 socket = new QSocket( this );
	connect( socket, SIGNAL(connected()),SLOT(socketConnected()) );
	connect( socket, SIGNAL(connectionClosed()),SLOT(socketConnectionClosed()) );
	connect( socket, SIGNAL(readyRead()),SLOT(socketReadyRead()) );
	connect( socket, SIGNAL(error(int)),SLOT(socketError(int)) );
	static const QString* WA[3] =	{
		{new QString("http://www.libero.it")},
		{new QString("http://www.google.it")},
		{new QString("http://www.virgilio.it")},
									};
}

GetAddress::~GetAddress()
{
}

int GetAddress::RetrieveAddress ( QListView *view)
{
	for (int i = 0; i < 3; i++) {
		socket->connectToHost( WA[ i ]->latin1() , 80 );
								}
	return;
}

void socketConnected()
{
printf ("Connected !\n");
}

void socketConnectionClosed()
{
}

void socketReadyRead()
{
}

void socketError(int e)
{
}

Would someone explain me why I get:

getaddress.moc.o(.text+0x187): In function `GetAddress::qt_invoke(int, 
QUObject*)':
: undefined reference to `GetAddress::socketError()'
getaddress.moc.o(.text+0x19d): In function GetAddress::qt_invoke(int, 
QUObject*)':
: undefined reference to `GetAddress::socketReadyRead()'
getaddress.moc.o(.text+0x1ad): In function `GetAddress::qt_invoke(int, 
QUObject*)':
: undefined reference to `GetAddress::socketConnected()'
getaddress.moc.o(.text+0x1b9): In function `GetAddress::qt_invoke(int, 
QUObject*)':
: undefined reference to `GetAddress::socketConnectionClosed()'
collect2: ld returned 1 exit status
make[2]: *** [mizio] Error 1
make[2]: Leaving directory `/home/gt/mizio/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/gt/mizio'
make: *** [all] Error 2
gt@Colossus:~/mizio$

-- 
Giuseppe Torelli

 
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic