Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Lexical or Preprocessor Issue with "#import <map>

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?

like image 288
Jonas Gardner Avatar asked Nov 09 '11 22:11

Jonas Gardner


1 Answers

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

like image 149
justin Avatar answered Sep 21 '22 19:09

justin