Building static plugins from source - 'fmod.hpp' file not found

I have a custom plugin I built and it’s up and running for Windows, and I’m now trying to support a platform that requires a static plugin. I’m following the documentation and am attempting to build the plugin from source, however when I build I get the error:

Unity.IL2CPP.Building.BuilderFailedException: clang: warning: argument unused during compilation: '-stdlib=libc++' [-Wunused-command-line-argument]
C:\Users\[FILEPATH]\Library\Il2cppBuildCache\Switch\il2cppOutput\[PLUGIN_NAME].cpp(10,10): fatal error: 'fmod.hpp' file not found
#include "fmod.hpp"
         ^~~~~~~~~~
1 error generated.

Including fmod.hpp from the api in the Unity project doesn’t clear the error. Is there a certain way I should be setting up my project to include fmod.hpp, or maybe do I need to organize my code in a different manner?

To help me reproduce this error, can you please tell me if your custom plugin is loaded in an FMOD Studio Event that you are trying to call inside Unity, or are you trying to load the plugin with FMODUnity.RuntimeManager.CoreSystem.loadPlugin and it’s failing? Can you also please provide me with your FMOD version?
One thing to try, rather than building from source you could load your plugin as a static library.

To help me reproduce this error, can you please tell me if your custom plugin is loaded in an FMOD Studio Event that you are trying to call inside Unity, or are you trying to load the plugin with FMODUnity.RuntimeManager.CoreSystem.loadPlugin and it’s failing?

The former. The error occurs when attempting to build the Unity project.

Can you also please provide me with your FMOD version?

2.01.09

I reproduced the error using the setup you’ve described. Assuming you did what I did and created a plugin in a different directory and later dragged it in to your Unity project’s directory, then you will need to make sure you include any dependencies that your plugin needs inside the Unity project when compiling from source.
Dragging them into the same directory as your plugin ought to work, but given the complexity of the folder structure surrounding fmod.hpp I found including a relative path was easier and resulted in a succesful build and run. Try changing your #include "fmod.hpp" to #include "..\<relative_path_to_fmod_engine_directory>\core_api\src\fmod.hpp".
If you could please confirm that this works in your case then I’ll make a task to update the docs with this information.