1
votes

Thanks in advance for your help.

I'm trying to make a NDK project and using IBinder and RefBase(looper, sp, wp certainly necessary). But even before linking, an compiling error happens:

arm-linux-androideabi-4.9/prebuilt/linux-x86_64/lib/gcc/arm-linux-androideabi/4.9/include/stdatomic.h:40:9: error: '_Atomic' does not name a type typedef _Atomic _Bool atomic_bool;

then every symbol in stdatomic.h cannot be recognized.

I have using some C++11 flag as below, and tried some random CFLAGS:

-D_GLIBCXX_USE_WCHAR_T -DUSE_CPUSETS

-std=c++11 -std=gnu++11 -pthread -frtti -fexceptions

Im noticed that the stlport file stdatomic.h didn't include other header files, so I guess there should be one or more Compile macros.

But I am new to NDK build, wish some one could give me some suggestions to this problem.

many thanks@!!@

1
You probably #include headers for libbinder and for libutils, which are not part of the NDK. This requires extra care. How are your headers organized?Alex Cohn
I'll check it and send you feedbacks, sorry for late response.Josefus.mv
@Josefus.mv Any update for this Question, as i am also facing same issue.. can you please post Answer.Nishant Bijani A
@AlexCohn if i am using libbinder & libutils then what care i need to take?Nishant Bijani A
@Explore: in the nutshell, you don't need STL to work with system libraries, e.g. libbinder. The compilation errors above have nothing to do with dependencies on RefBase et al.Alex Cohn

1 Answers

0
votes

Did you fix this?

I had this problem too and finally solved it by updating the NDK to android-ndk-r12b and set APP_PLATFORM := android-23 in the Application.mk file.