我很感兴趣,我的系统具有以下规格上使用Kota Yamaguchi's mexopencv library:编译mexopencv在OS X 10.9和Xcode 5和Matlab R2013b
- OS X 10.9(小牛)
- 的Xcode 5
- 通过安装MacPorts的MATLAB 2013b
- 的OpenCV到/ opt /本地/包括/ {OpenCV的,opencv2}和/ opt/local/lib目录
我的git使用mexopencv网站上的命令克隆最新的OpenCV修订版;这是从08年7月20日05:18:37 2013-0700版本084838d62a25fcb3eec9f610abf91b167bc6c2f5。
我运行了Matlab的mex -setup
命令,然后从Mathworks实现了this workaround,使用Xcode 5作为我的mex编译器。
我的MacPorts添加的pkg-config命令与Matlab的命令的路径现在setenv('PATH', [getenv('PATH') ':/opt/local/bin']);
,运行mxopencv.make产生下面的链接器错误消息:
Undefined symbols for architecture x86_64:
"cv::merge(std::vector<cv::Mat, std::allocator<cv::Mat> > const&, cv::_OutputArray const&)", referenced from:
MxArray::toMat(int, bool) const in libMxArray.a(MxArray.o)
"cv::split(cv::Mat const&, std::vector<cv::Mat, std::allocator<cv::Mat> >&)", referenced from:
MxArray::MxArray(cv::Mat const&, mxClassID, bool) in libMxArray.a(MxArray.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
mex: link of ' "+cv/CamShift.mexmaci64"' failed.
make: *** [+cv/CamShift.mexmaci64] Error 255
我不知道是什么在这一点上做。是否有可能在我的系统上构建mexopencv?
Mac中没有文档。但是如果make进入CamShift,那意味着你可以先编译所有其他文件?你有没有尝试删除CamShift.cpp? – Vuwox
看看[这个](http://stackoverflow.com/questions/16078512/undefined-symbols-for-architecture-x86-64-error-when-linking-opencv-in-xcode) – Vuwox
@AlexandreBizeau,if我删除了CamShift,我在下一个文件Canny中得到了同样的错误信息。您提到的另一篇文章是在Xcode中构建OpenCV,而不是使用Matlab的mex命令来构建mexopencv。 –