Compile error: "undefined reference to `__cxa_end_cleanup'"

recently I installed android NDK on MAC, Im trying to run a project using cocos2d. Everything seems to go well. but after compile I get this error. I think it’s a problem with the linker but I dont know how to solve this issue. Im running the bash coming with cocos2dx running the following line for start with the compile:

$ANDROID_NDK_ROOT/ndk-build -C $GAME_ANDROID_ROOT $*

where

ANDROID_NDK_ROOT=/Users/user/android-ndk-r7
COCOS2DX_ROOT=/Users/user/cocos2d-x
GAME_ROOT=$COCOS2DX_ROOT/MyGame
GAME_ANDROID_ROOT=$GAME_ROOT/android

Can anyone help me to solve this issue? thanks in advance.

Finally I could solve my problem.
I was using the FLAG -fexceptions for compiling and that was breaking my build.

I addded this flag because jsoncpp library is using exceptions, I´ve commented the throw exceptions in the library. If anyone knows how to compile this library properly, please let me know.

Thanks