Search code examples
android-ndkcygwin

ndk build error with android namespace


I'm using stock cygwin for ndk-build and im getting errors like

C:/Users/374565.NOAM/workspace/UltraSoundJNI/jni/utils/Errors.h:24: 
error: expected '=', ',', ';', 'asm' or '__attribute__' before 'android'

this line is :

namespace android{

this happens in multiple files, how do i fix this?


Solution

  • It seems that you are trying to compile C++ code as pure C.