I'm trying to write a wrapper so threaded classes have a common interface--so I can write threaded classes expecting certain available functionality, and I and others can write clients, expecting some common functionality.

So, I wrote an abstract class to act as my "middle man."
Qt Code:
  1. #ifndef THREADBASE_H
  2. #define THREADBASE_H
  3.  
  4. #include <QThread>
  5.  
  6. class ThreadBase : public QThread
  7. {
  8. public:
  9. ThreadBase();
  10. signals:
  11. void progressChanged(int);
  12. void exceptionOccurred(int);
  13. protected:
  14. void run();
  15. virtual void runThread() = 0;
  16. };
  17.  
  18. ThreadBase::ThreadBase() : QThread(0)
  19. {
  20. }
  21.  
  22. void ThreadBase::run()
  23. {
  24. runThread();
  25. }
  26.  
  27. #endif // THREADBASE_H
To copy to clipboard, switch view to plain text mode 
This compiled fine. I then tried writing a derived class.
Qt Code:
  1. // testsubclass.h
  2. #ifndef TESTSUBCLASS_H
  3. #define TESTSUBCLASS_H
  4.  
  5. #include "threadbase.h"
  6.  
  7. class TestSubClass : public ThreadBase
  8. {
  9. public:
  10. TestSubClass();
  11. protected:
  12. void runThread();
  13. };
  14.  
  15. #endif // TESTSUBCLASS_H
To copy to clipboard, switch view to plain text mode 
Qt Code:
  1. // testsubclass.cpp
  2. #include "testsubclass.h"
  3.  
  4. TestSubClass::TestSubClass() : ThreadBase()
  5. {
  6. }
  7.  
  8. void TestSubClass::runThread()
  9. {
  10. for(int i = 0; i < 100; i++)
  11. {
  12. emit progressChanged(i);
  13. wait(100);
  14. }
  15. emit progressChanged(100);
  16. }
To copy to clipboard, switch view to plain text mode 
I'm receiving a compiler error on lines 12 and 15 in testsubclass.cpp:
Qt Code:
  1. undefined reference to `ThreadBase::progressChanged(int)'
To copy to clipboard, switch view to plain text mode 
I think I'm having a mind-block, because I have done this before in other classes, and it works. As a derived class, shouldn't TestSubClass have access to the public members of ThreadBase? This might be a C++ question, but I didn't know if there were special rules for using signals in abstract classes that I missed.

P.S. I'm in Windows, using MinGW, with gcc version 3.4.5.