How to compile c++11 code with android ndk and eclipse?

前端 未结 2 1134
孤独总比滥情好
孤独总比滥情好 2020-12-29 08:14

I\'m using android NDK r8d, and eclipse Juno. I\'m trying to compile C++ code which uses C++11 stuff like mutex, lock_guard, shared_ptr

2条回答
  •  春和景丽
    2020-12-29 08:55

    I find export an environment variable NDK_TOOLCHAIN_VERSION=4.8 before i start eclipse can solve this problem.

    Eclipse use ndk's default toolchain version 4.6, if NDK_TOOLCHAIN_VERSION is not define, and gcc witch this version does not support all c++11's future like multithread and so on.

提交回复
热议问题