无法使用iOS OpenCV模块从Titanium Appcelerator编译应用程序

问题描述

我的问题持续了一个多月,我找不到任何解决方案。 我创建了一个使用OpenCV框架的Appcelerator Titanium模块。 我实际上尝试了在互联网上找到的所有内容以使其正常运行,但没有成功。 该模块可以编译,但是在构建使用该模块的应用程序时会崩溃。 为了深入研究问题,我使用CLI通过appc run -p ios -l trace编译了应用程序,以查看整个过程。这就是我得到的:

[TRACE] ld: framework not found opencv2 [TRACE] clang: error: linker command failed with exit code 1 (use -v to see invocation)

如果我在module.xconfig文件中声明框架,就会发生这种情况,

OTHER_LDFLAGS=$(inherited) -framework opencv2

如果我没有在文件中声明它,则会得到:

[TRACE] symbols not found for architecture x86_64 [TRACE] clang: error: linker command failed with exit code 1 (use -v to see invocation)

好吧,opencv2.framework文件位于模块的/ios文件夹中。

这是我到目前为止尝试的将OpenCV Framework放入项目中的步骤:

OpenCV Official Example for XCode

Compiling it from scratch and then adding to the Project

brew install opencv and then adding it to the project

我这样配置Framework Search Paths

$(inherited) $(PROJECT_DIR) $(SRCROOT)

Header Search Paths像这样:

$(inherited) "$(TITANIUM_SDK)/iphone/include" /usr/local/Cellar/opencv/4.4.0/include(最后一个,由brew CLI command安装。

Other Linker Flags的配置如下:

This configuration I got from the Tutorial below

我从本教程中获得的配置:OpenCV on XCode

最后,我尝试通过右键单击项目名称并添加文件来从项目.dylib的源中添加OpenCV Framework文件。

因此,我尽力解决了所有问题,但无法使其正常工作。 很抱歉,这个问题很长,但是我完全不知道该如何做。

请帮帮我!

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)