Stella
Stella

Reputation: 1866

iOS: Unknown type name 'namespace' with Qualcomm's Vuforia Augmented reality source

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?

enter image description here

Upvotes: 5

Views: 2850

Answers (2)

saurabh rathod
saurabh rathod

Reputation: 1278

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.

Upvotes: 2

iSankha007
iSankha007

Reputation: 395

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.

Upvotes: 0

Related Questions