Search code examples
c++sdkxaudio2steamworks-api

XAudio2 false Targeting windows version


I'm using XAudio2 to run SteamWorksExample game to see how can i include steam stuffs inside my C++ based game, I'm using Windows 10 but when i run code, I got this error:

"This version of XAudio2 is available only in Windows 8 or later. Use the XAudio2 headers and libraries from the DirectX SDK with applications that target Windows 7 and earlier versions."

i checked source files, its on there:

#if(_WIN32_WINNT < _WIN32_WINNT_WIN8) #error "This version of XAudio2 is available only in Windows 8 or later. Use the XAudio2 headers and libraries from the DirectX SDK with applications that target Windows 7 and earlier versions." #endif // (_WIN32_WINNT < _WIN32_WINNT_WIN8)

how can i solve that error?


Solution

  • check your VC++ directories, if they are like that:

    Include Directories: $(IncludePath);$(DXSDK_DIR)Include

    Include Library Directories: $(LibraryPath);$(DXSDK_DIR)Lib\x86

    delete them.

    in my case, it solved problem