在Macintosh上安装OpenCV [英] OpenCV Install on Macintosh

查看:158
本文介绍了在Macintosh上安装OpenCV的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在关注本教程( http://blogs.wcode.org/2014/10/howto-install-build-and-use-opencv-macosx-10-10/)在我的Macbook Pro上安装OpenCV.我拥有最新版本的Xcode(6.1.1)和OSX(Yosemite 10.10.1),并且一直在严格按照本教程进行操作.但是,当尝试使用终端制作静态库时(本教程中的步骤2a),在终端中运行make之后,我得到了以下错误:

I've been following this tutorial (http://blogs.wcode.org/2014/10/howto-install-build-and-use-opencv-macosx-10-10/) to install OpenCV on my Macbook Pro. I have the up-to-date versions of Xcode (6.1.1) and OSX (Yosemite 10.10.1) and have been following the tutorial exactly. However, when trying to make the static libraries with the terminal (Step 2a in the tutorial) I've been getting the following error after running make in the terminal:

[  3%] Built target zlib
[  9%] Built target libtiff
[ 16%] Built target libjpeg
[ 24%] Built target libwebp
[ 30%] Built target libjasper
[ 32%] Built target libpng
[ 43%] Built target IlmImf
[ 50%] Built target opencv_core
[ 58%] Built target opencv_imgproc
[ 60%] Built target opencv_imgcodecs
[ 61%] Built target opencv_videoio
[ 61%] Built target opencv_highgui
[ 62%] Built target opencv_ts
Linking CXX executable ../../bin/opencv_perf_core
ld: library not found for -lgstbase-0.10
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [bin/opencv_perf_core] Error 1
make[1]: *** [modules/core/CMakeFiles/opencv_perf_core.dir/all] Error 2
make: *** [all] Error 2

我的受过教育的(ish)猜测是这是一个链接器错误,原因是它无法找到创建文件所需的某个库,因为它能够构建前几个目标,但是我不知道不知道它是什么库,在哪里可以找到它,或者如何使它链接到它,所以我们将不胜感激.

My educated-(ish) guess is that this is a linker error saying that it can't find a certain library it needs in order to make the files since it is able to build the first few targets, but I don't know what library it is, where to find it, or how to get it to link to it, so any help would be appreciated.

推荐答案

您的猜测是正确的.但是,最简单的方法很可能不是找到库,而只是重新配置cmake文件,以便不需要该库.

Your guess is correct. But, the easier way forward most probably is not to find the library, just to reconfigure cmake files so that, the library is not needed.

gstbase-0.10. GStreamer用于音频视频处理.希望如果您不故意包含该库,则不需要它.取消选中cmake-gui中的复选框,然后依次单击ConfigureGenerate,如下图所示.

gstbase-0.10 is searched since you have checked WITH_GSTREAMER_0_10. GStreamer is for audio video processing. Hoping if you didn't include that library on purpose, you won't need it. Uncheck that checkbox in cmake-gui, and click Configure and then Generate as in screenshot below.

这篇关于在Macintosh上安装OpenCV的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆