Hello!
My program is loading shared libraries (*.dll, *.so, etc) - that works fine - but I do need signal&slots and therefor I have to put Q_OBJECT into my class in the library. The linker does not like that, as the class is declared inside a extern "C" and Q_OBJECT uses template, pure C++ code.
|
Source code
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
#include <QObject>
#include <QStringList>
extern "C" {
class ModControl : public QObject {
Q_OBJECT
private:
bool isCreated;
public:
ModControl();
~ModControl();
public slots:
void send(const QStringList &strlArgs);
};
}
|
When I'm removing Q_OBJECT, anything compiles and is linked properly.
What can I do?