0
0

I try complie and execut this program:

include <iostream>

include <conio.h>

include <fmod.h>

include <fmoderrors.h>

using namespace std;

int main(int argc, char argv[])
{
FSOUND_STREAM
handle;

//init FMOD sound system
FSOUND_Init (44100, 32, 0);

//load and play sample
handle=FSOUND_Stream_Open(“sample.mp3”,0, 0, 0);
FSOUND_Stream_Play (0,handle);

//wait until the users hits a key to end the app
while ( !kbhit() )
{
}

//clean up
FSOUND_Stream_Close(handle);
FSOUND_Close();

return 0;
}

And the error show compiler are:
[Linker error] undefined reference to FSOUND_Init@12'
[Linker error] undefined reference to
FSOUND_Stream_Open@16′
[Linker error] undefined reference to FSOUND_Stream_Play@8'
[Linker error] undefined reference to
FSOUND_Stream_Close@4′
[Linker error] undefined reference to `FSOUND_Close@0′
E:\Temporal Servicio Social\Ejemplos C++\Makefile.win [Build Error] [music.exe] Error 1

  • You must to post comments
0
0

Add -lfmod to your linker settings.

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.