# Studio C API: undefined reference to SetParameterByID()

**URL:** <https://qa.fmod.com/t/studio-c-api-undefined-reference-to-setparameterbyid/15403>\
**Category:** FMOD Engine\
**Created:** [January 23, 2020, 5:56pm UTC](https://qa.fmod.com/t/studio-c-api-undefined-reference-to-setparameterbyid/15403 "2020-01-23T17:56:38Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![damiano57](https://avatars.discourse-cdn.com/v4/letter/d/aeb1de/32.png) [@damiano57](https://qa.fmod.com/u/damiano57)\
**Post date:** [January 23, 2020, 5:56pm UTC](https://qa.fmod.com/t/studio-c-api-undefined-reference-to-setparameterbyid/15403/1 "2020-01-23T17:56:38Z")

</div>

Compiling with Mingw32.

Linker error on:  
FMOD\_Studio\_EventInstance\_SetParameterByID(eventInstance, parameter.id, value, true);

This works fine tho:  
FMOD\_Studio\_EventInstance\_SetParametersByIDs(eventInstance, (const FMOD\_STUDIO\_PARAMETER\_ID\*)&parameter.id, &value, 1, true);

---

<div class="post-metadata">

**Author:** ![cameron-fmod](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/cameron-fmod/32/261_2.png) [@cameron-fmod](https://qa.fmod.com/u/cameron-fmod)\
**Post date:** [January 29, 2020, 11:57pm UTC](https://qa.fmod.com/t/studio-c-api-undefined-reference-to-setparameterbyid/15403/2 "2020-01-29T23:57:24Z")

</div>

What version of FMOD are you using?

> If you encounter issues linking fmod with MinGW, ensure that you are following the GCC linker ordering requirements and the MinGW library search order.

[https://fmod.com/resources/documentation-api?version=2.0&page=platforms-windows.html#libraries](https://fmod.com/resources/documentation-api?version=2.0&page=platforms-windows.html#libraries)

---

<div class="post-metadata">

**Author:** ![damiano57](https://avatars.discourse-cdn.com/v4/letter/d/aeb1de/32.png) [@damiano57](https://qa.fmod.com/u/damiano57)\
**Post date:** [January 30, 2020, 10:28am UTC](https://qa.fmod.com/t/studio-c-api-undefined-reference-to-setparameterbyid/15403/3 "2020-01-30T10:28:30Z")

</div>

I’m using fmodstudio-2.00.07 api (from fmodstudioapi20007win-installer.exe)

So apparently now I can link the Visual Studio version with gcc?

If I link with libfmod.a and libfmodstudio.a (-lfmod -lfmodstudio) I get the linker error of undefined reference, but only for that function.

If I use the ‘vc’ version (-lfmod\_vc -lfmodstudio\_vc) I get no error.
