小编use*_*403的帖子

在Visual Studio中编译和链接第三方库

我是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)

任何帮助,将不胜感激!

c c++ fmod visual-studio include-path

8
推荐指数
1
解决办法
8968
查看次数

标签 统计

c ×1

c++ ×1

fmod ×1

include-path ×1

visual-studio ×1