XCode - #include< map>在ml.hpp:没有这样的文件或目录 [英] XCode - #include <map> in ml.hpp : No such file or directory

查看:758
本文介绍了XCode - #include< map>在ml.hpp:没有这样的文件或目录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图编译一个C ++代码(OpenCV),我要结束。我只是有几个没有这样的文件或目录编译错误到XCode 4这些行上:

I'm trying to compile a C++ code (OpenCV) and I'm going to the end. I just have a few "No such file or directory" compile error into XCode 4 on those lines :

#include <map>
#include <string>
#include <iostream>

我可以包含什么来找到文件?

What may I include to make it find the "files" ?

我看不到。

我使用基于OpenCV的另一个基于Objective-C的项目,例如,成功传递编译过程,文件是相同的,我检查所有的Build设置行一个接一个,它都一样,除了搜索pathes更新到我自己的项目文件夹。文件夹架构是一样的...

I use another project based on OpenCV with Objective-C inside for example that pass the compile process with success, files are the same, and I checked all the Build settings lines one after the other, and it's all the same, except the search pathes that are updated to go to my own project folders. Folder architecture is the same...

我读过这个链接 ,但它似乎不是解决方案,因为我不应该在更改文件的任何地方添加代码,因为我don不使用任何代码和示例项目工程很好像这样。

I've read this link but it doesn't seems to be the solution as I should not have to add code anywhere of change files, since I don't use any of the code and the example project works fine like this. I've just included into one of my .m files, exactly like the example project.

推荐答案


我刚刚包含到我的.m
文件之一,就像示例
项目。

I've just included into one of my .m files, exactly like the example project.

如果你想使用C ++类,你必须使用Objective-C ++。您的源文件(而不是您的头文件,心 - 包含它们的源文件)必须具有.mm扩展名。

If you want to use C++ classes, you must use Objective-C++. Your source files (not your header files, mind - the source files that #include them) must have a .mm extension.

这篇关于XCode - #include&lt; map&gt;在ml.hpp:没有这样的文件或目录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆