# Linking Fmod with codeblocks

**URL:** <https://qa.fmod.com/t/linking-fmod-with-codeblocks/21748>\
**Category:** Known Issues\
**Created:** [June 11, 2024, 2:44am UTC](https://qa.fmod.com/t/linking-fmod-with-codeblocks/21748 "2024-06-11T02:44:35Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![AhmmadGaper](https://avatars.discourse-cdn.com/v4/letter/a/d07c76/32.png) [@AhmmadGaper](https://qa.fmod.com/u/AhmmadGaper)\
**Post date:** [June 11, 2024, 2:44am UTC](https://qa.fmod.com/t/linking-fmod-with-codeblocks/21748/1 "2024-06-11T02:44:35Z")

</div>

Hi 👋🏻,  
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 🤝🏼

---

<div class="post-metadata">

**Author:** ![Leah\_FMOD](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/leah_fmod/32/3685_2.png) [@Leah\_FMOD](https://qa.fmod.com/u/Leah_FMOD)\
**Post date:** [June 14, 2024, 7:06am UTC](https://qa.fmod.com/t/linking-fmod-with-codeblocks/21748/2 "2024-06-14T07:06:22Z")

</div>

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](https://www.fmod.com/docs/2.02/api/platforms-win.html#libraries).

As for which version you need, you’ll need the [FMOD Engine](https://www.fmod.com/download#fmodengine) for whichever platforms you’re planning to build for, which in this case should be Windows.

---

<div class="post-metadata">

**Author:** ![AhmmadGaper](https://avatars.discourse-cdn.com/v4/letter/a/d07c76/32.png) [@AhmmadGaper](https://qa.fmod.com/u/AhmmadGaper)\
**Post date:** [June 14, 2024, 9:18pm UTC](https://qa.fmod.com/t/linking-fmod-with-codeblocks/21748/3 "2024-06-14T21:18:20Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Leah\_FMOD](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/leah_fmod/32/3685_2.png) [@Leah\_FMOD](https://qa.fmod.com/u/Leah_FMOD)\
**Post date:** [June 25, 2024, 2:40am UTC](https://qa.fmod.com/t/linking-fmod-with-codeblocks/21748/4 "2024-06-25T02:40:03Z")

</div>

> [@AhmmadGaper](#):
>
> 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.

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](https://www.fmod.com/docs/2.02/api/studio-api.html) and [Core](https://www.fmod.com/docs/2.02/api/core-api.html) API references and change the language selected to C for more information.

> [@AhmmadGaper](#):
>
> The product “FmodEX” was including FmodEX64.dll
> 
> Now the new products have not.  
> There aren’t (.a) lib files also for code blocks.

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.
