How to set up the FMOD audio library in Qt Creator for Android
-
@8Observer8 If you want to run your app outside of QtCreator you first have to deploy it, so it contains all needed libraries.
@jsulm I want to run my app inside of Qt Creator with relative set up path (with using
$$PWD
instead of"E:/
) because I want to distribute my examples with included libs. For example, I can post my examples (ZIPs) on the forums and people can download it and run without set up of FMOD and so on. And without manual copying offmod.dlll
to the Debug folder. For a while the"E:/
method (absolute path) works without manual copying offmod.dll
but the$$PWD
method (relative path) requires to copyfmod.dll
to the Debug folder. The distribution of EXE is very clear for me. Yes, of course I should distributefmod.dll
,Qt6Core.dll
and so on with EXE. My question about distribution of Qt project with libs to run it very quickly in Qt Creator on another computer.The
$$PWD
method (relative path) allows to include all libs to a project. I should works like this - everyone can download the project and run it without downloading requires libs and without manual copying offmod.dll
to the Debug folder: -
@jsulm I want to run my app inside of Qt Creator with relative set up path (with using
$$PWD
instead of"E:/
) because I want to distribute my examples with included libs. For example, I can post my examples (ZIPs) on the forums and people can download it and run without set up of FMOD and so on. And without manual copying offmod.dlll
to the Debug folder. For a while the"E:/
method (absolute path) works without manual copying offmod.dll
but the$$PWD
method (relative path) requires to copyfmod.dll
to the Debug folder. The distribution of EXE is very clear for me. Yes, of course I should distributefmod.dll
,Qt6Core.dll
and so on with EXE. My question about distribution of Qt project with libs to run it very quickly in Qt Creator on another computer.The
$$PWD
method (relative path) allows to include all libs to a project. I should works like this - everyone can download the project and run it without downloading requires libs and without manual copying offmod.dll
to the Debug folder:@8Observer8 It looks like the library is part of your project. You could use https://wiki.qt.io/SUBDIRS_-_handling_dependencies project and make your main project depend on the library sub-project. In that case the libs should be copied during the build.
-
@8Observer8 It looks like the library is part of your project. You could use https://wiki.qt.io/SUBDIRS_-_handling_dependencies project and make your main project depend on the library sub-project. In that case the libs should be copied during the build.
@jsulm said in How to set up the FMOD audio library in Qt Creator for Android:
It looks like the library is part of your project.
I don't have a source code of the proprietary FMOD library. I have only two folders for this library in my project folder:
include
:
andlibs
:I think SUBDIRS cannot copy
fmod.dll
from thelibs/fmod-2.2.21-mingw-64-bit/lib/x64
folder to the Debug folder or can it? -
I solved the problem with the relative paths to the library! I just added
-L
before$$PWD
like this:INCLUDEPATH += $$PWD/libs/fmod-2.2.21-mingw-64-bit/include LIBS += -L$$PWD/libs/fmod-2.2.21-mingw-64-bit/lib/x64 LIBS += -lfmod
Now you can download the next example and run it in Qt Creator (with MinGW 64) without necessary to set up FMOD or changing the paths in pro-file: play-audio-from-resources-fmod-qt6-cpp.zip (2.51 MB)