"#import <map> 的词法或预处理器问题 [英] Lexical or Preprocessor Issue with "#import <map>

查看:25
本文介绍了"#import <map> 的词法或预处理器问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个 XCode 4.2 项目,我一整天都在使用它,但突然之间,在 XCode 崩溃后,我的项目开始编译并出现错误:

I have an XCode 4.2 project that I've been working with all day just fine and all of the sudden, after an XCode crash, my project started to compile with the error:

"file myClass.m: error: Lexical or Preprocessor Issue: 'map' file not found"

myClass.m 使用的地方:

where myClass.m uses:

#import <map>
#import <vector>

我尝试了一个干净的构建,但 xcode 仍然在抱怨.我怎样才能让它再次识别 std:vector 和 std:map 库?

I've tried a clean build but xcode is still complaining. How can I get it to recognize std:vector and std:map libraries again?

推荐答案

这是因为您的源代码不是 c++ 或 objc++.将 myClass.m 更改为 myClass.mm.

it's because your source is not c++ or objc++. change myClass.m to myClass.mm.

这篇关于&quot;#import &lt;map&gt; 的词法或预处理器问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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