我对C编程相对较新,并且之前没有使用过Visual Studio或第三方库。我正试图通过FMOD完成一些简单的任务并需要链接fmodvclib
,fmod.h
以及当然的fmod.dll
。
我已将fmodex_vc.lib
放入附加依赖项中,并在包括和库目录以及其他包括库中添加了低级别库的路径,但是在构建时却给我报错:
"cannot open source file "fmod.h"
identifier "FSOUND_SAMPLE" is undefined
Cannot open include file: 'fmod.h': No such file or directory
但更奇怪的是:
cannot open source file "stdio.h"
这是代码:
#include "fmod.h"
#include <stdio.h>
FSOUND_SAMPLE* handle;
int main(void)
{
int input;
FSOUND_Init(44100, 32, 0);
handle = FSOUND_Sample_Load(0, "test.ogg", 0, 0, 0);
FSOUND_PlaySound(0, handle);
while (input != 0)
{
scanf_s("&d", &input);
}
FSOUND_Sample_Free(handle);
FSOUND_Close();
}
任何帮助将不胜感激!