未知类型名称“类”;您指的是“Class”吗?奥里奥触摸
我正在尝试将代码从 AurioTouch 项目移动到我的项目。 但我有很多错误:
Unknown type name 'class'; did you mean 'Class'?
例如,在文件 FFTBufferManager.h 中:
#include <AudioToolbox/AudioToolbox.h>
#include <libkern/OSAtomic.h>
#include "SpectrumAnalysis.h"
class FFTBufferManager
{
public:
FFTBufferManager(UInt32 inNumberFrames);
~FFTBufferManager();
我尝试将编译器更改为 LLVM GCC 4.2,但它给出了很多其他错误:
Expected '=', ',', ';', 'asm' or '__attribute__' before 'FFTBufferManager'
我做错了什么?
I'm trying to move code from the AurioTouch project to my project.
But I have many errors:
Unknown type name 'class'; did you mean 'Class'?
For example, in file FFTBufferManager.h:
#include <AudioToolbox/AudioToolbox.h>
#include <libkern/OSAtomic.h>
#include "SpectrumAnalysis.h"
class FFTBufferManager
{
public:
FFTBufferManager(UInt32 inNumberFrames);
~FFTBufferManager();
I tried to change the compiler to LLVM GCC 4.2, but it gives a lot of other errors:
Expected '=', ',', ';', 'asm' or '__attribute__' before 'FFTBufferManager'
What am I doing wrong?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
要混合 C++ 和 Objective-C,您需要使用 .mm 扩展名。但是,如果您的类只是 C++(并且仅包含 C/C++ 标头),那么您可以使用普通的
.cpp
扩展名。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.