[英]How to install SDL on Windows 8.1 and to connect it to Visual Studio Community 2013
[英]How to I configure Visual Studio 2013 to Link to Windows Kit 10 and not 8.1
我花了最近2個小時圍繞這個主題進行了討論,並且無法讓它工作,所以希望一些Visual Studio Guru能夠幫助我。
首先是一些基礎知識。 我正在使用Visual Studio 2013 Professional(32位)在Windows 10上進行開發,我的VS可以很好地鏈接到C:\\Program Files (x86)\\Windows Kits\\8.1
我也安裝了8.0版本的Windows套件,但據我所知,VS2013沒有使用它。 同樣,我安裝了Visual Studio 2010但未用於此項目。
我的代碼需要使用VersionHelpers.h中的IsWindows10OrGreater()
函數,該函數僅在Windows工具包10中可用。
我已安裝Windows Kit 10,並已安裝到C:\\Program Files (x86)\\Windows Kits\\10
到現在為止還挺好。 Windows Kit 10的安裝創建了一個環境變量。 它沒有刪除舊的Windows Kit 8.1環境變量,但我已經嘗試過解決問題但沒有成功。
問題是visual studio 2013鏈接到8.1 sdk。
我已經嘗試添加10路徑到INCLUDE,LIB和LIBPATH(它已經在PATH中),因為我看到這些在vcvars32.bat
設置。 這沒用。
經過大量的挖掘后,我設法在project>properties>C/C++/Preprocessor>Preprocessor
Definitions下找到,並且在宏中我注意到有一些Marcos定義指向C:\\Program Files (x86)\\Windows Kits\\8.1
但我找不到改變這些宏的方法。
誰能告訴我如何配置Visual Studio以指向正確的SDK。
提前致謝
托馬斯
基於我的舊版SDK 8 for VS2010,我編寫了這個屬性表,看起來很有效。 您需要驗證文件夾是否適合您的WDK 10安裝,並注意這僅適用於x64。
創建文件Windows10SDK_X64.props
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ImportGroup Label="PropertySheets" />
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<ExecutablePath>$(VCInstallDir)bin\x86_amd64;$(VCInstallDir)bin;$(WindowsSdkDir)bin\NETFX 4.0 Tools;$(ProgramFiles)\Windows Kits\10\bin\x86;$(VSInstallDir)Common7\Tools\bin;$(VSInstallDir)Common7\tools;$(VSInstallDir)Common7\ide;$(ProgramFiles)\HTML Help Workshop;$(FrameworkSDKDir)\bin;$(MSBuildToolsPath32);$(VSInstallDir);$(SystemRoot)\SysWow64;$(FxCopDir);$(PATH)</ExecutablePath>
<IncludePath>$(ProgramFiles)\Windows Kits\10\Include\10.0.10240.0\um;$(ProgramFiles)\Windows Kits\10\Include\10.0.10240.0\shared;$(VCInstallDir)include;$(VCInstallDir)atlmfc\include;$(FrameworkSDKDir)\include;</IncludePath>
<LibraryPath>$(VCInstallDir)lib\amd64;$(VCInstallDir)atlmfc\lib\amd64;$(ProgramFiles)\Windows Kits\10\lib\10.0.10240.0\um\x64;$(FrameworkSDKDir)\lib\x64</LibraryPath>
<ExcludePath>$(VCInstallDir)include;$(VCInstallDir)atlmfc\include;$(ProgramFiles)\Windows Kits\10\Include\10.0.10240.0\um;$(ProgramFiles)\Windows Kits\10\Include\10.0.10240.0\shared;$(FrameworkSDKDir)\include;$(MSBuildToolsPath32);$(VCInstallDir)atlmfc\lib;$(VCInstallDir)lib;</ExcludePath>
</PropertyGroup>
<ItemDefinitionGroup />
</Project>
確保清潔並重建。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.