Xcode 中的问题

发布于 2024-11-30 12:39:34 字数 844 浏览 1 评论 0原文

现在我正在 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

Smile简单爱 2024-12-07 12:39:34

看到 iostreamstring 没有找到,让我觉得你没有告诉 Xcode 你正在编译 C++。您需要为文件指定扩展名 .mm (对于 Objective-C++)或 .cpp (对于直接 C++)。

OpenCV Wiki 上有有关通过 Xcode 使用 OpenCV 的更多信息。请参阅第 2 节。

更新

如果未找到 iostream,仍然会出现一些奇怪的情况。试试这个看看问题是否与 OpenCV 无关。看看是否可以运行该程序:

#include <iostream>

using namespace std;

int main(int argc, const char * argv[]) {
    cout << "Hello, world" << endl;
    return 0;
}

如果这不起作用,您应该发布一个有关如何使其运行的新问题。然后,整个 OS X 社区都会为您提供帮助,而不是我们少数人来查看 OpenCV 问题。

Seeing that iostream and string 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:

#include <iostream>

using namespace std;

int main(int argc, const char * argv[]) {
    cout << "Hello, world" << endl;
    return 0;
}

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文