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
Developer
Posts: 90
Registered: ‎05-31-2012
My Device: BlackBerry Playbook
My Carrier: Bell
Accepted Solution

Predefined macros for Simulator.

Hello RIM Native Dev Forums,

 

Is there a predefined macro for simulator targets or do we need to define our own?

 

Thanks!

 

 

Developer
Posts: 60
Registered: ‎04-18-2012
My Device: BB10 Dev Alpha C
My Carrier: T-Mobile

Re: Predefined macros for Simulator.

You can check for simulator env in the run-time using deviceinfo_details_is_simulator function, see bps/deviceinfo.h.
--
Oleg Shparber
Developer
Posts: 90
Registered: ‎05-31-2012
My Device: BlackBerry Playbook
My Carrier: Bell

Re: Predefined macros for Simulator.

Thanks for the info trollixx.

 

Unfortunately, I am looking for a preprocessor macro to preprocess some ARM asm code. No problem defining my own, but it would be nicer to use the predefined one if it exists.

Developer
Posts: 60
Registered: ‎04-18-2012
My Device: BB10 Dev Alpha C
My Carrier: T-Mobile

Re: Predefined macros for Simulator.

Then go with __arm__ predefined macro.
--
Oleg Shparber
Developer
Posts: 90
Registered: ‎05-31-2012
My Device: BlackBerry Playbook
My Carrier: Bell

Re: Predefined macros for Simulator.

Thanks Oleg!
Developer
Posts: 110
Registered: ‎10-22-2011
My Device: PlayBook, Bold 9650, Dev Alpha A
My Carrier: Sprint

Re: Predefined macros for Simulator.


trollixx wrote:
You can check for simulator env in the run-time using deviceinfo_details_is_simulator function, see bps/deviceinfo.h.



Sorry to hijack a bit, but do you have further information about this?

 

https://developer.blackberry.com/native/reference/com.qnx.doc.bps.lib_ref/com.qnx.doc.bps.lib_ref/to... nor https://developer.blackberry.com/native/beta/reference/com.qnx.doc.bps.lib_ref/com.qnx.doc.bps.lib_r... list it for either 2.0 or 10. Nor do I see it in bps/deviceinfo.h in my includes.



Is there a helpful or useful post in this thread? Click the thumbs up on it so that other people can find it more easily!
Like this post too! Smiley Very Happy
Developer
Posts: 60
Registered: ‎04-18-2012
My Device: BB10 Dev Alpha C
My Carrier: T-Mobile

Re: Predefined macros for Simulator.

See <BB10 NDK INSTALL PATH>/target/qnx6/usr/include/bps/deviceinfo.h
--
Oleg Shparber
Highlighted
Developer
Posts: 110
Registered: ‎10-22-2011
My Device: PlayBook, Bold 9650, Dev Alpha A
My Carrier: Sprint

Re: Predefined macros for Simulator.

OK, so "new in NDK 10" and "so new, it's not on the web yet!"... Too bad that's not terribly useful for PlayBook development yet. Smiley Happy (I can think of a few valid cases for this test.)



Is there a helpful or useful post in this thread? Click the thumbs up on it so that other people can find it more easily!
Like this post too! Smiley Very Happy