OpenCV 与 Xcode 4.0.2
我无法在 XCode 中编译我的代码。它给了我错误。有人知道安装 OpenCV 然后编译的正确步骤吗?
I'm not able to compile my code in XCode. It is giving me errors. Anybody knows proper steps to install OpenCV and then compile?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
您为哪个平台开发? iOS 还是 OS X?
对于 iOS,请查看此博客文章: http://aptogo .co.uk/2011/09/opencv-framework-for-ios/ 甚至还有一个示例项目。
如果您尝试将 OpenCV 用于桌面应用程序,您需要编译 OpenCV,然后将其导入到您的 Xcode 项目中>> 使用 Xcode 为 OS X Lion / Mountain Lion 编译 OpenCV (2.3.1+)
Which plattform are you developing for? iOS or OS X?
For iOS take a look at this blog post: http://aptogo.co.uk/2011/09/opencv-framework-for-ios/ There is even a sample project.
If you're trying to use OpenCV for a desktop application you need to compile OpenCV and then import it into your Xcode project >> Compile OpenCV (2.3.1+) for OS X Lion / Mountain Lion with Xcode
考虑直接来自 WillowGarage 的 OpenCV.framework。
它基于 OpenCV 的旧版 C 接口。
如果您执意要使用最新的 OpenCV 及其 C++ 接口,请确保使用 .mm 扩展名编译所有源代码,以便编译器知道您正在 Objective-C++ 模式下工作。
如果您的项目仅是 C++,您应该扩展您的案例中失败的原因。
Consider OpenCV.framework directly from WillowGarage.
It's based on the older C-based interfaces for OpenCV.
If you're dead set on using the latest OpenCV, with its C++ interfaces, make sure you're compiling all of your sources with .mm extension so that the compiler knows you're working in Objective-C++ mode.
If your project is C++-only, you should expand on what's failing in your case.
这是一个处理 OpenCV 和 Iphone 的 SOF。看看吗?
iPhone 和 OpenCV
另一个有用的 SOF 可供查看:
OpenCV 和 Xcode
Here is an SOF which deals with OpenCV and Iphone. Have a look at it?
iPhone and OpenCV
Another useful SOF to check out:
OpenCV and Xcode