Thank you for visiting the BlackBerry Support Community Forums.
BlackBerry will be closing the BlackBerry Support Community Forums Device Forums on April 1st (Developers, see below)
BlackBerry remains committed to providing excellent customer support to our customers. We are delighted to direct you to the CrackBerry Forums, a well-established and thorough support channel, for continued BlackBerry support. Please visit http://forums.crackberry.com or http://crackberry.com/ask. You can also continue to visit BlackBerry Support or the BlackBerry Knowledge Base for official support options available for your BlackBerry Smartphone.
"When we launched CrackBerry.com 10 years ago, we set out to make it a fun and useful destination where BlackBerry Smartphone owners could share their excitement and learn to unleash the full potential of their BlackBerry. A decade later, the CrackBerry community is as active and passionate as ever and I know our knowledgeable members and volunteers will be excited to welcome and assist more BlackBerry owners with their questions."
- Kevin Michaluk, Founder, CrackBerry.com
Developers, for more information about the BlackBerry Developer Community please review Join the Conversation on the BlackBerry Developer Community Forums found on Inside BlackBerry.
09-04-2012 12:53 AM
Like in Android / BlackBerry Java or any other platform, the reusable components can be pushed to a library or similar Library projects to which the main project can be made depended.
Is there any similar approach of Library projects for Cascades?
09-04-2012 04:12 PM
There will be a KB article for how to achieve this task, and there are serveral ways of doing so.
One of them is as follows:
Part 1: create a cascaes project for shared/static lib.
From the qde, Create a Cascades C++ Project.
After the IDE generates the project skeleton from the project template, modify the QT project file, e.g.: the “.pro” file.
Change the line:
TEMPLATE = app
TEMPLATE = lib
You can add
CONFIG += staticlib
if you want to build static lib files not only share lib files.
Build the project, it will generate the desired lib files.
Part 2: compile the "main" cascades project to use the lib project
Edit the .pro file to update the INCLUDEPATH to add the path of the header files of the pre-built header libs.
INCLUDEPATH += <Path to the lib header files>
Edit the .pro file to update the LIBS to add the pre-built libs.
LIBS += -L<path to the libs> -l<lib name>
for example: if your object file is “/usr/someuser/workdir/libdummy.so”,
LIBS += -L/usr/someuser/workdir/ -ldummy
Part 3: bundle the libs together with the main app so that they will be deployed on the target.
You can manually add the shared lib files to the project “assets”, then manually edit the value of “LD_LIBRARY_PATH" in the bar-descriptor.xml file to contain the path pointing to the bundled shared lib files.
For example, if you copy shared lib files to the “assets/myLib”, then, you will have
<env var="LD_LIBRARY_PATH" value=" app/native/assets/myLib:/app/native/lib:/usr/lib/q
Hope this will help.
09-06-2012 09:00 AM
As far as I know, the process of creating and bundling shared libs still at least needs users' manully edit the QT project files.
However, as mentioned in the previous reply, an KB article is being created to help clarify the steps to achieve this task.