nihui / opencv-mobile

The minimal opencv for Android, iOS, ARM Linux, Windows, Linux, MacOS, HarmonyOS, WebAssembly, watchOS, tvOS, visionOS
Apache License 2.0
2.56k stars 347 forks source link

android版本调用imread时链接时报错 #152

Open chinesesoft8 opened 1 month ago

chinesesoft8 commented 1 month ago

ibopencv_video.a /work/mnn/opencv-mobile-4.10.0-android/sdk/native/staticlibs/arm64-v8a/libopencv_core.a -fopenmp -static-openmp -ldl -lm -llog -latomic -lm ld.lld: error: undefined symbol: cv::display_fb::open()

referenced by highgui.cpp highgui.cpp.o:(cv::imshow(std::ndk1::basic_string<char, std::__ndk1::char_traits, std::ndk1::allocator> const&, cv::_InputArray const&)) in archive /home/liujt/work/mnn/opencv-mobile-4.10.0-android/sdk/native/staticlibs/arm64-v8a/libopencv_highgui.a

ld.lld: error: undefined symbol: cv::display_fb::get_width() const 想开发一个sdk供android和ios公用,把读取文件放在sdk里头,编译时报错

chinesesoft8 commented 1 month ago

重新编译android库,去掉imshow函数已解决。

vinayhvaghamshi commented 1 month ago

Found that imshow is not natively supported on Android platforms. Instead, for Android, some alternative ways for use cv::imwrite to 1. save and display media file