Log in or register to post comments

iOS: Unknown type name 'namespace' in SampleApplicationSession

May 6, 2014 - 11:17am #1

Hi,

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. Attached ref image. The actual error is Unknown type name 'namespace' in the Matrices.h file which gets accessed from SampleApplicationSession 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?

 

iOS: Unknown type name 'namespace' in SampleApplicationSession

August 5, 2016 - 12:51am #9

I have the same problem.Did you get it ?  

iOS: Unknown type name 'namespace' in SampleApplicationSession

August 5, 2016 - 12:51am #8

I have the same problem.Did you get it ?  

iOS: Unknown type name 'namespace' in SampleApplicationSession

May 21, 2014 - 5:25am #7

Just FYI: I had this problem mysteriously re-appear when I tried to do my distrubution build yesterday.

Had to do all the -fno and path settings over again in the other target.

Targets are very annoying :-(

iOS: Unknown type name 'namespace' in SampleApplicationSession

May 7, 2014 - 6:45am #6

Excellent!

I suspect that basically had the same effect as the pop-up I was mentioning.

iOS: Unknown type name 'namespace' in SampleApplicationSession

May 7, 2014 - 4:50am #5

I forgot to mention. It got solved after i deleted manually .mm file and put it back and build again freshly.

iOS: Unknown type name 'namespace' in SampleApplicationSession

May 7, 2014 - 3:58am #4

No, I definitely didn't have any problems until I did a #import of one of their headers into one of my VC's.

Suggest this: click on each of the files you brought into the project and look in the info screen on the right side (assuming Xcode here). One of the sub-screens has a pop-up that defines the file type. Make sure they're all set to Obcj-C++. You'll see it.

iOS: Unknown type name 'namespace' in SampleApplicationSession

May 6, 2014 - 9:45pm #3

thanks for the reply! This is where I tried to find out to change to .mm, but the thing is, i have never called yet any of this vuforia aug. reality functions inside my application files yet. I just integrated aug. files and trying to make the build working as of now, without success. Or else you are saying all of my other files also to be changed to .mm, even though its not calling any of this vuforia aug. reality functions? Is there any other way which is causing this issue? 

 

iOS: Unknown type name 'namespace' in SampleApplicationSession

May 6, 2014 - 12:40pm #2

The problem occurs at the "topmost import". In other words, if you import ANYTHING from the sample code into a pre-existing code base, that's where the problem lies. You need to change that file to be a .mm.

For instance, in my code base I had a file called "mapVC.m" that controlled a (get this!) a MKMapView. I wanted to use a pushViewController to insert their EAGLView when the user clicked on a button. As soon as I imported the .h, this error started occuring.

I went nuts trying to find it, because the compiler was always complaining inside another file. It wasn't saying that mapVC had a problem, it said that EAGLView did.

So change the "topmost class" to .mm and I'll bet it works.

Log in or register to post comments