是否可以构建针对不同目标环境进行交叉编译的构建环境?
这些天,我正在学习开源世界的乐趣。使用 Mac OS X 上的 Homebrew 软件包构建管理系统。为我的目的构建软件是如此简单。
不管怎样,这些软件包系统只是为主机系统设计的。如果我想为其他系统(例如 iOS、Android 或 Ubuntu)构建一个库(例如 OpenCV
),有什么选择吗?
*交叉编译是指在主机系统A
上针对目标系统B
进行编译。
In these days, I'm learning joy of open-source world. With Homebrew package build management system on Mac OS X. Building software for my purpose was so easy and simple.
Anyway, those package systems are designed for host system only. If I want to build a library (for an example OpenCV
) for other system (for an example, iOS, Android or Ubuntu), is there any option?
*The cross-compile means compiling for target system B
on host system A
.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
OpenCV 已经移植到 Android 和 iOS - Android 移植随 OpenCV 2.3.1 正式发布; iOS 端口目前仅在 OpenCV trunk 中可用。
两个端口都使用 cmake 进行交叉编译。您可以下载源代码并查看这是如何完成的。有关构建 Android 端口的说明,请访问 OpenCV wiki
OpenCV already has ports to Android and iOS - Android port is officially released with OpenCV 2.3.1; iOS port is currently available in OpenCV trunk only.
Both ports are using cmake for cross-compiling. You can download the sources and see how this is done. Instructions for building Android port are available on OpenCV wiki
请参阅 CMake 项目:http://www.cmake.org/
See CMake project: http://www.cmake.org/