- android - RelativeLayout 背景可绘制重叠内容
- android - 如何链接 cpufeatures lib 以获取 native android 库?
- java - OnItemClickListener 不起作用,但 OnLongItemClickListener 在自定义 ListView 中起作用
- java - Android 文件转字符串
我在构建框架时遇到问题。
我从这里克隆了一份 OpenCV:https://github.com/Itseez/opencv
然后检查我有最新的cmake 2.8.10.2
然后运行iOS文件夹中的build_framework.py。
例如
./opencv/ios/build_framework.py opencv-ios-build
输出是:
-- Setting up iPhoneOS toolchain
-- iPhoneOS toolchain loaded
-- Setting up iPhoneOS toolchain
-- iPhoneOS toolchain loaded
-- The CXX compiler identification is Clang 4.2.0
-- The C compiler identification is Clang 4.2.0
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - failed
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - failed
-- Performing Test HAVE_CXX_W
-- Performing Test HAVE_CXX_W - Failed
-- Performing Test HAVE_C_W
-- Performing Test HAVE_C_W - Failed
-- Performing Test HAVE_CXX_WALL
-- Performing Test HAVE_CXX_WALL - Failed
-- Performing Test HAVE_C_WALL
-- Performing Test HAVE_C_WALL - Failed
-- Performing Test HAVE_CXX_WERROR_RETURN_TYPE
-- Performing Test HAVE_CXX_WERROR_RETURN_TYPE - Failed
-- Performing Test HAVE_C_WERROR_RETURN_TYPE
-- Performing Test HAVE_C_WERROR_RETURN_TYPE - Failed
-- Performing Test HAVE_CXX_WERROR_NON_VIRTUAL_DTOR
-- Performing Test HAVE_CXX_WERROR_NON_VIRTUAL_DTOR - Failed
...
-- Could NOT find PythonInterp (missing: PYTHON_EXECUTABLE) (Required is at least version "2.0")
-- Performing Test HAVE_CXX_WNO_UNDEF
-- Performing Test HAVE_CXX_WNO_UNDEF - Failed
-- Performing Test HAVE_CXX_WNO_SIGN_PROMO
-- Performing Test HAVE_CXX_WNO_SIGN_PROMO - Failed
-- Performing Test HAVE_CXX_WNO_MISSING_DECLARATIONS
-- Performing Test HAVE_CXX_WNO_MISSING_DECLARATIONS - Failed
-- Performing Test HAVE_CXX_WNO_MISSING_PROTOTYPES
-- Performing Test HAVE_CXX_WNO_MISSING_PROTOTYPES - Failed
-- Performing Test HAVE_OBJCXX_FOBJC_EXCEPTIONS
-- Performing Test HAVE_OBJCXX_FOBJC_EXCEPTIONS - Failed
-- Performing Test HAVE_CXX_WNO_DEPRECATED_DECLARATIONS
-- Performing Test HAVE_CXX_WNO_DEPRECATED_DECLARATIONS - Failed
--
-- General configuration for OpenCV 2.4.9 =====================================
-- Version control: unknown
--
-- Platform:
-- Host: Darwin 12.3.0 i386
-- Target: iOS
-- CMake: 2.8.10.2
-- CMake generator: Xcode
-- CMake build tool: /Applications/CMake 2.8-10.app/Contents/bin/cmakexbuild
-- Xcode: 4.6.1
--
-- C/C++:
-- Built as dynamic libs?: NO
-- C++ Compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ (ver 4.2.0)
-- C++ flags (Release): -stdlib=libc++ -headerpad_max_install_names -fvisibility=hidden -fvisibility-inlines-hidden -fPIC -DNDEBUG -O3 -fomit-frame-pointer -ffast-math -DNDEBUG
-- C++ flags (Debug): -stdlib=libc++ -headerpad_max_install_names -fvisibility=hidden -fvisibility-inlines-hidden -fPIC -g -O0 -DDEBUG -D_DEBUG -ggdb3
-- C Compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang
-- C flags (Release): -fPIC -O3 -DNDEBUG -DNDEBUG
-- C flags (Debug): -fPIC -g -O0 -DDEBUG -D_DEBUG -ggdb3
-- Linker flags (Release):
-- Linker flags (Debug):
-- Precompiled headers: NO
--
-- OpenCV modules:
-- To be built: core imgproc flann highgui features2d calib3d ml video objdetect contrib legacy nonfree photo softcascade stitching videostab world
-- Disabled: -
-- Disabled by dependency: -
-- Unavailable: androidcamera gpu java ocl python superres ts
--
-- GUI:
-- Cocoa: YES
-- OpenGL support: NO
--
-- Media I/O:
-- ZLib: build (ver 1.2.7)
-- JPEG: build (ver 90)
-- WEBP: NO
-- PNG: build (ver 1.5.12)
-- TIFF: NO
-- JPEG 2000: NO
-- OpenEXR: NO
--
-- Video I/O:
-- AVFoundation: YES
-- QuickTime: NO
-- QTKit: YES
-- V4L/V4L2: NO/NO
--
-- Other third-party libraries:
-- Use IPP: NO
-- Use Eigen: NO
-- Use TBB: NO
-- Use OpenMP: NO
-- Use GCD YES
-- Use Concurrency NO
-- Use C=: NO
-- Use Cuda: NO
-- Use OpenCL: NO
--
-- Python:
-- Interpreter: NO
--
-- Java:
-- ant: NO
-- JNI: NO
-- Java tests: NO
--
-- Documentation:
-- Build Documentation: NO
-- Sphinx: NO
-- PdfLaTeX compiler: NO
--
-- Tests and samples:
-- Tests: NO
-- Performance tests: NO
-- C/C++ Examples: NO
--
-- Install path: /Users/Ants/Dev/iOS/opencv-ios-build/build/iPhoneOS-armv7/install
--
-- cvconfig.h is in: /Users/Ants/Dev/iOS/opencv-ios-build/build/iPhoneOS-armv7
-- -----------------------------------------------------------------
--
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/Ants/Dev/iOS/opencv-ios-build/build/iPhoneOS-armv7
但它确实构建了 Xcode 项目。
进程继续运行编译,但在 opencv 核心中的 rand.cpp 上失败
/Users/Ants/Dev/iOS/opencv/modules/core/src/rand.cpp:758:8: error: unknown type name 'pthread_key_t'; did you mean 'pthread_attr_t'?
static pthread_key_t tlsRNGKey = 0;
^~~~~~~~~~~~~
pthread_attr_t
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk/usr/include/sys/signal.h:157:34: note: 'pthread_attr_t' declared here
typedef __darwin_pthread_attr_t pthread_attr_t;
^
/Users/Ants/Dev/iOS/opencv/modules/core/src/rand.cpp:758:22: error: no viable conversion from 'int' to 'pthread_attr_t' (aka '_opaque_pthread_attr_t')
static pthread_key_t tlsRNGKey = 0;
^ ~
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk/usr/include/sys/_types.h:64:8: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'int' to 'const _opaque_pthread_attr_t &' for 1st argument
struct _opaque_pthread_attr_t { long __sig; char __opaque[__PTHREAD_ATTR_SIZE__]; };
^
/Users/Ants/Dev/iOS/opencv/modules/core/src/rand.cpp:759:8: error: unknown type name 'pthread_once_t'; did you mean 'pthread_attr_t'?
static pthread_once_t tlsRNGKeyOnce = PTHREAD_ONCE_INIT;
^~~~~~~~~~~~~~
pthread_attr_t
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk/usr/include/sys/signal.h:157:34: note: 'pthread_attr_t' declared here
typedef __darwin_pthread_attr_t pthread_attr_t;
^
/Users/Ants/Dev/iOS/opencv/modules/core/src/rand.cpp:759:39: error: use of undeclared identifier 'PTHREAD_ONCE_INIT'
static pthread_once_t tlsRNGKeyOnce = PTHREAD_ONCE_INIT;
^
/Users/Ants/Dev/iOS/opencv/modules/core/src/rand.cpp:774:5: error: use of undeclared identifier 'pthread_once'
pthread_once(&tlsRNGKeyOnce, makeRNGKey);
^
5 errors generated.
有什么想法吗?
最佳答案
线索就在一行中:
-- 找不到 PythonInterp(缺少:PYTHON_EXECUTABLE)(要求版本至少为“2.0”)
我通过编辑 build_framework.py
文件解决了这个问题,将 python 的路径添加到 cmakeargs
部分(大约第 39 行):
cmakeargs = ("-GXcode " +
"-DPYTHON_EXECUTABLE=/usr/bin/python " +
"-DCMAKE_BUILD_TYPE=Release " +
"-DCMAKE_TOOLCHAIN_FILE=%s/ios/cmake/Toolchains/Toolchain-%s_Xcode.cmake" +
"-DBUILD_opencv_world=ON " +
"-DCMAKE_INSTALL_PREFIX=install") % (srcroot, target)
或者(这比从头开始编译要快得多)使用 cocoapods而是安装依赖项。
关于ios - 无法为 iOS 构建 OpenCV 框架,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15915305/
我需要开发一个简单的网站,我通常使用 bootstrap CSS 框架,但是我想使用 Gumbyn,它允许我使用 16 列而不是 12 列。 我想知道是否: 我可以轻松地改变绿色吗? 如何使用固定布局
这个问题在这里已经有了答案: 关闭 13 年前。 与直接编写 PHP 代码相比,使用 PHP 框架有哪些优点/缺点?
我开发了一个 Spring/JPA 应用程序:服务、存储库和域层即将完成。 唯一缺少的层是网络层。我正在考虑将 Playframework 2.0 用于 Web 层,但我不确定是否可以在我的 Play
我现有的 struts Web 应用程序具有单点登录功能。然后我将使用 spring 框架创建一个不同的 Web 应用程序。然后想要使用从 struts 应用程序登录的用户来链接新的 spring 应
我首先使用Spark框架和ORMLite处理网页上表单提交的数据,在提交中文字符时看到了unicode问题。我首先想到问题可能是由于ORMLite,因为我的MySQL数据库的字符集已设置为使用utf8
我有一个使用 .Net 4.5 功能的模块,我们的应用程序也适用于 XP 用户。所以我正在考虑将这个 .net 4.5 依赖模块移动到单独的项目中。我怎样才能有一个解决方案,其中有两个项目针对不同的版
我知道这是一个非常笼统的问题,但我想我并不是真的在寻找明确的答案。作为 PHP 框架的新手,我很难理解它。 Javascript 框架,尤其是带有 UI 扩展的框架,似乎通过将 JS 代码与设计分开来
我需要收集一些关于现有 ORM 解决方案的信息。 请随意编写任何编程语言。 你能谈谈你用过的最好的 ORM 框架吗?为什么它比其他的更好? 最佳答案 我使用了 NHibernate 和 Entity
除了 Apple 的 SDK 之外,还有什么强大的 iPhone 框架可供开始开发?有没有可以加快开发时间的方法? 最佳答案 此类框架最大的是Three20 。 Facebook 和许多其他公司都使用
有人可以启发我使用 NodeJS 的 Web 框架吗?我最近开始从免费代码营学习express js,虽然一切进展顺利,但我对express到底是什么感到困惑。是全栈框架吗?纯粹是为了后端吗?我发现您
您可以推荐哪种 Ajax 框架/工具包来构建使用 struts 的 Web 应用程序的 GUI? 最佳答案 我会说你的 AJAX/javascript 库选择应该较少取决于你的后端是如何实现的,而更多
我有生成以下错误的 python 代码: objc[36554]: Class TKApplication is implemented in both /Library/Frameworks/Tk.
首先,很抱歉,如果我问的问题很明显,因为我没有编程背景,那我去吧: 我想运行一系列测试场景并在背景部分声明了几个变量(我打印它们以仔细检查它们是否已正确声明),第一个是整数,另外两个字符串为你可以看到
在我们承担的一个项目中,我们正在寻找一个视频捕获和录制库。我们的基础工作(基于 google 搜索)表明 vlc (libvlc)、ffmpeg (libavcodec) 和 gstreamer 是三
我试过没有运气的情况下寻找某种功能来杀死/中断Play中的正常工作!框架。 我想念什么吗?还是玩了!实际没有添加此功能? 最佳答案 Java stop类中没有像Thread方法那样的东西,由于种种原因
我们希望在我们的系统中保留所有重大事件的记录。例如,在数据库可能存储当前用户状态的地方,事件日志应记录对该状态的所有更改以及更改发生的时间。 事件记录工具应该尽可能接近于事件引发器的零开销,应该容纳结
那里有 ActionScript 2.0/3.0 的测试框架列表吗? 最佳答案 2010-05-18 更新 由于这篇文章有点旧,而且我刚刚收到了赞成票,因此可能值得提供一些更新的信息,这样人们就不会追
我有一个巨大的 numpy 数组列表(一维),它们是不同事件的时间序列。每个点都有一个标签,我想根据其标签对 numpy 数组进行窗口化。我的标签是 0、1 和 2。每个窗口都有一个固定的大小 M。
我是 Play 的新手!并编写了我的第一个应用程序。这个应用程序有一组它依赖的 URL,从 XML 响应中提取数据并返回有效的 URL。 此应用程序需要在不同的环境(Dev、Staging 和 Pro
关闭。这个问题不满足Stack Overflow guidelines .它目前不接受答案。 想改善这个问题吗?更新问题,使其成为 on-topic对于堆栈溢出。 4年前关闭。 Improve thi
我是一名优秀的程序员,十分优秀!