[Interest] moc with qtbrowserplugin

"Alexander CarĂ´t" alexander_carot at gmx.net
Tue Sep 25 11:11:39 CEST 2012


Hello all,

after having successfully compiled the trivial-example I am now trying to include further functionality to it. In that context I have a problem:

The original trivial project consists of one single cpp file, which contains the class definition and below this it includes the moc:

// CLASSDEF HERE ...
};

#include "trivial.moc"
QTNPFACTORY_BEGIN("Trivial Qt-based Plugin", "A Qt-based LiveConnected plug-in that does nothing")
    QTNPCLASS(Trivial)
QTNPFACTORY_END()


However, I want to use a "trivial.h" for the class defintion and a "trivial.cpp" for the functions. When I recode the project like this the compiler does not create a "trivial.moc" anymore but a "moc_trivial.cpp" instead. When I include this file I am getting and "endless" error message and if I don't include anything at all I am getting this:


debug/trivial.o: In function `Trivial':
X:\browserPlugin\trivial/trivial.h:41: undefined reference to `vtable for Trivia
l'
X:\browserPlugin\trivial/trivial.h:41: undefined reference to `vtable for Trivia
l'
debug/trivial.o:X:\browserPlugin\trivial/../src/qtbrowserplugin.h:114: undefined
 reference to `Trivial::staticMetaObject'



Can anyone help with this moc-issue ?

Thanks in advance,
best

Alex








-- 
http://www.carot.de
http://www.triologue.de
Email : Alexander at Carot.de
Tel.: +49 (0)177 5719797






More information about the Interest mailing list