Registered Member
|
I'm trying to write a simple KRunner plugin but I have stumbled in an error that I'm unable to understand.
The header file that defines the runner plugin is the following (file name: unicodesymbolsrunner.h):
And the implementation is:
As you can see it literally doesn't do anything. When trying to compile this using QtCreator I get errors on the line containing the call to the K_EXPORT_PLASMA_RUNNER macro saying that I have multiple definitions of factory::factory() and stuff like that. Here's the error messages:
How is this possible? Factory should be something handled by that macro. Does anyone know why this could happen? Here's the whole output including the compiling commands that QtCreator is using:
|
Registered Member
|
Okay, so the problem was that the call to K_EXPORT_PLASMA_RUNNER must be put in the .cpp file and not the .h file (not really sure why though).
However now I have an other problem related to the same macro: it says it is missing the vtable for "factory". The error is:
where line 15 of unicodesymbolsrunner.cpp contains the call to the abovementioned macro. Can someone tell me what's happening? I believe vtable errors occur generally when you have virtual methods in the class declaration that don't have an implementation, but I don't think this is the case. I've also tried to implement every method tagged virtual in AbstractRunner and nothing changes (though I could find only kde4 documentation...) |
Registered users: Bing [Bot], daret, Google [Bot], sandyvee, Sogou [Bot]