Unknown type name class, did you mean Class

| | August 11, 2015

So I tried to import aurioTouch into my app and I keep getting this error saying

"unknown type name 'class' did you mean "Class"?

My bridging header file:

#import "AudioController.h"
#import "BufferManager.h"
#import "FFTHelper.h"
#import "DCRejectionFilter.h"

I tried changing this to .mm for all these files but it doesn’t solve my issue. Anyone have any ideas why this is happening?

One Response to “Unknown type name class, did you mean Class”

  1. Rohit suvagiya on November 30, -0001 @ 12:00 AM

    To mix C++ and Objective-C you need to use the .mm extension. If, however, your class is only C++ (and only includes C/C++ headers) then you can use the normal .cpp extension.

    A source file with this extension can contain C++ code in addition to Objective-C and C code. This extension should be used only if you
    actually refer to C++ classes or features from your Objective-C code.

Leave a Reply