简体   繁体   中英

FMOD error in borland turbo c++ 4.5

when I'm trying to compile it gives me 26 errors however everything is at its right place but won't able to understand the errors mostly constant is too long. Plz help I want to play a mp3 file through C programming.

*errors are shown in the jpg image

 #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();
    }

http://i.stack.imgur.com/JH4Ts.jpg

Borland Turbo C++ pre-dates most C++ standards and modern C. I would not expect FMOD or any modern library to work with this compiler.

Visual C++ is free to use in the Express form, and is a vastly better compiler.

The code you have listed is FMOD 3 code, yet you are using FMOD 4 headers (and probably libs too). This will not work, I can see from your error pic you have other troubles too, perhaps include paths not being set correctly.

We provide a Borland lib that you will need to link with: 'fmodex_bc.lib' but again this is FMOD 4 code, I would highly recommend looking at the 'playstream' example that ships with the SDK, it demonstrates MP3 playback.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM