Link time error for System::getCPUUsage on v2.02.19


Referencing FMOD::System::getCPUUsage(FMOD_CPU_USAGE*) fails with a link-time error. Building for iOS 17.0.1 using Xcode 15. Note that we are using it so I can’t just comment it out of the header.

I’m using an XCFramework packing the core libs. Both libfmod_iphoneos.a and libfmod_iphonesimulator.a.

There’s a similar post but its from 2.01.04 C# and was said to be fixed on the next update.

I have not been able to reproduce this issue. Can you please try running the iOS examples that came with the FMOD Engine download and let me know if it fails to link in them as well?

I’ve instead tried with a small test project and couldn’t reproduce it either, do you have any idea what could cause a single symbol to go missing like that?

It doesn’t look like it is the same issue from 2.01.04 you mentioned, otherwise the examples would be broken as well.
We did change the signature of FMOD::System::getCPUUsage from 5 arguments to 1 in 2.02: API Differences. You could hit a linker error like this if you linked to a 2.01 version of the libs but had the 2.02 header. This seems unlikely, but it would still be worth comparing FMOD_VERSION to the result of System::getVersion to ensure your headers and libs are matching (temporarily removing System::getCPUUsage from your application and header as well to get it to compile).

The versions were fine, in fact it works well with other projects using the same lib/header combination. Unfortunately I can’t share the code of the main project but something in there is causing that single symbol to fail.

Thank you for your help, if I ever find the issue I’ll post it here!