Xcode 中的问题
现在我正在 xcode 上为我的最后一年项目开发 OCR 和 Opencv。
有人可以帮我解决我遇到的这个问题吗:
**error: opencv2/calib3d/calib3d.hpp: No such file or directory
error: opencv2/highgui/highgui_c.h: No such file or directory
error: opencv2/highgui/highgui.hpp: No such file or directory
error: opencv2/calib3d/calib3d.hpp: No such file or directory
error: opencv2/highgui/highgui_c.h: No such file or directory
error: opencv2/highgui/highgui.hpp: No such file or directory
error: map: No such file or directory
error: string: No such file or directory
error: iostream: No such file or directory
error:expected specifier-qualifier-list before 'public'
error: expected '=', ',', ';', 'asm' or '__attribute__' before 'CvMLData'
error: expected '=', ',', ';', 'asm' or '__attribute__' before 'cv'**
谢谢......
Now i currently working on my OCR and Opencv on the xcode for my Final year project .
Can someone help me with this problem that i encounter :
**error: opencv2/calib3d/calib3d.hpp: No such file or directory
error: opencv2/highgui/highgui_c.h: No such file or directory
error: opencv2/highgui/highgui.hpp: No such file or directory
error: opencv2/calib3d/calib3d.hpp: No such file or directory
error: opencv2/highgui/highgui_c.h: No such file or directory
error: opencv2/highgui/highgui.hpp: No such file or directory
error: map: No such file or directory
error: string: No such file or directory
error: iostream: No such file or directory
error:expected specifier-qualifier-list before 'public'
error: expected '=', ',', ';', 'asm' or '__attribute__' before 'CvMLData'
error: expected '=', ',', ';', 'asm' or '__attribute__' before 'cv'**
Thank you ....
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
看到
iostream
和string
没有找到,让我觉得你没有告诉 Xcode 你正在编译 C++。您需要为文件指定扩展名.mm
(对于 Objective-C++)或.cpp
(对于直接 C++)。OpenCV Wiki 上有有关通过 Xcode 使用 OpenCV 的更多信息。请参阅第 2 节。
更新
如果未找到
iostream
,仍然会出现一些奇怪的情况。试试这个看看问题是否与 OpenCV 无关。看看是否可以运行该程序:如果这不起作用,您应该发布一个有关如何使其运行的新问题。然后,整个 OS X 社区都会为您提供帮助,而不是我们少数人来查看 OpenCV 问题。
Seeing that
iostream
andstring
are not found makes me think that you haven't told Xcode that you are compiling C++. You need to give the file the extension.mm
(for Objective-C++) or.cpp
(for straight C++).There's more info about using OpenCV with Xcode on the OpenCV Wiki. Look at Section 2.
Update
There's still something weird going on if
iostream
isn't being found. Try this to see if the problem is independent of OpenCV. See if you can get this program to run:If this doesn't work, you should post a new question about how to get it to work. Then you'll have the entire OS X community to help you instead of the few of us who look at OpenCV questions.