Compiling C++11 sources for Android NDK

前端 未结 1 1465
猫巷女王i
猫巷女王i 2021-01-13 17:23

I\'m trying to compile some C++11 sources with Android NDK on Windows, but without much luck. Please note, that I\'ve read some other questions about compiling C++11, but th

相关标签:
1条回答
  • 2021-01-13 17:59
    LOCAL_CPP_FEATURES += exceptions
    LOCAL_CFLAGS += -std=c++11
    

    Should go into Android.mk file. Alternatively, you could put

    APP_CFLAGS += -std=c++11
    

    into Application.mk. You can also use APP_CPPFLAGS instead, so that the C sources in your project (if you choose to add them) could compile (the C compiler will not like -std=c++11).

    0 讨论(0)
提交回复
热议问题