# Build failed Unity 2019.2.8 on Switch, FMOD 2.00.05 (with workaround)

**URL:** <https://qa.fmod.com/t/build-failed-unity-2019-2-8-on-switch-fmod-2-00-05-with-workaround/15126>\
**Category:** Unity\
**Created:** [October 10, 2019, 9:35pm UTC](https://qa.fmod.com/t/build-failed-unity-2019-2-8-on-switch-fmod-2-00-05-with-workaround/15126 "2019-10-10T21:35:04Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![dns](https://avatars.discourse-cdn.com/v4/letter/d/58f4c7/32.png) [@dns](https://qa.fmod.com/u/dns)\
**Post date:** [October 10, 2019, 9:35pm UTC](https://qa.fmod.com/t/build-failed-unity-2019-2-8-on-switch-fmod-2-00-05-with-workaround/15126/1 "2019-10-10T21:35:04Z")

</div>

Hi, I couldn’t build on Nintendo Switch with Unity 2019.2.8 & latest FMOD 2.00.05 (installed from the unity package)  
The error is 2 functions not found at link time during the IL2CPP compilation.  
I had to comment those functions in fmod\_studio.cs: FMOD\_Studio\_Bus\_GetCPUUsage and FMOD\_Studio\_EventInstance\_GetCPUUsage.  
I deleted+re-unpackaged everything from the plugin, deleted caches (/library, IL2CPP cache etc) but still had the error. Only commenting those functions in the code worked.  
Extract from error log:  
il2cpp\_cache/4E5F75CFFF22399A0E8A48187CF905B9.o:Assembly-CSharp-firstpass1.cpp:function EventInstance\_FMOD\_Studio\_EventInstance\_GetCPUUsage\_mADD422139A6AA27DD810EB8022D3A967F92C9802: error: undefined reference to ‘FMOD\_Studio\_EventInstance\_GetCPUUsage’  
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Thanks

---

<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:** [October 15, 2019, 3:11am UTC](https://qa.fmod.com/t/build-failed-unity-2019-2-8-on-switch-fmod-2-00-05-with-workaround/15126/2 "2019-10-15T03:11:17Z")

</div>

Are you using the latest versions of both the FMOD Unity base Integration package and the Unity Switch Integration package?

---

<div class="post-metadata">

**Author:** ![dns](https://avatars.discourse-cdn.com/v4/letter/d/58f4c7/32.png) [@dns](https://qa.fmod.com/u/dns)\
**Post date:** [October 15, 2019, 4:03pm UTC](https://qa.fmod.com/t/build-failed-unity-2019-2-8-on-switch-fmod-2-00-05-with-workaround/15126/3 "2019-10-15T16:03:24Z")

</div>

I double checked everything: only one Nintendo dev environment installed (the one for 2019.2.8, with SDK 9.3.0), Unity Editor Switch addon checked, Nintendo SDK package checked, FMOD package checked, FMOD Switch package checked. Re-cleaned everything & rebuilt all but still the same problem.  
It’s strange because I can find (with text/hex editor) the name of the functions the linker does not find in the libfmodstudiounityplugin(L).a file.  
Well, if no one else gets the same problem I guess it’s my setup. I’ll be extra careful for next FMOD/Unity update. I’ll update this post if I find anything that can be useful to other facing the same problem.

---

<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:** [October 16, 2019, 11:44pm UTC](https://qa.fmod.com/t/build-failed-unity-2019-2-8-on-switch-fmod-2-00-05-with-workaround/15126/4 "2019-10-16T23:44:25Z")

</div>

It does look like this is a bug in the current release, we are working on a fix for the next release.

On a separate note, we currently build against SDK 8.3.0 which should only be a problem when it comes time to submit your game.

---

<div class="post-metadata">

**Author:** ![nzgreg](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/nzgreg/32/972_2.png) [@nzgreg](https://qa.fmod.com/u/nzgreg)\
**Post date:** [October 17, 2019, 9:40pm UTC](https://qa.fmod.com/t/build-failed-unity-2019-2-8-on-switch-fmod-2-00-05-with-workaround/15126/5 "2019-10-17T21:40:48Z")

</div>

hey Cameron,

we’re seeing this error in v2.00.05 for Unity building for tvOS as well. Do you have an eta on when your next release with a fix might be?

Unrelated (should post this separately) but we seem to have to delete the FMODStudioCache manually frequently as the copy banks to StreamingAssets goes crazy and ends up with bad paths all over the place (on Mac).

cheers,

// greg

---

<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:** [October 20, 2019, 11:47pm UTC](https://qa.fmod.com/t/build-failed-unity-2019-2-8-on-switch-fmod-2-00-05-with-workaround/15126/6 "2019-10-20T23:47:17Z")

</div>

The next release is currently scheduled for the start of November, most likely around the 4th.

I’d recommend posting the cache issue separately, can you include the following:

- FMOD & Unity versions
- Log from the editor
- Screenshot of the FMOD for Unity settings (from in the Unity editor)

---

<div class="post-metadata">

**Author:** ![nzgreg](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/nzgreg/32/972_2.png) [@nzgreg](https://qa.fmod.com/u/nzgreg)\
**Post date:** [October 21, 2019, 12:04am UTC](https://qa.fmod.com/t/build-failed-unity-2019-2-8-on-switch-fmod-2-00-05-with-workaround/15126/7 "2019-10-21T00:04:41Z")

</div>

hey Cameron,

thanks for the info. Yep, I’ll make another post for the cachesettings problem soon and add a link here for reference.

---

<div class="post-metadata">

**Author:** ![ISanchezV](https://avatars.discourse-cdn.com/v4/letter/i/dfb087/32.png) [@ISanchezV](https://qa.fmod.com/u/ISanchezV)\
**Post date:** [November 13, 2019, 10:29am UTC](https://qa.fmod.com/t/build-failed-unity-2019-2-8-on-switch-fmod-2-00-05-with-workaround/15126/8 "2019-11-13T10:29:41Z")

</div>

I’m running into this exact problem when building from Unity 2018.4.12f and Xcode 11.2, any additional information, timeline, workaround?

---

<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:** [November 20, 2019, 9:32pm UTC](https://qa.fmod.com/t/build-failed-unity-2019-2-8-on-switch-fmod-2-00-05-with-workaround/15126/9 "2019-11-20T21:32:14Z")

</div>

This has been fixed in the latest release (2.00.06).
