Build & run from qtCreator : libfmod.so.12

cannot run from qtCreator with error message

error while loading shared libraries: libfmod.so.12: cannot open shared object file: No such file or directory

it’s been working but I can’t remember when the error been occurred.

environment :

arch linux
OF 0.11.2
qtCreator v4.6.2

Hmm.
fmod shouldn’t be enabled by default on linux.

Are you trying to enable the ofFmodSoundPlayer or is this happening with the examples too?

no. I don’t.
I’ve tested two linux machine. one is new linux setup done fresh.

Could you try changes these lines in ofConstants.h and see if which warning you get when you compile?

//------------------------------------------------ soundplayer
// check if any soundplayer api is defined from the compiler
#if !defined(OF_SOUND_PLAYER_QUICKTIME) && !defined(OF_SOUND_PLAYER_FMOD) && !defined(OF_SOUND_PLAYER_OPENAL) && !defined(OF_SOUND_PLAYER_EMSCRIPTEN)
  #ifdef TARGET_OF_IOS
  	#define OF_SOUND_PLAYER_IPHONE
  #elif defined(TARGET_LINUX) || defined(TARGET_MINGW)
  	#define OF_SOUND_PLAYER_OPENAL
	#pragma message("WARNING: AUTO SELECTING OPENAL")
  #elif defined(TARGET_EMSCRIPTEN)
	#define OF_SOUND_PLAYER_EMSCRIPTEN
  #elif !defined(TARGET_ANDROID) && (!defined(USE_FMOD) || USE_FMOD)
  	#define OF_SOUND_PLAYER_FMOD
	#pragma message("WARNING: AUTO SELECTING FMOD")
  #endif
#endif

#if defined(OF_SOUND_PLAYER_FMOD)
#pragma message("WARNING: USING FMOD")
#endif

#if defined(OF_SOUND_PLAYER_OPENAL)
#pragma message("WARNING: USING OPENAL")
#endif

I think OPENAL selected.

btw, if I compile and run by make, make RunRelease, I don’t have libfmod.so issue. it only happen run from qtCreator

In file included from /home/icq4ever/oF/addons/ofxGui/src/ofxBaseGui.h:3,
                 from /home/icq4ever/oF/addons/ofxGui/src/ofxGuiGroup.h:2,
                 from /home/icq4ever/oF/addons/ofxGui/src/ofxGuiGroup.cpp:1:
/home/icq4ever/oF/libs/openFrameworks/utils/ofConstants.h:383:50: note: ‘#pragma message: WARNING: AUTO SELECTING OPENAL’
  383 |  #pragma message("WARNING: AUTO SELECTING OPENAL")
      |                                                  ^
/home/icq4ever/oF/libs/openFrameworks/utils/ofConstants.h:397:40: note: ‘#pragma message: WARNING: USING OPENAL’
  397 | #pragma message("WARNING: USING OPENAL")
      | 

Ah okay - that makes more sense.
It must be something in the switch from libfmodex to libfmod with the QtCreator files.

Not really an ideal fix but you could try adding a line for fmod here:

This would disable linking fmod on linux.

Another fix would be to rename libfmod.so in libs/fmod/lib/linux64/ to
libfmod.so.12 and make a symlink to it named libfmod.so

If that second approach works for you we can fix this in the next release.

hmm… second approach I tried. but nothing changed.

is this right?

icq4ever@p340:~/oF(master⚡) » cd libs/fmod/lib/linux64 
icq4ever@p340:~/oF/libs/fmod/lib/linux64(master⚡) » ls
libfmod.so
icq4ever@p340:~/oF/libs/fmod/lib/linux64(master⚡) » mv libfmod.so libfmod.so.12
icq4ever@p340:~/oF/libs/fmod/lib/linux64(master⚡) » ln -s libfmod.so.12 ~/oF/libs/fmod/lib/linux64/libfmod.so
icq4ever@p340:~/oF/libs/fmod/lib/linux64(master⚡) » ls -al
total 1604
drwxr-xr-x 2 icq4ever icq4ever    4096  4월  9 02:40 .
drwxr-xr-x 3 icq4ever icq4ever    4096  1월  3 09:25 ..
-rwxr-xr-x 1 icq4ever icq4ever     212  1월  3 09:25 ._libfmod.so
lrwxrwxrwx 1 icq4ever icq4ever      13  4월  9 02:40 libfmod.so -> libfmod.so.12
-rwxr-xr-x 1 icq4ever icq4ever 1627616  1월  3 09:25 libfmod.so.12

Hmm - yeah I think that is what I was hoping would work. :slight_smile:
I wonder if you have to copy both to the bin/ folder where your executable lives?

btw I think the ln command should be:
ln -s libfmod.so.12 libfmod.so

I’ll see if I can recreate the issue on Ubuntu. I think it is an issue I am seeing on other forums with the latest fmod.

1 Like

I copied libfmod.so.12, generate symlink in bin folder. but not resolved.
image