I’m getting famous unsatisfied link error when I’m trying to launch my C++ based app on Android. I’ve tried several ways to solve this out and found out that when I comment out all calls to math.h functions (like sin or sqrt) the application launches correctly.
I am linking my .so library only with libGLESv1_CM.a and in Java I call:
static {
try
{
System.loadLibrary("GLESv1_CM");
System.loadLibrary("Game");
}
catch(UnsatisfiedLinkError error)
{
Log.e("MyGame", "Failed to launch game");
}
}
Am I missing something?
You should link it with libm. Add the following to your Android.mk file: