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

Posts: 1
Registered: ‎02-15-2013
My Device: Blackberry Dev Alpha A
My Carrier: Megafon

AIR Native Extension with usage of library that requires Qt

Hi, everyone. I'm trying to create native extension for AIR, where i using Blackberry Device Info. When i add this library and QtCore to my project, and trying to use classes from Blackberry Device Info, i get error during compiling -
"fatal error: QtCore/qconfig.h: No such file or directory       line 62, external location: /Applications/bbndk/target_10_0_9_1673/qnx6/usr/include/qt4/QtCore/qglobal.h    C/C++ Problem"
can any one help me how to fix it? May be i can get information about carrier using BPS? But i'm looking into BPS API and there is nothing about getting carrier name. Thanks for help.

Posts: 1,123
Registered: ‎02-10-2009
My Device: 8130 / 8350 / 9530 / 9550 / 9850 / PlayBook
My Carrier: Verizon

Re: AIR Native Extension with usage of library that requires Qt

I received a similar error and it was because I only included the ..../qt4/QtCore directory but you also need to add the ..../qt4 directory because the headers are included as <QtCore/.....>
New Contributor
Posts: 6
Registered: ‎08-21-2013
My Device: Z10 Dev Alpha B
My Carrier: None

Re: AIR Native Extension with usage of library that requires Qt

[ Edited ]

Can you please explain how to set the includes in the BlackBerry QNX Momentics IDE? I can't find anything in the IDE that seems to correspond to a Makefile -I directive, and there are no Makefiles to edit by hand. 



The include directives are not under the C/C++ Build section, but under the C/C++ General section. I personally don't think that makes any sense, but that's where it is. 


My simple modification of the HelloAir sample now runs into 275 errors in code I have not written. This is the kind of problem that I have seen when trying to compile C++ code with a C compiler, but I don't see any way to switch the compiler, and when I built the project I selected C++. 


Has anyone successfully built an ANE that includes functionality from BlackBerry's Qt libraries? Looking at the github repository of ANE files, not a single one uses Qt. They all appear to use straight C, and Qt is C++. 



I am simply trying to read the phone number from the device using


and then pass that back to the actionscript layer. I have built an ANE successfully with a native Android implementation, so I am familiar with the general headache of building an ANE, but the native layer of BlackBerry is causing me a giant headache. If someone could help me with either:

1) building the C++ native library with Qt


2) reading the device phone number in straight C

I would really appreciate the assistance. 



New Developer
Posts: 20
Registered: ‎08-19-2012
My Device: Playbook
My Carrier: Mobilicity

Re: AIR Native Extension with usage of library that requires Qt

I'm having exactly the same issue.  Did anyone figure it out?