我是C编程的新手,我之前没有使用Visual Studio或第三方库.我正在尝试使用FMOD做一些简单的事情并且需要链接fmodvclib
,fmod.h
当然fmod.dll
.
我已经fmodex_vc.lib
在include和library目录以及其他包含库中添加了其他依赖项和低级库的路径,但是当我构建它时,它给了我:
"cannot open source file "fmod.h"
identifier "FSOUND_SAMPLE" is undefined
Cannot open include file: 'fmod.h': No such file or directory
Run Code Online (Sandbox Code Playgroud)
但即使是奇怪的是:
cannot open source file "stdio.h"
Run Code Online (Sandbox Code Playgroud)
这是代码:
#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();
}
Run Code Online (Sandbox Code Playgroud)
任何帮助,将不胜感激!