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: 169
Registered: ‎03-25-2011
My Device: Playbook, Z10 L.E.
My Carrier: Vodafone NL
Accepted Solution

How do I create a Qt Shared Library and use it on Headless App?

Hello everyone,

 

I'm experimenting with some basic headless Cascades app development and I just hit another blocking issue.

I want to create a Qt library with some shared code used between the headless and UI parts.

This is what I did:

  1. created a new Headless App project using the Wizard
  2. created a new Shared Library project using the Wizard. Added a simple C++ class to it (not Qt)
  3. Configured both parts of the Headless App project to use the Shared Library ("Library project in the workspace" option from the "Add Library..." Wizard). Everything compiles and runs fine until here.
  4. Now I want to use Qt from the Shared Library. I choose "Standard BlackBerry platform library" and "Platform > Qt Core" from the "Add Library..." Wizard. Now I got this error on the Shared Library project: C:\dev\bbndk\host_10_2_0_15\win32\x86\usr\bin\ntoarm-ld: cannot find -lQtCore

How do I create a Qt Shared Library and use it on Headless App?

Actually, I would also like to use some other NDK libraries on the Shared Library like lbbdata and libbbdevice.

 

I was expecting that the Wizards would deal with all the problems for me. As a improvement, I would suggest adding the platform library selection screen from the "Add Library..." wizard to the "Shared Library Project" wizard.

Cheers!
Developer
Posts: 1,746
Registered: ‎04-08-2010
My Device: Passport Silver, PRIV
My Carrier: Telekom.de, O2, Vodafone

Re: How do I create a Qt Shared Library and use it on Headless App?

there's a Library Template project

https://github.com/blackberry/Cascades-Community-Samples/tree/master/Cascades-Library-Template

 

unfortunately the create library wizard isn#t really helpful

 

also there's a great series on headless using library from headless and UI:

http://devblog.blackberry.com/2014/02/a-flexible-architecture-for-enterprise-mobile-applications-par...

 

-------------------------------------------------------------------------------
ekke (independent software architect, rosenheim, germany)

BlackBerry Elite Developer
BlackBerry Platinum Enterprise Partner
International Development native Mobile Business Apps
BlackBerry 10 | Qt Mobile (Android, iOS)
Workshops / Trainings / Bootcamps

blog: http://ekkes-corner.org
mobile-development: http://appbus.org Twitter: @ekkescorner
Developer
Posts: 169
Registered: ‎03-25-2011
My Device: Playbook, Z10 L.E.
My Carrier: Vodafone NL

Re: How do I create a Qt Shared Library and use it on Headless App?

I'll definitely take a look into these links!
Thanks a lot Ekke!
Cheers!