gpt4 book ai didi

c++ - 在 Xamarin.iOS (arm64) 中使用 OpenCV

转载 作者:行者123 更新时间:2023-12-05 05:23:46 29 4
gpt4 key购买 nike

我一直在努力让 OpenCV 在 Xamarin.iOS 上运行 arm64。我在 opencv.org 上找到的最新版本似乎不是为 arm64 构建的。我自己构建最新的库时遇到了问题,但是构建了 OpenCV 2.4.12 ( https://github.com/Itseez/opencv/tree/2.4.12 )。但是,当我将库添加到我的解决方案时(通过绑定(bind)库),出现以下错误:

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)

我不知道如何解决这个问题以及我哪里出错了。谁能帮帮我?

最佳答案

根据我从 Chris Britt 那里收到的评论,我感觉 OpenCV 的构建出了问题。我设法找到了 iOS 框架的预构建版本。 SDK 7.1、armv7、armv7s、arm64、i386、x86_64 ( https://github.com/AlexeyIS/OpenCV-iOS )。尽管它没有解释我做错了什么,但它是一个很好的解决方法,可以让我在 arm64 上运行 OpenCV。

关于c++ - 在 Xamarin.iOS (arm64) 中使用 OpenCV,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36658248/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com