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
Posts: 26
Registered: ‎09-20-2013
My Device: Z10
My Carrier: Orange

Static Library - problem with QObject

I created a static library with sdk 10.2gold. I now get problem with the QObject. The static library builts ok with Q_OBJECT. But, when I reference my static lib in the cascade application, the compiler gets the error below.

 

undefined reference to `vtable for ClassName'

 

My static library needs to include some QObject with slots and signals. could anyone tell me how to solve this problem?

 

Thanks

Retired
Posts: 571
Registered: ‎06-25-2010
My Device: Z10
My Carrier: Vodafone

Re: Static Library - problem with QObject

This sounds like a linking problem rather than compilation. I don't understand your reference to Q_OBJECT however. Can you elaborate please?

 

What is the name of your static library, where have you placed it and what does the content of your .pro file look like?

 

 

--------------------------------------------------------------------------------------------
Feel free to press the like button on the right side if you liked my attempts to help :-)
And please mark posts as solved if you think I found the solution or set you on its path. Thanks!
Follow me on Twitter: @mdwrim
Retired
Posts: 418
Registered: ‎07-18-2012
My Device: Q10
My Carrier: Bell Canada

Re: Static Library - problem with QObject

Is moc being run correctly?

 

Are your virtual functions implemented?

 

Try compiling a class in a Qt project, then as your library and compare the output of;

ntoarm-readelf -a <yourmodulename>

 

--
Rob is no longer associated with BlackBerry.