Hello all,

I'm having a considerable amount of trouble getting my plugins to work. Following the documentation (under the "How to Create Qt Plugins" section), I am following the low-level approach of creating plugins to extend my application through the use of QPluginLoader.

Currently, the whole mess compiles, but when I try to obtain an instance of my plugin, I get a NULL-pointer.

Here's what I've got:

The base plugin header:
Qt Code:
  1. #include <QObject>
  2. #include <QList>
  3. #include <QTcpSocket>
  4. #include <QPluginLoader>
  5.  
  6. class QWorkspace;
  7.  
  8. /**
  9. @author Richard F. Ostrow Jr. <kshots@warfaresdl.com>
  10. */
  11. class formBasePlugin : public QObject
  12. {
  13. Q_OBJECT
  14. public:
  15. formBasePlugin(QObject * parent = 0);
  16. virtual ~formBasePlugin();
  17.  
  18. int row();
  19.  
  20. virtual const QString pluginName()const = 0;
  21. virtual void onActivate() = 0;
  22.  
  23. QList <formBasePlugin *> listChildren;
  24. void unload(){emit removed();}
  25. static QTcpSocket socketServer;
  26. static QWorkspace * ws;
  27. protected:
  28. signals:
  29. void removed();
  30. public slots:
  31. };
  32.  
  33. Q_DECLARE_INTERFACE(formBasePlugin, "evilrpg.warfaresdl/1.0")
To copy to clipboard, switch view to plain text mode 
Then I've got the header for one of the plugins:
Qt Code:
  1. #include <formBasePlugin.h>
  2.  
  3. /**
  4. @author Richard F. Ostrow Jr. <kshots@warfaresdl.com>
  5. */
  6. class pluginWhiteboard : public formBasePlugin
  7. {
  8. Q_OBJECT
  9. Q_INTERFACES(formBasePlugin)
  10. public:
  11. pluginWhiteboard(QObject * parent = 0);
  12. virtual ~pluginWhiteboard();
  13.  
  14. virtual const QString pluginName()const{return tr("Whiteboard");}
  15. virtual void onActivate();
  16. };
To copy to clipboard, switch view to plain text mode 
... and the implementation of said plugin:
Qt Code:
  1. Q_EXPORT_PLUGIN2(plugins, pluginWhiteboard)
  2.  
  3. pluginWhiteboard::pluginWhiteboard(QObject * parent) : formBasePlugin(parent)
  4. {
  5. setObjectName("pluginWhiteboard");
  6. }
  7.  
  8. pluginWhiteboard::~pluginWhiteboard()
  9. {
  10. }
  11.  
  12. void
  13. pluginWhiteboard::onActivate()
  14. {
  15. }
To copy to clipboard, switch view to plain text mode 
My application successfully finds the plugin (I have checked this), but fails to load said plugin. Am I missing anything blatantly obvious? Thanks.