dimmak111
dimmak111

Reputation: 21

dlopen fails on android with NDK 10d

i'm trying to open a dll using System.loadLibrary

 System.loadLibrary("myLib");

the lib is found and loaded but it's crashing with an UnsatisfiedLinkError

E/AndroidRuntime( 5557): java.lang.UnsatisfiedLinkError: dlopen failed: cannot locate symbol "pow" referenced by "libmyLib.so"...

i thought that gcc was implicitly linking to libc and libm...

Am i missing something ?

Thanks

Upvotes: 0

Views: 643

Answers (1)

ph0b
ph0b

Reputation: 14463

How did you try to link it manually ? Are you trying to use double pow(double, double) from cmath/math.h ? You aren't getting any warning during compilation ?

Normally, adding this in your Android.mk:

LOCAL_LDLIBS += -lm

should properly link your sources to the NDK's libm.so

Upvotes: 0

Related Questions