开发者

Problem in Xcode

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 ....


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜