I am using Qualcomm's Vuforia Augmented Reality solution in my iOS project. I integrated their library and files into my application. But, I'm struggled with the build error for long time, couldn't be able to fix it. Please refer the attached image. The actual error is Unknown type name 'namespace'
in their Matrices.h
file.
I know this error comes because of C++ access, so we need to rename the extention to .mm file which are trying to access c++ functions. I actually changed the files into .mm including this SampleApplicationSession.mm. But, still I'm getting the namespace error. Could someone please guide me how to fix this?
Asked
Active
Viewed 2,811 times
5

Stella
- 1,728
- 5
- 41
- 95
-
Have a look here http://stackoverflow.com/questions/7975239/unknown-type-name-namespace-in-xcode-4-2 – Nagendra Tripathi Jul 04 '14 at 16:50
-
I am facing same issue in Xcode 8.1 also. – Vijay Sharma Feb 27 '17 at 13:25
2 Answers
2
You can rename your file with .mm or you can select your .m file and change the "File Type" to "Objective-C++ Source".
Its works.

saurabh rathod
- 1,090
- 7
- 7
0
In general if you try to compile Objective c++ source, you can get this error.In Xcode ,selecting the TARGET and then going to Build setting->Apple LLVM 6.0-Language->Compile source As,then changing the option From "According to File type" to Objective-C++ ,worked for me.Hope it will work.

iSankha007
- 385
- 15
- 21