Bob54325
02-03-2002, 04:17 PM
I am having another problem with MOC (I MOCed the headers and defined QOBJECT). The header file moc is having difficulty with is the following:
#ifndef QUIZZER_H
#define QUIZZER_H
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include <kapp.h>
#include <ktmainwindow.h>
#include <qwidget.h>
#include <kurl.h>
class KRecentFilesAction;
class EditCards;
class quizCore;
/** Quizzer is the base class of the project */
class Quizzer : public KTMainWindow
{
Q_OBJECT
public:
/** construtor */
Quizzer(const char *name=0);
/** destructor */
~Quizzer();
protected slots:
void slotNew();
void slotOpen();
void slotSave();
void slotQuizRandom();
void slotQuizOrder();
void slotQuizManual();
void slotEdit();
void slotOpenRecent(const KURL&);
private:
KRecentFilesAction *recent;
KURL file;
EditCards *mode1;
quizCore *mode2;
};
#endif
I do make (tmake handles moc) and I get this error:
moc/moc_quizzer.o: In function `Quizzer::staticMetaObject(void)':
/home/ptz/quizzer/moc/moc_quizzer.cpp:89: undefined reference to `Quizzer::slotO
penRecent(KURL const &)'
collect2: ld returned 1 exit status
make: *** [quizzer] Error 1
The implementation of slotOpenRecent is the following:
void slotOpenRecent(const KURL& kurl)
{
}
Please ,please help.
#ifndef QUIZZER_H
#define QUIZZER_H
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include <kapp.h>
#include <ktmainwindow.h>
#include <qwidget.h>
#include <kurl.h>
class KRecentFilesAction;
class EditCards;
class quizCore;
/** Quizzer is the base class of the project */
class Quizzer : public KTMainWindow
{
Q_OBJECT
public:
/** construtor */
Quizzer(const char *name=0);
/** destructor */
~Quizzer();
protected slots:
void slotNew();
void slotOpen();
void slotSave();
void slotQuizRandom();
void slotQuizOrder();
void slotQuizManual();
void slotEdit();
void slotOpenRecent(const KURL&);
private:
KRecentFilesAction *recent;
KURL file;
EditCards *mode1;
quizCore *mode2;
};
#endif
I do make (tmake handles moc) and I get this error:
moc/moc_quizzer.o: In function `Quizzer::staticMetaObject(void)':
/home/ptz/quizzer/moc/moc_quizzer.cpp:89: undefined reference to `Quizzer::slotO
penRecent(KURL const &)'
collect2: ld returned 1 exit status
make: *** [quizzer] Error 1
The implementation of slotOpenRecent is the following:
void slotOpenRecent(const KURL& kurl)
{
}
Please ,please help.