0
0

Hi,
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
FMUSIC_SetLooping@8′[/b:3g62pbp2]
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 :
[code:3g62pbp2]
–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]
[code:3g62pbp2]
function FMUSIC_SetLooping(module : FMUSIC_MODULE;
looping : boolean) return boolean;
pragma Import(stdcall, FMUSIC_SetLooping, “FMUSIC_SetLooping”);[/code:3g62pbp2]

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

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

where temp is a local boolean.

  • You must to post comments
0
0

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
0
0

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

[quote="brett":254yocwm]
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.