Hey all,

I am trying to create a plugin for my program so i created a abstract class for an interface, i followed the echoplugin example. But the compiler keeps complaining about an "undefined reference to `vtable for ScrapperInterface'".

This is the complete error i get:
Qt Code:
  1. debug/moc_themoviedb.o: In function `~ScrapperInterface':
  2. g:\projects\DuneInterface-build-desktop\ScrapperPlugins\TheMovieDb/../../../DuneInterface/movieWall/scrapperinterface.h:30: undefined reference to `vtable for ScrapperInterface'
  3. collect2: ld returned 1 exit status
  4. mingw32-make[3]: *** [debug/scrapperplugind.dll] Error 1
  5. mingw32-make[2]: *** [debug] Error 2
  6. mingw32-make[1]: *** [sub-TheMovieDb-make_default] Error 2
  7. mingw32-make: *** [sub-ScrapperPlugins-make_default] Error 2
  8. The process "E:\Qt\2010.05\mingw\bin\mingw32-make.exe" exited with code 2.
  9. Error while building project DuneInterface (target: Desktop)
  10. When executing build step 'Make'
To copy to clipboard, switch view to plain text mode 


This is the interface i have created:
Qt Code:
  1. #ifndef SCRAPPERINTERFACE_H
  2. #define SCRAPPERINTERFACE_H
  3.  
  4. #include <QString>
  5.  
  6. #include "moviedetails.h"
  7.  
  8. class ScrapperInterface
  9. {
  10. public:
  11. virtual ~ScrapperInterface() {}
  12. virtual QString siteName() = 0;
  13. virtual QString siteAddress() = 0;
  14. virtual int getMovieDetails(QString movieTitle) = 0;
  15.  
  16. signals:
  17. virtual int movieData();
  18. };
  19.  
  20. Q_DECLARE_INTERFACE(ScrapperInterface,
  21. "Esquirol.Plugin.Scrapper/1.0");
  22. #endif // SCRAPPERINTERFACE_H
To copy to clipboard, switch view to plain text mode 

And this is the code for the plugin that implements the interface:
.h
Qt Code:
  1. #ifndef THEMOVIEDB_H
  2. #define THEMOVIEDB_H
  3.  
  4. #include <QString>
  5. #include <QObject>
  6. #include <QXmlStreamReader>
  7. #include <QtNetwork>
  8.  
  9. #include "themoviedb.h"
  10. #include "scrapperinterface.h"
  11. #include "moviedetails.h"
  12.  
  13. class TheMovieDb : public QObject, ScrapperInterface
  14. {
  15. Q_OBJECT
  16. Q_INTERFACES(ScrapperInterface)
  17.  
  18. public:
  19. ~TheMovieDb() {}
  20. QString siteName();
  21. QString siteAddress();
  22. int getMovieDetails(QString movieTitle);
  23.  
  24. signals:
  25. int movieData();
  26.  
  27. public slots:
  28. void replyFinished(QNetworkReply *reply);
  29.  
  30. private:
  31. void fetch();
  32.  
  33. static const QString apiKey() { return "text"; }
  34.  
  35. QXmlStreamReader xml;
  36. QNetworkAccessManager http;
  37. };
  38.  
  39. #endif // THEMOVIEDB_H
To copy to clipboard, switch view to plain text mode 

.cpp
Qt Code:
  1. #include "themoviedb.h"
  2. #include <QDebug>
  3.  
  4. QString TheMovieDb::siteName()
  5. {
  6. return "themoviedb.org";
  7. }
  8.  
  9. QString TheMovieDb::siteAddress()
  10. {
  11. return "http://www.themoviedb.org";
  12. }
  13.  
  14. int TheMovieDb::getMovieDetails(QString movieTitle)
  15. {
  16. qDebug() << "int TheMovieDb::getMovieDetails(QString movieTitle)";
  17.  
  18. return 0;
  19. }
  20.  
  21. void TheMovieDb::replyFinished(QNetworkReply *reply)
  22. {
  23. qDebug() << "void TheMovieDb::replyFinished(QNetworkReply *reply)";
  24. }
To copy to clipboard, switch view to plain text mode 

I know that an undefined reference means that i still have to implement one function but i thought i implemented everything the interface specifies.

Hope you can help me

Regards,
Marcel