Enable Exception C++

后端 未结 8 778
醉梦人生
醉梦人生 2021-01-01 13:00

I am trying to make APP native code for Android. The Native code is in cplusplus. Whenever I try to make, the following error appears.

H236Plus.cpp:13

8条回答
  •  清酒与你
    2021-01-01 13:29

    Just a note for anyone who has started with one of the NDK examples.

    They tend to set -fno-exceptions in their CMakeLists.txt, you need to remove it:

    set(CMAKE_CXX_FLAGS  "${CMAKE_CXX_FLAGS} -Wall -Werror -fno-exceptions -frtti") 
    

    You might want to check whether you want -Werror while you're at it.

提交回复
热议问题