Where are the x64 and ARM Developer Prompts for VS2017?

后端 未结 2 1215
悲哀的现实
悲哀的现实 2020-12-11 04:18

I installed the Visual Studio 2017 Build Tools. After installation, there\'s only an x86 Developer Command Prompt when navigating Start → Programs → Visual Studio 2017 →

相关标签:
2条回答
  • 2020-12-11 04:44

    The developer prompt bat files seem to have been restructured a little in VS 2017. Instead of having a fixed set of predefined developer prompts, you can customize it even more now.

    To get a developer prompt for e.g. arm, add -arch=arm -host_arch=amd64 as parameters to VsDevCmd.bat (e.g. in the shortcut in the start menu).

    For the full list of available options, have a look in \Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\Tools\vsdevcmd\core\parse_cmd.bat, or call "\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\Tools\vsdevcmd" -help.

    I'm not sure if this really is documented anywhere, or if it will be fixed up and/or documented better for the final release of VS 2017.

    Installing the insider preview Windows 10 SDK is unrelated to this; the standalone Windows SDK doesn't include any compilers, only headers and link libraries.

    0 讨论(0)
  • Install the Windows 10 SDK and WDK (at least Build 16299) to get the ARM Compiler for Desktop Applications.

    Open the Project configuration and create ARM(64) configuration:

    If you try to compile it you would get an error that ARM64 is not supported for Desktop:

    To fix this, unload the project and open it in editor and add the line <WindowsSDKDesktopARM64Support>true</WindowsSDKDesktopARM64Support> to the debug and release entry for ARM64:

      <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'" Label="Configuration">
        <ConfigurationType>Application</ConfigurationType>
        <UseDebugLibraries>true</UseDebugLibraries>
        <PlatformToolset>v141</PlatformToolset>
        <CharacterSet>Unicode</CharacterSet>
        <WindowsSDKDesktopARM64Support>true</WindowsSDKDesktopARM64Support>
      </PropertyGroup>
      <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'" Label="Configuration">
        <ConfigurationType>Application</ConfigurationType>
        <UseDebugLibraries>false</UseDebugLibraries>
        <PlatformToolset>v141</PlatformToolset>
        <WholeProgramOptimization>true</WholeProgramOptimization>
        <CharacterSet>Unicode</CharacterSet>
        <WindowsSDKDesktopARM64Support>true</WindowsSDKDesktopARM64Support>
      </PropertyGroup>
    

    and WindowsSDKDesktopARMSupport for 32Bit ARM.

    Save changes, load the project again and now compilation works fine:

    The 15.9 Update for VS2017, adds official ARM64 support (only for UWP), here the commandline to open ARM64 dev prompt is:

    %comspec% /k ""C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat"" amd64_arm
    

    32 Bit Arm commandline is:

    %comspec% /k ""C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat"" x86_arm
    
    0 讨论(0)
提交回复
热议问题