Linking Fmod with codeblocks

Hi :wave:t2:,
How can i use the new products of Fmod (instead of FmodEX API) to code using CodeBlocks ?

  • how to link ?
    I’m using win64 and MinGW64.

and what of those Several products and its versions i have to download for this purpose ?

Thank you for all :handshake:t3:

Hi,

To link FMOD using CodeBlocks, it should be a matter of doing the following:

  • Add import library (.lib) files from the relevant API’s ./lib directory to Project → Build Options → Linker Settings → Link Libraries
  • Add the relevant API’s ./inc directory to your includes by adding the directory to Project → Build Options → Search Directories → Compiler
  • Make sure that the FMOD .dll files in the ./lib directory for the API’s you’re using are located in the same directory as your built executable.

You can see more information on the FMOD Windows libraries in our platform specific documentation.

As for which version you need, you’ll need the FMOD Engine for whichever platforms you’re planning to build for, which in this case should be Windows.

At first thank you @Leah_FMOD too much for replying…

Actually i do this every time i add a library.
But the problem is the compiler keeps telling me “undefined reference to fmod func.” So i asked how i link it as i use 64 windows system and MinGW64 too.

The product “FmodEX” was including FmodEX64.dll

Now the new products have not.
There aren’t (.a) lib files also for code blocks.

Unfortunately, I haven’t been able to reproduce this issue following the steps I laid out in my previous reply, and I’m able to build an .exe that uses FMOD with CodeBlocks/MinGW64 without any issues.

That said, you’ll want to make sure that all of the relevant FMOD headers are being included, and you may also need to use FMOD’s C functions instead of CPP functions - for example, using FMOD_Studio_System_Create() and FMOD_Studio_System_Initialize() instead of FMOD::Studio::System::create() and yourStudioObject->initialize(). You can check our Studio and Core API references and change the language selected to C for more information.

FMOD Studio has both fmod.dll and fmodstudio.dll instead. It’s not possible to statically link FMOD Studio, as we don’t provide the .a libs required to do so. You much dynamically link the .dll files instead.