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
base8
Posts: 26
Registered: ‎06-27-2012
My Device: Playbook
My Carrier: n/a
Accepted Solution

C++ classes in subfolders

After creating a default Cascades project which put C++ class source files in the src folder, if I add a new class within a subfolder of src, the build process does not compile any of the cpp files in the subfolders.

 

Is this possible? It is hard to organise large projects without being able to use subfolders.

Please use plain text.
BlackBerry Development Advisor (Retired)
smacmartin
Posts: 499
Registered: ‎05-07-2012
My Device: developer
My Carrier: developer

Re: C++ classes in subfolders

[ Edited ]

Look at sample cascadescookbookcpp.

Or just play with moving files to subfolders in momentics.

The directory needs to be added to the project.  This is done automatically if you move the file from within momentics.

 

Stuart

Please use plain text.
Contributor
base8
Posts: 26
Registered: ‎06-27-2012
My Device: Playbook
My Carrier: n/a

Re: C++ classes in subfolders

I created the class under src in Momentics, then I created the subfolder under src, also within Momentics and finally dragged the file into the subfolder, within Momentics. This did not work; performing a clean build, the cpp file in the subfolder is never compiled.

 

I've tried adding a new folder on the same level as src, such as in cascadescookbookcpp and that doesn't work either.

I've tried creating both a Folder and a Source Folder in Momentics. No difference.

 

For cascadescookbookcpp, I noticed that in "C/C++ General" > "Paths and Symbols" > "Source Location" that only /cascadescookbookcpp/src is listed so I don't know how the cpp files in the recipes folder are being compiled, especially since it is not of type "Source Folder"

 

Any further help would be appreciated.

 

Thanks!

 

 

Please use plain text.
Contributor
base8
Posts: 26
Registered: ‎06-27-2012
My Device: Playbook
My Carrier: n/a

Re: C++ classes in subfolders

Ok, so you need to edit your .pro file and add the sources there.

Please use plain text.
Contributor
netvampire
Posts: 15
Registered: ‎02-05-2012
My Device: Playbook
My Carrier: Fido

Re: C++ classes in subfolders

Can you explain what to add to the pro file to have the source in subfolders recognized?

Please use plain text.