I have a cascade C/C++ project. Which I build into a shared library. But when I expand the libxxx.so I just found the source codes, assets are not present there. But I did use images in my Assets folder, which is part of my project. And it should be included into shared library also. So, the another application using this shared library can access these assets.
Actually I found this problem while I test my shared library from another cascade application and it getting crashes frequently, because of null pointer exception due to lack of assets. And the problem is solved when I paste images from my assets directory to new project assets directory.
Now, my question is how can I build a shared library along with my images in assets directory? And how to use them from another cascade applicaton so the client need not to worry about those images inside assets directory?
Actually I search a lot but didn't came up with solution for BB10. Please comment your valuable suggestions.
Thanks.
There are not to much information about the build process in your question but I'll try to guess that you are talking about some packaging issues.
Shared library (lib*.so file) do not contain any assets. Assets are part of *.bar package. They are listed in the bar-descriptor.xml file or passed to a blackberry-nativepackager via command line flags. Add all images you need to the bar-descriptor.xml see this file documentation here: http://developer.blackberry.com/native/documentation/bb10/com.qnx.doc.native_sdk.devguide/com.qnx.doc.native_sdk.devguide/topic/r_blackberry_tablet_dtd_intro.html
If you would like to share some assets between several applications you can put them to a public area of the bar package see public attribute of the asset tag documentation here: http://developer.blackberry.com/native/documentation/bb10/com.qnx.doc.native_sdk.devguide/com.qnx.doc.native_sdk.devguide/topic/r_barfile_dtd_ref_asset.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With