O_OBJECT macro is there in the header file kalziumglwidget.h and before removing the #include "kalziumglwidget.moc" [1] was the exact error
[1]Automoc for target compoundviewer Generating kalziumglwidget.moc /home/anu/kalzium/compoundviewer/kalziumglwidget.cpp:0: Note: No relevant classes found. No output generated. [ 1%] Built target compoundviewer_automoc Scanning dependencies of target compoundviewer [ 2%] Building CXX object compoundviewer/CMakeFiles/compoundviewer.dir/kalziumglwidget.cpp.o /home/anu/kalzium/compoundviewer/kalziumglwidget.cpp:169:31: fatal error: kalziumglwidget.moc: No such file or directory #include "kalziumglwidget.moc" ^ compilation terminated. No output was generated! On Thu, Jan 29, 2015 at 7:52 PM, Sebastian Kügler <se...@kde.org> wrote: > On Thursday, January 29, 2015 15:07:42 anu mittal wrote: > > I am working on the application Kalzium,the file kalziumglwidget.cpp > under > > it includes the #include "kalziumglwidget.moc" at the end of the code > and > > cmakefile has set(CMAKE_AUTOMOC TRUE) even after that on building it > shows- > > > > fatal error: kalziumglwidget.moc: No such file or directory > > #include "kalziumglwidget.moc" > > ^ > > > > what else do i need to take care of while working with .moc file?How can > > this be resolved? > > Perhaps your header (likely kalziumglwidget.h) doesn't have a Q_OBJECT > macro? > (This macro would trigger moc to run and create the .moc file, which > includes > the metaobject information you seem to be missing.) > > Cheers, > -- > sebas > > http://www.kde.org | http://vizZzion.org | GPG Key ID: 9119 0EF9 > > >> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to > unsubscribe << > -- Regards, Anu.
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<