在 Lion 上 32 位 Xcode4.1 上使用 OpenCV 和 Juce 进行编译问题
我正在尝试使用 32 位的 Xcode4.1 编译我的 VST 插件。我正在使用 Juce Framework 并在其中集成了 OpenCV 2.2。我使用 homebrew 和此命令安装了 OpenCV:
sudo brew install opencv -build32
但是当我在 32 位中使用 Xcode4.1 编译项目时,我会收到此错误:
Undefined symbols for architecture i386: "_cvLoadImage", referenced from: ...
在我的构建设置中,我定义了标头和库搜索路径。
header search paths: /usr/local/Cellar/opencv/2.2/include
/usr/local/Cellar/opencv/2.2/include/opencv
/usr/local/Cellar/opencv/2.2/include/opencv2
library search paths: /usr/local/Cellar/opencv/2.2/lib
other linker flags: -L/usr/local/Cellar/opencv/2.2/lib -lopencv_core -lopencv_imgproc -lopencv_highgui -lopencv_ml -lopencv_video -lopencv_features2d -lopencv_calib3d -lopencv_objdetect -lopencv_contrib -lopencv_legacy -lopencv_flann
但并没有编译成功。我希望有人能帮助我?
I'm trying to compile my VST Plugin with Xcode4.1 in 32Bit. I'm using the Juce Framework and integrated OpenCV 2.2 in it. I installed OpenCV with homebrew and this command:
sudo brew install opencv -build32
But when I'm compiling the project with Xcode4.1 in 32bit I will get this errors:
Undefined symbols for architecture i386: "_cvLoadImage", referenced from: ...
In my Build Settings I have defined the header and library search paths.
header search paths: /usr/local/Cellar/opencv/2.2/include
/usr/local/Cellar/opencv/2.2/include/opencv
/usr/local/Cellar/opencv/2.2/include/opencv2
library search paths: /usr/local/Cellar/opencv/2.2/lib
other linker flags: -L/usr/local/Cellar/opencv/2.2/lib -lopencv_core -lopencv_imgproc -lopencv_highgui -lopencv_ml -lopencv_video -lopencv_features2d -lopencv_calib3d -lopencv_objdetect -lopencv_contrib -lopencv_legacy -lopencv_flann
But it doesn't compile successful. I hope someone can help me?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我已经在 wiki 文章部分 在 Xcode OS X 项目中使用 OpenCV 库。只需将 dylib 文件添加到我的项目中即可。 :-)
I have solved the problem with the help of the wiki article section Using the OpenCV libraries in an Xcode OS X project. Just needed to add the dylib files to my project. :-)