在borland turbo c++ 4.5中出现FMOD错误

FMOD error in borland turbo c++ 4.5

本文关键字:FMOD 错误 borland turbo c++      更新时间:2023-10-16

当我试图编译它给我26个错误,但一切都在正确的地方但无法理解的误差大多是常数太长。我想用C编程来播放mp3文件。

*错误显示在JPG图像

 #include "inc/fmod.h"
    FMUSIC_MODULE* handle;
    int main ()
    {
       // init FMOD sound system
       FSOUND_Init (44100, 32, 0);
       // load song
       handle=FMUSIC_LoadSong ("don.mp3");
       // play song only once
       // when you want to play a midi file you have to disable looping
       // BEFORE playing the song else this command has no effect!
       FMUSIC_SetLooping (handle, false);
       // play song
       FMUSIC_PlaySong (handle);
       // wait until the users hits a key to end the app
       while (!_kbhit())
       {
       }
       //clean up
       FMUSIC_FreeSong (handle);
       FSOUND_Close();
    }
https://i.stack.imgur.com/JH4Ts.jpg

Borland Turbo c++早于大多数c++标准和现代C。我不希望FMOD或任何现代库与此编译器一起工作。

Visual c++可以在Express中自由使用,并且是一个更好的编译器。

您所列出的代码是FMOD 3代码,但您正在使用FMOD 4头文件(也可能是库)。这将不起作用,我可以从您的错误pic中看到您也有其他问题,可能包括未正确设置路径。

我们提供了一个你需要链接的Borland库:'fmodex_bc。但是这是FMOD 4的代码,我强烈建议你看看SDK附带的"playstream"示例,它演示了MP3播放。