Hi Yari,
I assume you are using the project template. I also assume that:
The following file does exist
YOUSOURCE/Modules/MyAwesomeLib/files.cmake
The following file does *not* exist:
YOUSOURCE/Apps /AwesomeApp/files.cmake
That is as it should be (see [1]).
I assume the problem is that your application source file is not build/you get
an error about it missing? The mitkFunctionCreateBlueBerryApplication defaults
to, in this case, AwesomeApp.cpp if no sources are set (see [2]).
if(NOT _APP_SOURCES)
set(_APP_SOURCES ${_APP_NAME}.cpp)
endif()
As a solution you can either rename your .cpp accordingly or set the source
files for the function. If your trouble stems from other files not being found
you might reconsider adding the to the application directory, generally it
should only contain a couple of files by design.
I hope this helps, if I misjudged your problem let me know,
Best,
Caspar
[1]
http://mitk.org/git/?p=MITK-ProjectTemplate.git;a=tree;f=Apps/AwesomeApp;h=9706f8a5877b946e3b15882e339486ff37cfd385;hb=HEAD
[2]
http://mitk.org/git/?p=MITK.git;a=blob;f=CMake/mitkFunctionCreateBlueBerryApplication.cmake;h=d84d10e8b9b4be0339cb6614e33df537ab2ad5ca;hb=HEAD#l40
-----Ursprüngliche Nachricht-----
Von: yari mattei [mailto:[email protected]]
Gesendet: Freitag, 31. Juli 2015 16:10
An: [email protected]
Betreff: Re: [mitk-users] QMetaObject symbol not found
Hi Sascha,
I am having some problem. I am working in the "AwesomeApp" project wchich does
not have the "files.cmake" file I tried to create it (with the MOC_H_FILES
variable) but it doesn't seems to work. I have to add something else?
Thanks
Yari
Il 28.07.2015 19:04, Sascha Zelzer ha scritto:
> 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
------------------------------------------------------------------------------
_______________________________________________
mitk-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mitk-users