我有下面的代码块几乎逐字地从fmod教程中复制出来,并对变量名进行了小的修改,以免与任何内容发生冲突。我的代码编译好没有任何fmod语句。当我把FMOD_RESULT fm_result
行和所有后面我得到一个错误,说明error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
我有VS2010,没有链接器或包含文件错误没有FOMC代码。错误是关于行fm_result = FMOD::System_Create(&fm_system);
我也在同一行上得到错误error C2371: 'fm_result' : redefinition; different basic types
。FMOD结果未被识别为有效类型?
FMOD_RESULT fm_result;
FMOD::System *fm_system;
fm_result = FMOD::System_Create(&fm_system); // Create the main system object.
if(fm_result != FMOD_OK){
printf("FMOD error! (%d) %s\n", fm_result, FMOD_ErrorString(fm_result));
exit(-1);
}
fm_result = fm_system->init(100, FMOD_INIT_NORMAL, 0); // Initialize FMOD.
if(fm_result != FMOD_OK){
printf("FMOD error! (%d) %s\n", fm_result, FMOD_ErrorString(fm_result));
exit(-1);
}
您是否缺少名称空间?看起来有些东西在'FMOD'命名空间中,为什么不是结果类型? –
我不知道他们为什么这样做,这是从文档直接复制,FMOD没有成员FMOD_RESULT – ameer
同样的情况,FMOD没有成员结果:/ – ameer