#language en ||~-Translation(s): [[FMOD|English]] - [[fr/FMOD|Français]]-~|| (!) [[/Discussion|Discussion]]|| ---- ~+[[http://en.wikipedia.org/wiki/FMOD|FMOD]]+~ is a commercial library not provide by Debian. It use to manage sound and music in C/C++ project. This article describe how to install FMOD on your Debian system. <> = FMOD Download API and Lib = == Get development library == * Go to website http://www.fmod.org/download * Go to '''FMOD Studio Programmer’s API and Low Level Programmer API''' section and download version for Linux. You could get fmodstudioapi10903linux.tar.gz archive file. For older version go to http://www.fmod.org/download-previous-products/ * Uncompress this archive file in your home directory '''~/''' == Install library on your Debian system == === What you must install === In the archive file, you can found lot of files. You can install the content of the '''api''' folder. For the libs (.so), choose the arch folder that fit to your architecture. ex with x86_64: * ~/fmodstudioapi10903linux/api/studio/lib/x86_64/*so * ~/fmodstudioapi10903linux/api/studio/inc/*.h '''inc/*.h :''' The header files containing FMOD's prototype using by your compiler === libfmod.so library === Normal way, Debian packages install libraries in {{{/usr/lib}}}. In this case, we are going to install a non-maintaining library. So we install it in {{{/usr/local/lib}}}. {{{ cp ~/fmodstudioapi10903linux/api/fsbank/lib/x86_64/*so /usr/local/lib/ cp ~/fmodstudioapi10903linux/api/lowlevel/lib/x86_64/*so /usr/local/lib/ cp ~/fmodstudioapi10903linux/api/studio/lib/x86_64/*so /usr/local/lib/ }}} === Headers === Like previous case, headers are install in {{{/usr/local/include}}} instead {{{/usr/include}}} as normal way. {{{ cp ~/fmodstudioapi10903linux/api/fsbank/inc/*.h /usr/local/include/ cp ~/fmodstudioapi10903linux/api/lowlevel/inc/*.h /usr/local/include/ cp ~/fmodstudioapi10903linux/api/studio/inc/*.h /usr/local/include/ }}} == Compilation == === Add to your c file === {{{ #include }}} and more if needed {{{ #include }}} === gcc === Add following options to your command line: {{{ -I/usr/local/include -L/usr/local/lib -lfmod }}} === KDevelop === * Open your C/C++ project * Go to {{{Project > Project Options > configure" Options"}}} * Add to "C / C++ Preprocessor Flags (CPPFLAGS)": {{{-I/usr/local/include}}} * Add to "C / C++ Linker editor flags (LDFLAGS)": {{{-L/usr/local/lib -lfmod}}} == Troubleshooting == === FSOUND_Init can't initialize === under Debian, it's necessary to call {{{FSOUND_SetOutput ( FSOUND_OUTPUT_ALSA );}}} before calling {{{FSOUND_Init()}}} See http://www.siteduzero.com/forum-83-356196-3310992-impossible-de-trouver-le-fichier-son.html#r3310992 ''(in french)'' = External links = * http://www.fmod.org - Official Website * http://www.siteduzero.com/tutoriel-3-14156-jouer-du-son-avec-fmod.html - To Learn easily FMODv3 using ''(in french)'' * http://www.pathname.com/fhs/pub/fhs-2.3.html#USRLOCALLOCALHIERARCHY - Why do you install non-maintaining library in /usr/local/ ---- [[ProgrammingLanguage]]