Hi Yari, did you add the header file (step6.h) to the CMake list of files which should be processed by moc (look at files.cmake and the MOC_H_FILES variable)?
Cheers, Sascha On 07/28/2015 04:47 PM, yari mattei wrote: > Hi guys, > > I am trying to create my own user interface for a MITK based application. > > I have created a MITK proejct with the project template and I am > folowing the tutorial steps. > > I made the all the steps since the step5 without any problem, but I am > having problem with step6. > > Just copy and paste the code from step6.h and step6.cpp (I only named > the file different and I change all the name of the class in the file) I > get this error : > > 7> Creating library > E:/MITK-d2/MITK-b/AwesomeProject-build/bin/Debug/AwesomeApp.lib and > object E:/MITK-d2/MITK-b/AwesomeProject-build/bin/Debug/AwesomeApp.exp > 7>Eco3DMainUI.obj : error LNK2001: unresolved external symbol "public: > virtual struct QMetaObject const * __cdecl > Eco3DMainUI::metaObject(void)const " > (?metaObject@Eco3DMainUI@@UEBAPEBUQMetaObject@@XZ) > 7>Eco3DMainUI.obj : error LNK2001: unresolved external symbol "public: > virtual void * __cdecl Eco3DMainUI::qt_metacast(char const *)" > (?qt_metacast@Eco3DMainUI@@UEAAPEAXPEBD@Z) > 7>Eco3DMainUI.obj : error LNK2001: unresolved external symbol "public: > virtual int __cdecl Eco3DMainUI::qt_metacall(enum > QMetaObject::Call,int,void * *)" > (?qt_metacall@Eco3DMainUI@@UEAAHW4Call@QMetaObject@@HPEAPEAX@Z) > 7>E:\MITK-d2\MITK-b\AwesomeProject-build\bin\Debug\AwesomeApp.exe : > fatal error LNK1120: 3 unresolved externals > > I find out that should be something related with the Qt preprocessor, > infact without Q_OBJECT macro after the declaration of the class (the > code is the same as step6.h and step6.cpp ) it build fine. > > Does anyone have any idea? > > Thanks > > Yari > > > ------------------------------------------------------------------------------ > _______________________________________________ > mitk-users mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/mitk-users ------------------------------------------------------------------------------ _______________________________________________ mitk-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/mitk-users
