java.lang.UnsatisfiedLinkError: dlopen failed: library "***/libpaddle_lite_jni.so" not found
Created by: imistyrain
系库生成时未设置soname所致,
objdump -p libpaddle_lite_jni.so | grep SONAME
无任何输出 需设置IMPORTED_NO_SONAME属性,在CMakeLists.txt里引用库的具体方法如下
add_library(lib_lite SHARED IMPORTED )
set_property(TARGET lib_lite PROPERTY IMPORTED_NO_SONAME 1)
set_target_properties( lib_lite
PROPERTIES IMPORTED_LOCATION
${LIB_DIR}/libpaddle_lite_jni.so )
参考 The problem might be that the soname is not set 用 CMake 的一点经验