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

Adobe AIR Development

New Contributor
Posts: 4
Registered: ‎09-05-2013
My Device: Blackberry Q10
My Carrier: O2

Native Extension device information error

Hi everyone, I need to create a native extension for AIR that will return to the AIR application a string with device model and model number, I need a custom extension becuase it has to return a specific formatted string because the interface will have to work on iOS and Android too.


My problem is that I am not a big expert with c/c++ and I am having some issues with the native project.


I create an AIR native extension with the NDK using the HelloWorld template, and if I #include <bb/device/HardwareInfo> I get the following error:


fatal error: QtGlobal: No such file or directory BlackberryInfo line 10, external location: C:\bbndk\target_10_1_0_1720\qnx6\usr\include\bb\device\Global.hpp C/C++ Problem


I am not sure what is this coming from or how to fix it, if someone could point me out my mistake, how to fix it or how to accomplish in other way what I am doing would be really appreciated. Thanks.



Posts: 427
Registered: ‎02-22-2012
My Device: BlackBerry Z10, BlackBerry Dev Alpha C, BlackBerry PlayBook
My Carrier: Bell

Re: Native Extension device information error

I don't have much experience with ANE's myself, also not much experience with C/C++. Just to confirm you were following the helloWorld template here? ->





Follow me on Twitter: @dustinmalik
Keep up to date on BlackBerry development: http://devblog.blackberry.com/
New Contributor
Posts: 4
Registered: ‎09-05-2013
My Device: Blackberry Q10
My Carrier: O2

Re: Native Extension device information error

I used the Hello World template that appears when I create a new project, if I compile that one it just works, if I add the HardwareInfo library I get that error. I have already created and used an ANE but I can't seem to be able with this library. 



Posts: 508
Registered: ‎01-19-2011
My Device: My Trusty Red Plane
My Carrier: Outer Space

Re: Native Extension device information error

have you linked against the HardwareInfo library? according to the documentation, you have to open your *.pro - file and add the following line

 LIBS += -lbbdevice




I'm a bird from outer space. But I'm not flappy o.o