Lexical or Preprocessor Issue with "#import <map>

被刻印的时光 ゝ 提交于 2019-12-12 10:38:02

问题


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"

where myClass.m uses:

#import <map>
#import <vector>

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?


回答1:


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



来源:https://stackoverflow.com/questions/8072768/lexical-or-preprocessor-issue-with-import-map

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!