ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
1.Open Xcode, choose New -> New Project -> Command
Line Tool
2.Name it and select C++
for
type
build
settings
tab from the top. Search Paths
.
Under header search paths
, for debug and
release,/usr/local/include
.
Under library search paths
, set the path$(PROJECT_DIR)
. Finally, check if C++
standard library
is libc++(Xcode默认的就是这个
)
or not,if not, change it to this!File->New->New
Group
, OpenCV Frameworks
. OpenCV
Frameworks
File -> add Files
,
Type shift + command +G, which /usr/local/lib
libopencv_core.dylib
, libopencv_highgui.dylib
,Add
. (you may need to add
other library files from this folder to run other code.)#include <opencv2/opencv.hpp>
Mac下Opencv(2.4.9)配置Xcode(4.6.1)
原文地址:http://blog.csdn.net/jingshui1216/article/details/41578317