Автор: Elfet 19.1.2010, 13:22
Всем привет!
Пожалуйста, помогите разобрать, почему это не хочет собираться:
CODE
#ifndef ITERATIONTHREAD_H
#define ITERATIONTHREAD_H
#include <QtGui>
#include <QThread>
class IterationThread : public QThread
{
Q_OBJECT
public:
void run();
signals:
void Progress(int value);
};
#endif // ITERATIONTHREAD_H
CODE
#include "IterationThread.h"
void IterationThread::run()
{
for(int i =0; i< 100; i++)
{
sleep(100);
emit Progress(i);
}
}
Выдаёт следующие ошибки:
Цитата
debug/mainwindow.o:mainwindow.cpp:(.text$_ZN15IterationThreadC1Ev[IterationThread::IterationThread()]+0x20): undefined reference to `vtable for IterationThread'
debug/mainwindow.o:mainwindow.cpp:(.text$_ZN15IterationThreadD1Ev[IterationThread::~IterationThread()]+0xb): undefined reference to `vtable for IterationThread'
debug/IterationThread.o:D:\Qt\smart-flow\SmartFlow/IterationThread.cpp:8: undefined reference to `IterationThread::Progress(int)'
collect2: ld returned 1 exit status
mingw32-make[1]: *** [debug\SmartFlow.exe] Error 1
mingw32-make: *** [debug] Error 2
Заранее спасибо!