PDA

View Full Version : QThread with MAC OSX 10.7 Lion



r41nb0ww4RR10R
28th July 2011, 21:08
Hi There!

I got some issues by using QThread on the "new" operating system Lion MAC OSX.


g++ -headerpad_max_install_names -arch x86_64 -Xarch_x86_64 -mmacosx-version-min=10.5 -o SSHTunnel.app/Contents/MacOS/SSHTunnel main.o mainwindow.o connectionthread.o serverthread.o moc_mainwindow.o moc_connectionthread.o moc_serverthread.o -F/Users/noah/QtSDKauto/Desktop/Qt/473/gcc/lib -L/Users/noah/QtSDKauto/Desktop/Qt/473/gcc/lib -framework QtGui -framework QtCore
Undefined symbols for architecture x86_64:
"QTcpServer::QTcpServer(QObject*)", referenced from:
ServerThread::run() in serverthread.o
"QHostAddress::QHostAddress(QHostAddress::SpecialAd dress)", referenced from:
ServerThread::run() in serverthread.o
"QTcpServer::listen(QHostAddress const&, unsigned short)", referenced from:
ServerThread::run() in serverthread.o
"QHostAddress::~QHostAddress()", referenced from:
ServerThread::run() in serverthread.o
ld: symbol(s) not found for architecture x86_64
collect2: ld returned 1 exit status

When I compile an application for MAC OSX Lion (10.7), using QThread, I always get this error, posted above. Is this a problem caused by Lion or just because I made a stupid mistake?

Is there anyone who can help me and maybe got the same problem and could fix it?

It would be very nice if I get an useful answer, that I can continue developping :)

Regards
Rynns

nosleduc
29th July 2011, 00:46
Did you add the QtNetwork framework to your .pro file and did you compile Qt in 64 bits mode ?

r41nb0ww4RR10R
29th July 2011, 09:29
If I'm honest, I didnt include it :S But I compiled all for 64 bit.
I just included QTcpServer/Socket, but not expecially QtNetwork. I'll try it at home, thanks!