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
Contributor
helixion
Posts: 17
Registered: ‎03-28-2012
My Device: Developing on multiple models
My Carrier: Multiple providers
Accepted Solution

No Includes

Hi,

 

I am trying to include some of my headers through Properties->C/C++ General->Includes->GNU C. But when compiling those paths are not picked up (I can't find any -I<my include path> in the compilation). Is that not the right place to provide include files? Or what's happening?

 

Please let me know if need more infomration in this regard.

 

Thanks

Please use plain text.
Developer
HuXu77
Posts: 196
Registered: ‎02-10-2011
My Device: Playbook 16GB and Z10
My Carrier: Verizon

Re: No Includes

You are trying to include some of YOUR headers? As in you created some .h files and you have them in your project directory?

If so all you do is just #include "whatever.h" in your other classes and under Properties->C/C++ General->Source Location make sure it has your project src directory included.

If you are using the lastest version of Momentics IDE you will have a config.pri file in your project and that will have your source files automatically populated. If you don't have that then you are going to need to add them manually to the .pro file.

Let us know what the case is for you.
_________________________________________________
Apps
Go Music
Flashlight Fast Free/Pro
Fitbit for BlackBerry PlayBook
Please use plain text.
Developer
igosoft
Posts: 71
Registered: ‎09-19-2012
My Device: Z10 very soon
My Carrier: Play

Re: No Includes

 

Open project file - file extenstin should be .pro

and add

 

INCLUDEPATH +=   your_path1/include \

                                    your_path2/include

 

where your_path1 and your_path2 are the paths to includes

Please use plain text.
Contributor
helixion
Posts: 17
Registered: ‎03-28-2012
My Device: Developing on multiple models
My Carrier: Multiple providers

Re: No Includes

Thanks very much guys,

 

Actually I am trying to include a library that is not even in the current workspace. All I have is a list of header files and a .a library file. Yes I use the latest Momentics IDE. Including th -I's, -L's, -i's and l's in the pro file works without any problem. If that's the case, then what is the C/C++ General->Includes->GNU C for? 

 

However my long term plan is to find a robust mechanism for dependancy management for C++ projects in eclipse including Blackberry projects. I already have an Eclipse (indigo) installation with Maven configured for Java and C++ (through maven-nar plugin) projects. Is it possible to configure the existing Eclipse for BB10 development. Please point me to any documentations if there is any.

 

Thanks

Please use plain text.
Contributor
helixion
Posts: 17
Registered: ‎03-28-2012
My Device: Developing on multiple models
My Carrier: Multiple providers

Re: No Includes

For now I am including the files through the pro file which makes my project happy.

Thanks for your responses.
Please use plain text.