0
0

Hi,

I downloaded the stable 4.38.06 version for Linux 64bit and extracted to the right folder.
I’m using gcc and I correctly linked the library and included the right headers but still, I can’t compile my program because of these warnings :

[code:2dgez1y0]
src/main.c:191:3: warning: implicit declaration of function ‘FSOUND_Sample_Load’
src/main.c:192:3: warning: implicit declaration of function ‘FSOUND_SetVolume’
src/main.c:193:3: warning: implicit declaration of function ‘FSOUND_PlaySound’
src/main.c:191: undefined reference to FSOUND_Sample_Load'
src/main.c:192: undefined reference to
FSOUND_SetVolume’
src/main.c:193: undefined reference to `FSOUND_PlaySound’
[/code:2dgez1y0]

I’m compiling with this following line : $(CC) -o $(NAME) $(OBJ) -L/usr/lib -lfmod

Here’s my source code :

[code:2dgez1y0]

include "fmod.h"

include "fmod_errors.h"

int main(int ac, char **av)
{
FSOUND_SAMPLE handle;

FSOUND_Init(44100, 32, 0);
handle = FSOUND_Sample_Load (0, "Diablo2.mp3", 0, 0, 0);
FSOUND_SetVolume(handle, 200);
FSOUND_PlaySound(0, handle);
return (0);
}
[/code:2dgez1y0]

I searched on the internet, and i couldn’t fix this problem by myself, that’s why I’m asking your opinion. I’ll be really grateful if you can help me.

Thanks.

EDIT: I’m working exclusively in C right now.

(Excuse me for my english, I’m french.)

  • You must to post comments
0
0

FSOUND is FMOD3, FMOD_Sound is for FMOD4. You’re using the wrong functions, look at documentation/fmodex.chm to see the API documentation. If you’re not on windows then you will need a chm reader, https://www.linux.com/news/software/app … -for-linux.

  • You must to post comments
0
0

I’m such a dork …

I was looking on an old tutorial to learn how to use FMOD functions. You made my day !

  • You must to post comments
0
0

I’ve another problem, i’m sorry :

I linked the headers correctly (I don’t have compilation warnings anymore), but when I’m trying to run my program it says :

[code:2ek9x1pk]./wolf3d: error while loading shared libraries: libfmodex64-4.38.06.so: cannot open shared object file: No such file or directory
[/code:2ek9x1pk]

I tryed different compilation options :
[code:2ek9x1pk]
-L/usr/lib -lfmod (or -lfmodex, -lfmodex64-4.38.06)
-L/usr/local/lib -lfmod (or -lfmodex, -lfmodex64-4.38.06)
-L. -lfmod (or -lfmodex, -lfmodex64-4.38.06, with the library in the working directory) [/code:2ek9x1pk]

Am I missing something ? Thanks.

  • You must to post comments
0
0

It sounds like something is wrong with the project configuration. Take a look at the example programs that ship with API.

  • You must to post comments
Showing 4 results
Your Answer

Please first to submit.