简体   繁体   English

使用Xcode在Mac OS X 10.6.7上安装Instal OpenCV

[英]Instal openCV on mac os x 10.6.7 with Xcode

I am trying to install OpenCV on my Mac (OS X v10.6.3) with this guide : http://www.randomsequence.com/articles/opencv-snow-leopard/ 我正在尝试通过以下指南在Mac(OS X v10.6.3)上安装OpenCV: http ://www.randomsequence.com/articles/opencv-snow-leopard/

The build failed. 构建失败。 This'is the error: 这是错误:

ld: library not found for -lavcodec ld:找不到用于-lavcodec的库
collect2: ld returned 1 exit status collect2:ld返回1退出状态
Command /Developer/usr/bin/g++-4.2 failed with exit code 1 命令/Developer/usr/bin/g++-4.2失败,退出代码为1

Where can I found and install this library? 在哪里可以找到并安装此库?

If you followed the article you have macports installed. 如果您遵循了本文,那么您已经安装了macports。

If so use it to install openCV eg 如果是这样,使用它来安装openCV,例如

sudo port install opencv

the current macports installs openCV 2.2.0 当前的Macports安装了openCV 2.2.0

If you have not used macports for some time you should update it first to get the latest versions see guide 如果一段时间未使用macport,则应先对其进行更新以获取最新版本,请参见指南。

sudo port selfupdate
sudo port upgrade outdated

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

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