Issue
I just installed the latest version of Android NDK (r11b) on a new machine. When I compile my C++ code, I get an error that "__pure2" has been redefined. It appears include file math.h
includes sys/cdefs.h
. Both of them unconditionally define a macro called "__pure2" and both of them define it differently.
The same code works fine on my older machine. Upon investigation, it appears on my machine $ndk\platforms\android-9\arch-arm\usr\include\sys\cdefs.h does not have any definition of "__pure2." Looks like someone introduced this recently. Wondering if anyone else has seen this problem.
For now, I have just commented the macro definition in sys/cdefs.h
. Is there a better way to fix this? Regards.
Solution
There's a bug ticket tracking this issue, actually. You might want to follow it for further updates, but it looks like it will be fixed in NDK r12. I would probably opt for using #ifndef to work around it as mentioned in the ticket comments.
#ifndef __pure2
#define __pure // whatever the original definition is
#endif
Answered By - Francesca Nannizzi
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.