Ask Your Question

Revision history [back]

Dynamic link issue: java.lang.UnsatisfiedLinkError: dlopen failed: cannot locate symbol "fread_unlocked"

Hello,

I have an android app which was using openCV 3.4.5 but now need to add opencv_contrib modules to it. I have tried to build and use either 3.4.8 and 4.1.2 with associated opencv_modules versions. I managed to generate the corresponding libopencv_javaX.so and updated my android project accordingly (but I may lack configuration stuff either in openCV or my project).

Each time my app don't even open and crash on the following dynamic link message: java.lang.UnsatisfiedLinkError: dlopen failed: cannot locate symbol "fread_unlocked" referenced by "/data/app/...

I am not a java developper, all the app in developped in C++ so I don't have a clue of what is happening at that level apart understanding that there is a link issue with libc++_XXX.so used (both static and shared show the same output behavior).

I am using NDK r20, SDK 26.1.1

Not sure if I missed important config in openCV build or if my android app project miss something (working fine with dowloaded openCV SDK 3.4.5 but missing contrib obviously).

Any help will be greatly apreciated, thx !