error: exception handling disabled, use -fexceptions to enable

  編譯錯誤如下:

java/android/tinyWRAP_wrap.cxx: In member function 'virtual int SwigDirector_DDebugCallback::OnDebugInfo(const char*)':
java/android/tinyWRAP_wrap.cxx:740:52: error: exception handling disabled, use -fexceptions to enable
       throw Swig::DirectorException(jenv, swigerror);
                                                    ^
Makefile:778: recipe for target 'java/android/libtinyWRAP_la-tinyWRAP_wrap.lo' failed

  怎麼辦?

CPPFLAGS=-fno-exceptions
改成
CPPFLAGS=-fexceptions

或者

Android.mk
LOCAL_CPPFLAGS += -fexceptions

Application.mk
APP_CPPFLAGS  += -fexceptions

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章