I’m sure the answer is simple but I am facing the following problem …
I want to use this c++ header file CAAudioUnitOutputCapturer.h (there is only a .h file) inside an ios objective-c xcode project.
Could someone tell me how to eliminate compilation errors and give me an example of how to use in Objective-C context?
Edit, i got this error :
CAAudioUnitOutputCapturer.h:64: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'CAAudioUnitOutputCapturer'
At the moment, the compiler is trying to build your file as pure Objective C, which is causing these errors. Rename the file you are compiling it into as
myFile.mm(note themmextension). This will force the compiler to consider it as Objective C++ code, which by virtue of the header you’re including, it is.