themolecule
21st August 2007, 05:57
I am able to create a plugin interface and link it, and the pluginLoader likes it, but if I try to include any classes from my main app, it won't link.
I would really like something like:
#include <C.h>
class A : public AInterface
{
public:
C *instance() { return new B(); }
};
class B : public C
{
B() {}
};
Q_EXPORT_PLUGIN2(app_A, A)
but I cannot figure out a way to get C.o to link when I create the dylib. It doesn't seem to make sense to add a LIBS line to the .pro that points to the .o file in:
[objectsdir]/Release/*build/Objects-normal/i386/C.o
because it doesn't feel right -- if I change machines, OSs, or distros it will break.
How do I get this link to work?
I would really like something like:
#include <C.h>
class A : public AInterface
{
public:
C *instance() { return new B(); }
};
class B : public C
{
B() {}
};
Q_EXPORT_PLUGIN2(app_A, A)
but I cannot figure out a way to get C.o to link when I create the dylib. It doesn't seem to make sense to add a LIBS line to the .pro that points to the .o file in:
[objectsdir]/Release/*build/Objects-normal/i386/C.o
because it doesn't feel right -- if I change machines, OSs, or distros it will break.
How do I get this link to work?