Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development

Reply
Contributor
daxfrost
Posts: 20
Registered: ‎07-23-2013
My Device: Z10

Is there an automatic Meta Object Compiler?

Hi there,

I am fairly new to BB development. The last few days I've spent trying to understand why I am getting various errors adding my own library to my BB app. Visiting countless posts like this one: http://supportforums.blackberry.com/t5/Native-Development/undefined-reference-to-vtable-for/m-p/1624... - which only mention manually solving my issue with the moc tool.

 

The issues arise when using macros like Q_OBJECT and around using signals & slots.

 

In the end I managed to get the code to work by manually invoking moc from Terminal on my classes.

 

My question is, is it normal to invoke moc manually? Is there a way for Cascades/NDK to do this automatically?

 

Your wisdom would be appreciated :Yes:

Developer
saprykin
Posts: 271
Registered: ‎05-29-2013
My Device: BlackBerry Z10

Re: Is there an automatic Meta Object Compiler?

Did you configure your project as Cascades one? Momentics IDE should call moc automatically.
-------------------------------------------------------------------------------
NSR Reader for BlackBerry 10 @NSRReader on Twitter
Me @xelfium on Twitter
Contributor
daxfrost
Posts: 20
Registered: ‎07-23-2013
My Device: Z10

Re: Is there an automatic Meta Object Compiler?

Hi saprykin,

I chose a new BlackBerry Static Library project, is there somewhere I need to configure after it has been created?
Developer
saprykin
Posts: 271
Registered: ‎05-29-2013
My Device: BlackBerry Z10

Re: Is there an automatic Meta Object Compiler?

I think it is not supposed to use Qt in such type of project because you will also need (ideally) a static build of Qt, too. If you want to create BlackBerry app using Cascades framework you should choose Cascades project.
-------------------------------------------------------------------------------
NSR Reader for BlackBerry 10 @NSRReader on Twitter
Me @xelfium on Twitter
Contributor
daxfrost
Posts: 20
Registered: ‎07-23-2013
My Device: Z10

Re: Is there an automatic Meta Object Compiler?

thanks saprykin,

 

I understand in the case of an app. However I am trying to link a library project to my application.

 

This thread seems to further my investigation: http://supportforums.blackberry.com/t5/Native-Development/Making-a-Qt-Cascades-library/td-p/1722731

 

Thank you!