09-16-2013 10:55 AM
I'm developing a cross-platform library and i need some code to be compiled only on the specific OS, for now Android and BlackBerry.
I need the name of a define to put in a #ifdef block to compile some code only when the destination OS is BlackBerry. This to avoid errors when I'm compiling for Android OS.
I found the __QNX__ define but this define seem to be not defined at compilation time and the code in the #ifdef block is not taken. Does exist a define to identify the OS environment for BlackBerry ?
09-16-2013 11:27 AM
09-17-2013 04:16 AM
I found the __QNX__ define using the same method you have described (running ntoarm7-gcc -dM -E -).
The IDE seem to recognize the __QNX__ symbol but when I compile the project i get the error:
error: 'MyClass' has not been declared In file included from ../src/main.cpp:10:0:
This mean that the #ifdef block the class declaration. The error disappear if I comment the #ifdef and #endif declarations.
09-17-2013 10:15 AM