VisualStudio isnt recognising Fmod

Hello. Im trying to make a custom BP node in C++ that’s using the Fmod API, but its giving errors for every Fmod header “Canot open source file FMODAudioComponent.h”. I have added “FMODStudio” in MyProject.Build.cs, but that changes noting.

I followed this tutorial for Fmod integration in to UE5 https://www.youtube.com/watch?v=w_cjlfkEnVQ&ab_channel=EloyDeCort-GameAudio

Hi,

Please add it to the PrivateDependencyModulesNames:

public class MyProject : ModuleRules
{
	public MyProject(ReadOnlyTargetRules Target) : base(Target)
	{
		PCHUsage = PCHUsageMode.UseExplicitOrSharedPCHs;

		PublicDependencyModuleNames.AddRange(new string[] { "Core", "CoreUObject", "Engine", "InputCore", "EnhancedInput" });

		PrivateDependencyModuleNames.AddRange(new string[] { "FMODStudio" });
    }
}

More information about programming in UE with FMOD can be found here: Unreal Integration | User Guide - Programming Support
Hope this helps!

I did it and regenerated the visual studio project files. And it changed nothing

After more tinkering, I found that the Fmod headers work when I use them in any class I make in C++ Classes folder. Previously I was trying to make this work in a custom BP library plugin. I guess when making custom plugins it doesn’t get the directories from other plugins.

1 Like

Thanks for sharing the solution