How to fix this when compile?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By ao_blue

It shows error lines like this =

b’In file included from platform\windows\os_windows.h:40:0,\r\n from platform\windows\godot_windows.cpp:32:\r\n./drivers/wasapi/audio_driver_wasapi.h:40:25: fatal error: audioclient.h: No such file or directory\r\n #include <audioclient.h>\r\n ^\r\ncompilation terminated.\r\n’

Is there the reason this error happen?
And, how to fix it?

:bust_in_silhouette: Reply From: RoniPerson

audioclient.h is part of the Windows SDK. If your compiler can’t find it the SDK is not setup correctly.

If you are using the visual studio code compiler the SDK is normaly part of the “Desktop development with C/C++” option in the installer. Just start the installer again select your version and click on change. Select “Desktop development with C/C++” and have a look at the right sidebar. There are all packages to install. One entry should say “Windows 10 SDK”. Select the newest version and tick the box and install it.

If you are using an other compiler you have to setup the SDK for this compiler. Have a look on the Internet for that.