atom feed17 messages in com.googlegroups.android-ndkRe: Platform define: ANDROID or __AND...
FromSent OnAttachments
PeterSep 2, 2010 5:37 am 
Damien LespiauSep 2, 2010 9:47 am 
Angus LeesSep 2, 2010 8:42 pm 
PeterSep 3, 2010 12:21 am 
David TurnerSep 3, 2010 9:35 am 
PeterSep 6, 2010 12:05 am 
David TurnerSep 6, 2010 1:08 am 
PeterSep 6, 2010 5:18 am 
alanSep 6, 2010 8:34 am 
Doug SchaeferSep 6, 2010 8:51 am 
Tim MenschSep 6, 2010 12:35 pm 
Angus LeesSep 6, 2010 1:52 pm 
Doug SchaeferSep 6, 2010 2:46 pm 
Tim in BoulderSep 6, 2010 3:14 pm 
David TurnerSep 7, 2010 5:29 am 
mani krishnanFeb 23, 2013 1:10 am 
Jeffrey WaltonFeb 23, 2013 3:58 am 
Subject:Re: Platform define: ANDROID or __ANDROID__?
From:Doug Schaefer ("cdt@gmail.com)
Date:Sep 6, 2010 8:51:48 am
List:com.googlegroups.android-ndk

On Mon, Sep 6, 2010 at 11:34 AM, alan <a.@birtles.org.uk> wrote:

I've just updated all our files to use __ANDROID__ instead of ANDROID and am having the same problem as the above user that __ANDROID__ doesn't seem to be defined (I am using the crystax build if that makes any difference)

It doesn't seemed to be defined in the official NDK either...

I ran into this when I was playing with OGRE and same result. I had to define __ANDROID__ myself.

On Sep 6, 1:18 pm, Peter <pete@gmail.com> wrote:

Well, I tested it and now I'm confused, because without any flags defined this _doesn't_ fail:

#if defined(__ANDROID__) bla i = 5; #endif

And if I print the build-in definitions using: echo | arm-eabi-g++ -E -dM -

there is nothing defining __ANDROID__ (using NDK r4b).

So it's necessary to define it in the CMakeLists.txt?

On 6 Sep., 10:08, David Turner <di.@android.com> wrote:

Yes, __ANDROID__ is defined by GCC