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

Re: How do you define preprocessor directives?

@BGmot: It seems that with the BB10 Cascades projects, the .pro files are the ones used by default and all its settings need to be done in the .pro file as there doesn't seem to be any GUI for it. I hope this changes.

 

@salom's response does beg the question: Is it possible to switch from a .pro file to a make file?

Please use plain text.
BlackBerry Development Advisor (Retired)
selom
Posts: 60
Registered: ‎05-10-2012
My Device: Blackberry 10 Alpha
My Carrier: none

Re: How do you define preprocessor directives?

hi base8,

 

I can't say. It is probably possible but I imagine not as fast as simply creating a makefile project and moving the files over.

 

Cheers

Selom

Please use plain text.
BlackBerry Development Advisor (Retired)
selom
Posts: 60
Registered: ‎05-10-2012
My Device: Blackberry 10 Alpha
My Carrier: none

Re: How do you define preprocessor directives?

Hi Base, just as a follow up do you have any further questions related to this topic or is the issue resolved for you? If it is I would kindly ask you to mark the thread as solved.

 

Cheers

Selom

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

Re: How do you define preprocessor directives?

The .pro file solution works with regards to defining preprocessor directives.

Please use plain text.
Developer
mzex
Posts: 368
Registered: ‎06-30-2012
My Device: Playbook, Z10LE, DevAlpha C
My Carrier: Telenor, Mobitel

Re: How do you define preprocessor directives?

Depends on what project type you choose, native or managed build.. If you choose managed, you can set it via project->properties->c++ build->settings->tool settings->preprocessor. If you choose makefile build, you will not get this options.

Please use plain text.
Developer
djogon
Posts: 93
Registered: ‎10-29-2012
My Device: Z10
My Carrier: Various

Re: How do you define preprocessor directives?

Defining different preprocessor directives for different build configurations is really a VERY basic functionality. 

Why - that's why we have the build configurations - to define a build specific stuff. Preprocessor directives are high on the list of build specific stuff.

 

I would like to specify a directive that will do certain things if I'm building for the simulator or if I'm building a debug version of the projects, but not have it in the release version. I want to create a custom build with only certain features enabled... Common stuff.

 

I still can't believe this is not possible without changing the .pro file. Changing the .pro file is one thing, but it is not a build configuration. If I could use a different .pro file with different build configuration - then it would be ok - as it is - changing the .pro file is almost useless.

 

Are we missing something?

 

Please use plain text.
Developer
BGmot
Posts: 1,068
Registered: ‎11-24-2011
My Device: PlayBook
My Carrier: x

Re: How do you define preprocessor directives?

Why this

>If you choose managed, you can set it via project->properties->c++ build->settings->tool settings->preprocessor

does not work for you?

Please use plain text.
Developer
djogon
Posts: 93
Registered: ‎10-29-2012
My Device: Z10
My Carrier: Various

Re: How do you define preprocessor directives?

Because there is no "Tool settings" menu in a C++ cascades based project. I attached a screenshot.

 

Please use plain text.
Developer
BGmot
Posts: 1,068
Registered: ‎11-24-2011
My Device: PlayBook
My Carrier: x

Re: How do you define preprocessor directives?

Sorry, keep forgetting that this is about cascades.

Why people don't use Cascades forum for questions about Cascades?

'Workaround' that comes to my mind - create project as *not* Cascades, then you'll have all these options and as far as I understand nothing prevents you from doing Cascades app.

Please use plain text.