CMakeList.txt使用target_link_libraries替换find_library,否则NDK版本高于19就会报错error: undefined reference to '__write_chk'
jiyewushen opened this issue · comments
NDK issue
建议:直接使用target_link_libraries替换find_library
# find_library(log-lib log)
# find_library(jnigraphics-lib jnigraphics)
# find_library(z-lib z)
target_link_libraries(log jnigraphics z)
done
good, it works
and need to delete libz in below target_lin_libraries code:
if(${ANDROID_ABI} STREQUAL x86 OR ${ANDROID_ABI} STREQUAL x86_64)
target_link_libraries(${TARGET} opencv_imgproc opencv_core ippiw ippicv ittnotify tbb cpufeatures)
else()
target_link_libraries(${TARGET} opencv_imgproc opencv_core tegra_hal tbb cpufeatures)
endif()