Ubuntu cocos2d-x 3.13版本游戏开发学习系列2 解决libfmod.so.6未找到的错误

添加预加载背景音乐的时候

//加载声音
CocosDenshion::SimpleAudioEngine::getInstance()->preloadBackgroundMusic("sound/game_start.mp3");

在linu下编译出现如下错误:

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

在google之后发现了解决方案:

cd /home/fy_android/apps/cocos2d-x/build
./install-deps-linux.sh

即在切换到cocos2d-x的编译工具目录,运行安装linux音频处理依赖库即可

原文地址:https://www.cnblogs.com/soongkun/p/6018522.html