is anyone able to use the FSOUND_SpecifyEffectsImage and the FMUSIC_SetLooping functions with libfmod.a ?
It’s just because, when I try to compile, I get that:

[quote:3g62pbp2]gcc -c mp3_balade_simple.adb
gcc -c mp3.adb
gcc -c mp3-simple.adb
gnatbind -x mp3_balade_simple.ali
gnatlink -lfmod mp3_balade_simple.ali
[b:3g62pbp2]./mp3.o(.text+0x17d5):mp3.adb: undefined reference to FSOUND_SpecifyEffectsImage@4'
./mp3-simple.o(.text+0x21e):mp3-simple.adb: undefined reference to
gnatmake: *** link failed.[/quote:3g62pbp2]

I dont think I’ve a wrong code, because It’s the same than some others functions, but here is my code:

In mp3.ads :
–X-BOX Only
function FSOUND_SpecifyEffectsImage(name : string) return boolean;
function FSOUND_SpecifyEffectsImageC(name : interfaces.c.char_array)
return boolean;
pragma Import(stdcall,
FSOUND_SpecifyEffectsImageC, "FSOUND_SpecifyEffectsImage");[/code:3g62pbp2]
function FMUSIC_SetLooping(module : FMUSIC_MODULE;
looping : boolean) return boolean;
pragma Import(stdcall, FMUSIC_SetLooping, “FMUSIC_SetLooping”);[/code:3g62pbp2]

In mp3.adb:
function FSOUND_SpecifyEffectsImage(name : String)
return boolean is
return FSOUND_SpecifyEffectsImageC(
end FSOUND_SpecifyEffectsImage;[/code:3g62pbp2]

In the main program:
temp := FMUSIC_SetLooping(module, false);[/code:3g62pbp2]

where temp is a local boolean.

  • You must to post comments

Could it also have something to do with that “X-BOX Only” comment above the function declaration? AFAIK, Xbox executables (.xbe) can only be produced by the XDK which plugs into Visual Studio, but you are using GCC.

  • You must to post comments

[quote="brett":254yocwm]what is .adb?
Ada Body.
For the Ada95 programmers, ads is the header (specification) and adb the body.

libfmod.a is for mingw or cygwin users only. libfmod-3.6.so is for linux users with gcc.[/quote:254yocwm]
Ok, then it’s the problem. In fact I’m trying to Import all the functions under Ada95, without looking the platform 😆 .Thanks.

  • You must to post comments
Showing 2 results
Your Answer

Please first to submit.