简体   繁体   English

在C ++上使用OpenCV和Xcode构建静态库时出错

[英]Error building Static Library with OpenCV and Xcode on C++

I'm trying to build a DLL library for Unity3D (in 32-bit) but first of all I want to make a .a static library to make a C++ Wrapper for C#. 我正在尝试为Unity3D(32位)构建DLL库,但首先我想创建一个.a静态库来为C#制作C ++包装器。

Well, this is what I've done. 好吧,这就是我所做的。

  1. I've built OpenCV unchecking BUILD_SHARED_LIBS in order to get the STATIC LIBS , with architecture i386 . 我已经构建了OpenCV,取消选中BUILD_SHARED_LIBS以获得具有架构i386STATIC LIBS
  2. I've made my static library code and built it, Linking the static libraries that I needed (I really import them all because I'm having errors and I want to know if it's an error lib-based): 我已经制作了我的静态库代码并构建了它,链接了我需要的静态库(我真的全部导入了它们,因为我遇到了错误,我想知道它是否是基于lib的错误):

在此处输入图片说明

(included from /lib/ and /3rdparty/lib/ ) (包含在/lib//3rdparty/lib/

  1. I'm linking my library and header in a new project (Command Line Tool) in order to test my new static library, but my errors are: 我在一个新项目(命令行工具)中链接我的库和标头,以测试我的新静态库,但是我的错误是:

在此处输入图片说明

( pastebin link ) pastebin链接

Well, I have no idea what's wrong. 好吧,我不知道怎么了。

This is my settings on the static library: 这是我在静态库上的设置:

在此处输入图片说明

This is my settings on my test Command Line Tool (for testing my library) 这是我在测试命令行工具上的设置(用于测试库)

在此处输入图片说明

Does anyone have idea about this? 有人对此有想法吗?

Thank you very much in advance. 提前非常感谢您。

Regards. 问候。


EDIT: tried to manipulate the static libraries for 64 bits as well but nothing happened. 编辑:尝试也为64位操纵静态库,但什么也没发生。

解决方案是删除库路径中的几个路径,因为它弄乱了一些库。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM