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
Developer
Posts: 6,152
Registered: ‎07-05-2012
My Device: Playbook, Dev Alpha C, Z10 LE, Z30
My Carrier: Orange

Re: How to generate .moc file

Can you post your .pro file you are probably missing a library inclusion.

If you've been helped click on Like Button, if you've been saved buy the app. Smiley Happy

Developer of stokLocker, Sympatico and Super Sentences.
Highlighted
Developer
Posts: 17
Registered: ‎01-09-2014
My Device: BB10
My Carrier: Airtel

Re: How to generate .moc file

.pro file:

 

APP_NAME = SnM

 

CONFIG += qt warn_on cascades10

 

include(config.pri)

LIBS += -lbb

LIBS += -lbbdata

LIBS += -lbbsystem

LIBS += -lbbcascades

LIBS += -lbbutility

LIBS += -lQtCore

 

Thanks.

Developer
Posts: 17
Registered: ‎01-09-2014
My Device: BB10
My Carrier: Airtel

Re: How to generate .moc file

Hi BBSJdev,

Is anything missing in .pro file??
Developer
Posts: 17
Registered: ‎01-09-2014
My Device: BB10
My Carrier: Airtel

Re: How to generate .moc file

Hi BB Team,

 

May I get any help from your side regarding this situation as I am stucking in it.

Developer
Posts: 17
Registered: ‎01-09-2014
My Device: BB10
My Carrier: Airtel

Re: How to generate .moc file

I got the solution to generate .moc file for every class.

We can generate it manually, if it doesn't get created by compiler automatically.

 

This solution is tricky or we can say a silly solution but this works for me every time and for every classes.

Solution is:

 

1. Open .o file for the NEW CREATED FILE.

2. Clean and build the project.

3. Press Ctrl+shift+R in Eclipse IDE and type 'moc_<file name>', you will get that moc has been generated for your file.

 

Finally, I got the solution - tricky solution.Smiley Happy

Developer
Posts: 6,152
Registered: ‎07-05-2012
My Device: Playbook, Dev Alpha C, Z10 LE, Z30
My Carrier: Orange

Re: How to generate .moc file

There should be no reason that the moc file isn't generated, I recommend using the bug reporting system within Momentics to report the problem after a build, I'm sure the Momentics Dev team will want to see why this is happening.

If you've been helped click on Like Button, if you've been saved buy the app. Smiley Happy

Developer of stokLocker, Sympatico and Super Sentences.