Setting up C++11 (std::thread) for NDK with ADT/Eclipse

前端 未结 3 1241
心在旅途
心在旅途 2020-12-19 03:33

I have been trying to use C++11. I am developing an android project and i want to use std::mutex. Along with OpenCV But no matter what I do, I just cant seem to fix the

3条回答
  •  渐次进展
    2020-12-19 04:22

    Support for std::thread is a bit special. The issue is addressed, for example, in this article by Binglong. The article is really short, but it can be summarized in one sentence:

    You cannot use the (default) gcc 4.6 toolchain if you want to #include or #include .

    So, please add NDK_TOOLCHAIN_VERSION=4.8 or NDK_TOOLCHAIN_VERSION=clang to your Application.mk.

    For ADT to rebuild its Index correctly, see Android NDK build, Method could not be resolved or Eclipse compiles successfully but still gives semantic errors.

提交回复
热议问题