Я уже некоторое время пытаюсь заставить OpenCV работать на Xamarin.iOS с arm64. Последняя версия, которую я могу найти на opencv.org, кажется, не построена для arm64. Мне не удалось создать самые последние библиотеки, но получил сборку для OpenCV 2.4.12 (https://github.com/Itseez/opencv/tree/2.4.12). Тем не менее, когда я добавить библиотеку к моему решению (с помощью связывания библиотеки), я получаю следующее сообщение об ошибке:Использование OpenCV в Xamarin.iOS (arm64)
MTOUCH: error MT5210: Native linking failed, undefined symbol: _jpeg_free_large. Please verify that all the necessary frameworks have been referenced and native libraries are properly linked in.
MTOUCH: error MT5210: Native linking failed, undefined symbol: _jpeg_free_small. Please verify that all the necessary frameworks have been referenced and native libraries are properly linked in.
MTOUCH: error MT5210: Native linking failed, undefined symbol: _jpeg_get_large. Please verify that all the necessary frameworks have been referenced and native libraries are properly linked in.
MTOUCH: error MT5210: Native linking failed, undefined symbol: _jpeg_get_small. Please verify that all the necessary frameworks have been referenced and native libraries are properly linked in.
MTOUCH: error MT5210: Native linking failed, undefined symbol: _jpeg_mem_available. Please verify that all the necessary frameworks have been referenced and native libraries are properly linked in.
MTOUCH: error MT5210: Native linking failed, undefined symbol: _jpeg_mem_init. Please verify that all the necessary frameworks have been referenced and native libraries are properly linked in.
MTOUCH: error MT5210: Native linking failed, undefined symbol: _jpeg_mem_term. Please verify that all the necessary frameworks have been referenced and native libraries are properly linked in.
MTOUCH: error MT5210: Native linking failed, undefined symbol: _jpeg_open_backing_store. Please verify that all the necessary frameworks have been referenced and native libraries are properly linked in.
MTOUCH: error MT5202: Native linking failed. Please review the build log.
Я прочитал на https://github.com/twelve17/openalpr-ios/issues/5, что мне нужно сделать ссылку на libjpeg. Я делаю это с помощью следующей команды mtouch: -gcc_flags "-L${ProjectDir} -ljpeg -force_load ${ProjectDir}/libjpeg.a"
Теперь, однако, я получаю ошибку, которая дублирует доступны:
MTOUCH: duplicate symbol _jpeg_std_error in:
MTOUCH: error MT5212: Native linking failed, duplicate symbol: '_jpeg_CreateCompress'.
MTOUCH: error MT5213: Duplicate symbol in: /Users/Alexander/Projects/VRMouse/iOS/obj/iPhone/Debug/mtouch-cache/opencv2.a(jcapimin.o) (Location related to previous error)
MTOUCH: error MT5213: Duplicate symbol in: /Users/Alexander/Projects/VRMouse/iOS/libjpeg.a(jcapimin.o) (Location related to previous error)
MTOUCH: error MT5212: Native linking failed, duplicate symbol: '_jpeg_destroy_compress'.
MTOUCH: error MT5213: Duplicate symbol in: /Users/Alexander/Projects/VRMouse/iOS/obj/iPhone/Debug/mtouch-cache/opencv2.a(jcapimin.o) (Location related to previous error)
MTOUCH: error MT5213: Duplicate symbol in: /Users/Alexander/Projects/VRMouse/iOS/libjpeg.a(jcapimin.o) (Location related to previous error)
MTOUCH: error MT5212: Native linking failed, duplicate symbol: '_jpeg_abort_compress'.
MTOUCH: error MT5213: Duplicate symbol in: /Users/Alexander/Projects/VRMouse/iOS/obj/iPhone/Debug/mtouch-cache/opencv2.a(jcapimin.o) (Location related to previous error)
MTOUCH: error MT5213: Duplicate symbol in: /Users/Alexander/Projects/VRMouse/iOS/libjpeg.a(jcapimin.o) (Location related to previous error)
MTOUCH: error MT5212: Native linking failed, duplicate symbol: '_jpeg_suppress_tables'.
MTOUCH: error MT5213: Duplicate symbol in: /Users/Alexander/Projects/VRMouse/iOS/obj/iPhone/Debug/mtouch-cache/opencv2.a(jcapimin.o) (Location related to previous error)
MTOUCH: error MT5213: Duplicate symbol in: /Users/Alexander/Projects/VRMouse/iOS/libjpeg.a(jcapimin.o) (Location related to previous error)
MTOUCH: error MT5212: Native linking failed, duplicate symbol: '_jpeg_finish_compress'.
MTOUCH: error MT5213: Duplicate symbol in: /Users/Alexander/Projects/VRMouse/iOS/obj/iPhone/Debug/mtouch-cache/opencv2.a(jcapimin.o) (Location related to previous error)
MTOUCH: error MT5213: Duplicate symbol in: /Users/Alexander/Projects/VRMouse/iOS/libjpeg.a(jcapimin.o) (Location related to previous error)
MTOUCH: error MT5212: Native linking failed, duplicate symbol: '_jpeg_write_marker'.
MTOUCH: error MT5213: Duplicate symbol in: /Users/Alexander/Projects/VRMouse/iOS/obj/iPhone/Debug/mtouch-cache/opencv2.a(jcapimin.o) (Location related to previous error)
MTOUCH: error MT5213: Duplicate symbol in: /Users/Alexander/Projects/VRMouse/iOS/libjpeg.a(jcapimin.o) (Location related to previous error)
MTOUCH: error MT5212: Native linking failed, duplicate symbol: '_jpeg_write_m_header'.
MTOUCH: error MT5213: Duplicate symbol in: /Users/Alexander/Projects/VRMouse/iOS/obj/iPhone/Debug/mtouch-cache/opencv2.a(jcapimin.o) (Location related to previous error)
MTOUCH: error MT5213: Duplicate symbol in: /Users/Alexander/Projects/VRMouse/iOS/libjpeg.a(jcapimin.o) (Location related to previous error)
MTOUCH: error MT5212: Native linking failed, duplicate symbol: '_jpeg_write_m_byte'.
MTOUCH: error MT5213: Duplicate symbol in: /Users/Alexander/Projects/VRMouse/iOS/obj/iPhone/Debug/mtouch-cache/opencv2.a(jcapimin.o) (Location related to previous error)
MTOUCH: error MT5213: Duplicate symbol in: /Users/Alexander/Projects/VRMouse/iOS/libjpeg.a(jcapimin.o) (Location related to previous error)
MTOUCH: error MT5212: Native linking failed, duplicate symbol: '_jpeg_write_tables'.
MTOUCH: error MT5213: Duplicate symbol in: /Users/Alexander/Projects/VRMouse/iOS/obj/iPhone/Debug/mtouch-cache/opencv2.a(jcapimin.o) (Location related to previous error)
MTOUCH: error MT5213: Duplicate symbol in: /Users/Alexander/Projects/VRMouse/iOS/libjpeg.a(jcapimin.o) (Location related to previous error)
MTOUCH: error MT5212: Native linking failed, duplicate symbol: '_jpeg_start_compress'.
MTOUCH: error MT5213: Duplicate symbol in: /Users/Alexander/Projects/VRMouse/iOS/obj/iPhone/Debug/mtouch-cache/opencv2.a(jcapistd.o) (Location related to previous error)
MTOUCH: error MT5213: Duplicate symbol in: /Users/Alexander/Projects/VRMouse/iOS/libjpeg.a(jcapistd.o) (Location related to previous error)
MTOUCH: error MT5212: Native linking failed, duplicate symbol: '_jpeg_write_scanlines'.
MTOUCH: error MT5213: Duplicate symbol in: /Users/Alexander/Projects/VRMouse/iOS/obj/iPhone/Debug/mtouch-cache/opencv2.a(jcapistd.o) (Location related to previous error)
MTOUCH: error MT5213: Duplicate symbol in: /Users/Alexander/Projects/VRMouse/iOS/libjpeg.a(jcapistd.o) (Location related to previous error)
MTOUCH: error MT5212: Native linking failed, duplicate symbol: '_jpeg_write_raw_data'.
MTOUCH: error MT5213: Duplicate symbol in: /Users/Alexander/Projects/VRMouse/iOS/obj/iPhone/Debug/mtouch-cache/opencv2.a(jcapistd.o) (Location related to previous error)
MTOUCH: error MT5213: Duplicate symbol in: /Users/Alexander/Projects/VRMouse/iOS/libjpeg.a(jcapistd.o) (Location related to previous error)
MTOUCH: error MT5212: Native linking failed, duplicate symbol: '_jinit_c_coef_controller'.
MTOUCH: error MT5213: Duplicate symbol in: /Users/Alexander/Projects/VRMouse/iOS/obj/iPhone/Debug/mtouch-cache/opencv2.a(jccoefct.o) (Location related to previous error)
MTOUCH: error MT5213: Duplicate symbol in: /Users/Alexander/Projects/VRMouse/iOS/libjpeg.a(jccoefct.o) (Location related to previous error)
MTOUCH: error MT5212: Native linking failed, duplicate symbol: '_jinit_color_converter'.
MTOUCH: error MT5213: Duplicate symbol in: /Users/Alexander/Projects/VRMouse/iOS/obj/iPhone/Debug/mtouch-cache/opencv2.a(jccolor.o) (Location related to previous error)
MTOUCH: error MT5213: Duplicate symbol in: /Users/Alexander/Projects/VRMouse/iOS/libjpeg.a(jccolor.o) (Location related to previous error)
MTOUCH: error MT5212: Native linking failed, duplicate symbol: '_jinit_forward_dct'.
MTOUCH: error MT5213: Duplicate symbol in: /Users/Alexander/Projects/VRMouse/iOS/obj/iPhone/Debug/mtouch-cache/opencv2.a(jcdctmgr.o) (Location related to previous error)
MTOUCH: error MT5213: Duplicate symbol in: /Users/Alexander/Projects/VRMouse/iOS/libjpeg.a(jcdctmgr.o) (Location related to previous error)
MTOUCH: error MT5212: Native linking failed, duplicate symbol: '_jpeg_make_c_derived_tbl'.
MTOUCH: error MT5213: Duplicate symbol in: /Users/Alexander/Projects/VRMouse/iOS/obj/iPhone/Debug/mtouch-cache/opencv2.a(jchuff.o) (Location related to previous error)
MTOUCH: error MT5213: Duplicate symbol in: /Users/Alexander/Projects/VRMouse/iOS/libjpeg.a(jchuff.o) (Location related to previous error)
MTOUCH: error MT5212: Native linking failed, duplicate symbol: '_jpeg_gen_optimal_table'.
MTOUCH: error MT5213: Duplicate symbol in: /Users/Alexander/Projects/VRMouse/iOS/obj/iPhone/Debug/mtouch-cache/opencv2.a(jchuff.o) (Location related to previous error)
MTOUCH: error MT5213: Duplicate symbol in: /Users/Alexander/Projects/VRMouse/iOS/libjpeg.a(jchuff.o) (Location related to previous error)
MTOUCH: error MT5212: Native linking failed, duplicate symbol: '_jinit_huff_encoder'.
MTOUCH: error MT5213: Duplicate symbol in: /Users/Alexander/Projects/VRMouse/iOS/obj/iPhone/Debug/mtouch-cache/opencv2.a(jchuff.o) (Location related to previous error)
MTOUCH: error MT5213: Duplicate symbol in: /Users/Alexander/Projects/VRMouse/iOS/libjpeg.a(jchuff.o) (Location related to previous error)
MTOUCH: error MT5212: Native linking failed, duplicate symbol: '_jinit_compress_master'.
MTOUCH: error MT5213: Duplicate symbol in: /Users/Alexander/Projects/VRMouse/iOS/obj/iPhone/Debug/mtouch-cache/opencv2.a(jcinit.o) (Location related to previous error)
MTOUCH: error MT5213: Duplicate symbol in: /Users/Alexander/Projects/VRMouse/iOS/libjpeg.a(jcinit.o) (Location related to previous error)
MTOUCH: error MT5212: Native linking failed, duplicate symbol: '_jinit_c_main_controller'.
MTOUCH: error MT5213: Duplicate symbol in: /Users/Alexander/Projects/VRMouse/iOS/obj/iPhone/Debug/mtouch-cache/opencv2.a(jcmainct.o) (Location related to previous error)
MTOUCH: error MT5213: Duplicate symbol in: /Users/Alexander/Projects/VRMouse/iOS/libjpeg.a(jcmainct.o) (Location related to previous error)
MTOUCH: error MT5212: Native linking failed, duplicate symbol: '_jinit_marker_writer'.
MTOUCH: error MT5213: Duplicate symbol in: /Users/Alexander/Projects/VRMouse/iOS/obj/iPhone/Debug/mtouch-cache/opencv2.a(jcmarker.o) (Location related to previous error)
MTOUCH: error MT5213: Duplicate symbol in: /Users/Alexander/Projects/VRMouse/iOS/libjpeg.a(jcmarker.o) (Location related to previous error)
MTOUCH: error MT5212: Native linking failed, duplicate symbol: '_jinit_c_master_control'.
MTOUCH: error MT5213: Duplicate symbol in: /Users/Alexander/Projects/VRMouse/iOS/obj/iPhone/Debug/mtouch-cache/opencv2.a(jcmaster.o) (Location related to previous error)
MTOUCH: error MT5213: Duplicate symbol in: /Users/Alexander/Projects/VRMouse/iOS/libjpeg.a(jcmaster.o) (Location related to previous error)
MTOUCH: error MT5212: Native linking failed, duplicate symbol: '_jpeg_abort'.
MTOUCH: error MT5213: Duplicate symbol in: /Users/Alexander/Projects/VRMouse/iOS/obj/iPhone/Debug/mtouch-cache/opencv2.a(jcomapi.o) (Location related to previous error)
MTOUCH: error MT5213: Duplicate symbol in: /Users/Alexander/Projects/VRMouse/iOS/libjpeg.a(jcomapi.o) (Location related to previous error)
MTOUCH: error MT5212: Native linking failed, duplicate symbol: '_jpeg_destroy'.
MTOUCH: error MT5213: Duplicate symbol in: /Users/Alexander/Projects/VRMouse/iOS/obj/iPhone/Debug/mtouch-cache/opencv2.a(jcomapi.o) (Location related to previous error)
MTOUCH: error MT5213: Duplicate symbol in: /Users/Alexander/Projects/VRMouse/iOS/libjpeg.a(jcomapi.o) (Location related to previous error)
MTOUCH: error MT5212: Native linking failed, duplicate symbol: '_jpeg_alloc_quant_table'.
MTOUCH: error MT5213: Duplicate symbol in: /Users/Alexander/Projects/VRMouse/iOS/obj/iPhone/Debug/mtouch-cache/opencv2.a(jcomapi.o) (Location related to previous error)
MTOUCH: error MT5213: Duplicate symbol in: /Users/Alexander/Projects/VRMouse/iOS/libjpeg.a(jcomapi.o) (Location related to previous error)
MTOUCH: error MT5212: Native linking failed, duplicate symbol: '_jpeg_alloc_huff_table'.
MTOUCH: error MT5213: Duplicate symbol in: /Users/Alexander/Projects/VRMouse/iOS/obj/iPhone/Debug/mtouch-cache/opencv2.a(jcomapi.o) (Location related to previous error)
MTOUCH: error MT5213: Duplicate symbol in: /Users/Alexander/Projects/VRMouse/iOS/libjpeg.a(jcomapi.o) (Location related to previous error)
MTOUCH: error MT5212: Native linking failed, duplicate symbol: '_jpeg_add_quant_table'.
MTOUCH: error MT5213: Duplicate symbol in: /Users/Alexander/Projects/VRMouse/iOS/obj/iPhone/Debug/mtouch-cache/opencv2.a(jcparam.o) (Location related to previous error)
MTOUCH: error MT5213: Duplicate symbol in: /Users/Alexander/Projects/VRMouse/iOS/libjpeg.a(jcparam.o) (Location related to previous error)
MTOUCH: error MT5212: Native linking failed, duplicate symbol: '_jpeg_set_linear_quality'.
MTOUCH: error MT5213: Duplicate symbol in: /Users/Alexander/Projects/VRMouse/iOS/obj/iPhone/Debug/mtouch-cache/opencv2.a(jcparam.o) (Location related to previous error)
MTOUCH: error MT5213: Duplicate symbol in: /Users/Alexander/Projects/VRMouse/iOS/libjpeg.a(jcparam.o) (Location related to previous error)
MTOUCH: error MT5212: Native linking failed, duplicate symbol: '_jpeg_quality_scaling'.
MTOUCH: error MT5213: Duplicate symbol in: /Users/Alexander/Projects/VRMouse/iOS/obj/iPhone/Debug/mtouch-cache/opencv2.a(jcparam.o) (Location related to previous error)
MTOUCH: error MT5213: Duplicate symbol in: /Users/Alexander/Projects/VRMouse/iOS/libjpeg.a(jcparam.o) (Location related to previous error)
MTOUCH: error MT5212: Native linking failed, duplicate symbol: '_jpeg_set_quality'.
MTOUCH: error MT5213: Duplicate symbol in: /Users/Alexander/Projects/VRMouse/iOS/obj/iPhone/Debug/mtouch-cache/opencv2.a(jcparam.o) (Location related to previous error)
MTOUCH: error MT5213: Duplicate symbol in: /Users/Alexander/Projects/VRMouse/iOS/libjpeg.a(jcparam.o) (Location related to previous error)
MTOUCH: error MT5212: Native linking failed, duplicate symbol: '_jpeg_set_defaults'.
MTOUCH: error MT5213: Duplicate symbol in: /Users/Alexander/Projects/VRMouse/iOS/obj/iPhone/Debug/mtouch-cache/opencv2.a(jcparam.o) (Location related to previous error)
MTOUCH: error MT5213: Duplicate symbol in: /Users/Alexander/Projects/VRMouse/iOS/libjpeg.a(jcparam.o) (Location related to previous error)
MTOUCH: error MT5212: Native linking failed, duplicate symbol: '_jpeg_default_colorspace'.
MTOUCH: error MT5213: Duplicate symbol in: /Users/Alexander/Projects/VRMouse/iOS/obj/iPhone/Debug/mtouch-cache/opencv2.a(jcparam.o) (Location related to previous error)
MTOUCH: error MT5213: Duplicate symbol in: /Users/Alexander/Projects/VRMouse/iOS/libjpeg.a(jcparam.o) (Location related to previous error)
MTOUCH: error MT5212: Native linking failed, duplicate symbol: '_jpeg_set_colorspace'.
MTOUCH: error MT5213: Duplicate symbol in: /Users/Alexander/Projects/VRMouse/iOS/obj/iPhone/Debug/mtouch-cache/opencv2.a(jcparam.o) (Location related to previous error)
MTOUCH: error MT5213: Duplicate symbol in: /Users/Alexander/Projects/VRMouse/iOS/libjpeg.a(jcparam.o) (Location related to previous error)
MTOUCH: error MT5212: Native linking failed, duplicate symbol: '_jpeg_simple_progression'.
MTOUCH: error MT5213: Duplicate symbol in: /Users/Alexander/Projects/VRMouse/iOS/obj/iPhone/Debug/mtouch-cache/opencv2.a(jcparam.o) (Location related to previous error)
MTOUCH: error MT5213: Duplicate symbol in: /Users/Alexander/Projects/VRMouse/iOS/libjpeg.a(jcparam.o) (Location related to previous error)
MTOUCH: error MT5201: Native linking failed. Please review the build log and the user flags provided to gcc: -L/Users/Alexander/Projects/VRMouse/iOS -ljpeg -force_load /Users/Alexander/Projects/VRMouse/iOS/libjpeg.a
MTOUCH: error MT5202: Native linking failed. Please review the build log.
3 Warning(s)
105 Error(s)
Я понятия не имею, как решить эту проблему, и где я собираюсь неправильно. Может кто-нибудь мне помочь?
Я не уверен, но если я помню, вам не нужен флаг '-ljpeg', а также' $ {ProjectDir}/libjpeg.a'. (Но я не уверен, это было время, так как я собрал opencv для ios.) –
Спасибо за ваш комментарий. Это дало мне ощущение, что я сделал что-то неправильно со встроенным и разрешил мне найти обходной путь. –
Рад видеть, что вы работали, и хорошая работа, отвечающая на ваш собственный вопрос, так что будущие пользователи могут извлечь выгоду! :) –