Ask Your Question
0

How to bundle openCV *.so files into libopencv_java3.so (or single *.so file) ?

asked 2019-11-06 09:19:00 -0600

updated 2019-11-06 10:54:00 -0600

berak gravatar image

Hi

I am trying to build opencv4.1.1+opencv_contrib modules 4.1.1 with android NDK r20. Think I am almost there: went through Cmake configure/generate, compilation of shared libs 100% OK for arm64-v8a. Even install step seems to generate required resources but I am not sure of one thing:

I was used to include prebuilt libopencv_java3.so, so I expected that my build would end up with that lib, but I have 46 *.so files in build output folder ? I am probably missing an option in Cmake configuration or there is something I missed completely (new to openCV build so entirely possible) ?

Thanks for your help!

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2019-11-12 03:26:39 -0600

Always awkward to answer your own question but still found the info I was missing, maybe of use, on following page: Building Java Wrapper For OpenCV

If I have managed to build my libopencv_java4.so file, it seems it doesn't link properly at runtime with message like:

java.lang.UnsatisfiedLinkError: dlopen failed: cannot locate symbol "fread_unlocked" referenced by ... /lib/arm64/libopencv_java4.so

Which I have no real clue how to debug, if anyone has, would be great!

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2019-11-06 09:19:00 -0600

Seen: 1,939 times

Last updated: Nov 06 '19