Version 2 (modified by 11 years ago) ( diff ) | ,
---|
FAQ (1) -- common compilation errors
MSVC
ComponentBase
should be inherited AFTER
QObject
Error message
>moc_Component.cpp(63): error C2039: 'staticMetaObject' : is not a member of 'pacpus::ComponentBase' > ComponentBase.h(60) : see declaration of 'pacpus::ComponentBase' >moc_Component.cpp(80): error C2039: 'qt_metacast' : is not a member of 'pacpus::ComponentBase' > ComponentBase.h(60) : see declaration of 'pacpus::ComponentBase' >moc_Component.cpp(85): error C2039: 'qt_metacall' : is not a member of 'pacpus::ComponentBase' > ComponentBase.h(60) : see declaration of 'pacpus::ComponentBase'
Solution
Your class declaration should look like:
class Component : QObject , ComponentBase { };
GCC
Varia
FAQ -- Frequently Asked Questions
Note:
See TracWiki
for help on using the wiki.