问题描述
我正在使用xaudio2运行SteamWorksExample游戏,以查看如何在基于C ++的游戏中包含蒸汽内容,我正在使用Windows 10,但是当我运行代码时,出现此错误:
“此版本的xaudio2仅在Windows 8或更高版本中可用。将DirectX SDK中的xaudio2标头和库与面向Windows 7和更早版本的应用程序一起使用。”
#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)
解决方法
检查您的VC ++目录,如果那样的话:
包含目录:$(IncludePath); $(DXSDK_DIR)Include
包括库目录:$(LibraryPath); $(DXSDK_DIR)Lib \ x86
删除它们。
就我而言,它解决了问题