You are not logged in.

#1 2010-08-11 12:53:22

spkag
Member
From: France
Registered: 2010-03-31
Posts: 24

[SOLVED][C++/Qt] Unknown custom slot - undefined reference to

Hey all !

I'm learning Qt and I wanted to train and get something useful in the same time. So I decided to make an application that tells me, via a system beep, when a new announce is available in a french web site, and sort them by specific criteria.

I've actually already written it in bash, and it works pretty well. I'm trying to adapt it so I get an interface with Qt. Though I'm having an issue : my custom slot is unknown.

You can get the archive here.

Or the pastbin links :

main.cpp : http://pastebin.archlinux.fr/412193
MainWindow.h : http://pastebin.archlinux.fr/412194
MainWindow.cpp : http://pastebin.archlinux.fr/412195

Compilation gives me this :

[sebastian@arch-pc LeBonCoinChecker]$ qmake -project
[sebastian@arch-pc LeBonCoinChecker]$ qmake
[sebastian@arch-pc LeBonCoinChecker]$ make
g++ -c -pipe -march=i686 -mtune=generic -O2 -pipe -Wall -W -D_REENTRANT -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt/mkspecs/linux-g++ -I. -I/usr/include/QtCore -I/usr/include/QtGui -I/usr/include -I. -I. -o main.o main.cpp
g++ -c -pipe -march=i686 -mtune=generic -O2 -pipe -Wall -W -D_REENTRANT -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt/mkspecs/linux-g++ -I. -I/usr/include/QtCore -I/usr/include/QtGui -I/usr/include -I. -I. -o MainWindow.o MainWindow.cpp
/usr/bin/moc -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt/mkspecs/linux-g++ -I. -I/usr/include/QtCore -I/usr/include/QtGui -I/usr/include -I. -I. MainWindow.h -o moc_MainWindow.cpp
g++ -c -pipe -march=i686 -mtune=generic -O2 -pipe -Wall -W -D_REENTRANT -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt/mkspecs/linux-g++ -I. -I/usr/include/QtCore -I/usr/include/QtGui -I/usr/include -I. -I. -o moc_MainWindow.o moc_MainWindow.cpp
g++ -Wl,--hash-style=gnu -Wl,--as-needed -Wl,-O1 -o LeBonCoinChecker main.o MainWindow.o moc_MainWindow.o    -L/usr/lib -lQtGui -lQtCore -lpthread 
moc_MainWindow.o: In function `MainWindow::qt_metacall(QMetaObject::Call, int, void**)':
moc_MainWindow.cpp:(.text+0x8f): undefined reference to `MainWindow::s_apply(QString*, int const*, int const*, int const*, int const*)'
collect2: ld a retourné 1 code d'état d'exécution
make: *** [LeBonCoinChecker] Erreur 1
[sebastian@arch-pc LeBonCoinChecker]$ 

Thanks for reading,

Sebastian

Last edited by spkag (2010-08-11 20:47:06)

Offline

#2 2010-08-11 17:29:11

tavianator
Member
From: Waterloo, ON, Canada
Registered: 2007-08-21
Posts: 859
Website

Re: [SOLVED][C++/Qt] Unknown custom slot - undefined reference to

MainWindow.cpp says "void s_apply" rather than "void MainWindow::s_apply" on line 85.

Offline

#3 2010-08-11 17:31:58

spkag
Member
From: France
Registered: 2010-03-31
Posts: 24

Re: [SOLVED][C++/Qt] Unknown custom slot - undefined reference to

Oh damn, stumbling upon such a stupid thing...

Thank you !

Last edited by spkag (2010-08-11 20:46:51)

Offline

Board footer

Powered by FluxBB