6

[スタート] ボタンの Visual Studio 2010 メニューに表示される「visual studio x64 win64 コマンド プロンプト」、「visual studio x64 クロス ツール コマンド プロンプト」、および「visual studio コマンド プロンプト」の違いは何ですか?

最も有用な答えとして、私の無知レベルについて明確にしましょう。私は、Microsoft や IDE 全般の第一人者というより初心者に近いです。Linux の長年の専門家、プレーン テキスト エディタでソースを編集、手作りの Makefile など

違いは単純で、VS2010 の経験が浅い人にはおそらく「明白」だと思います。

4

2 に答える 2

4

さまざまなバッチ ファイルは、 、 、および を調整PATHして、LIBおよびINCLUDEその他のビルド ツールを簡単にLIBPATH実行できるようにします。cl.exe

于 2012-07-27T21:22:47.837 に答える
1

This answer focuses mostly on VS2013. Microsoft's documentation http://msdn.microsoft.com/en-us/library/ms229859%28v=vs.110%29.aspx states:

Starting with Visual Studio 2010, you may see multiple command prompts, depending on the version of Visual Studio and any additional SDKs you've installed. For example, 64-bit versions of Visual Studio provide both 32-bit and 64-bit command prompts. (The 32-bit and 64-bit versions of most tools are identical; however, a few tools make changes specific to 32-bit and 64-bit environments.)

It adds, rather unhelpfully:

Check the documentation for the individual tools to determine which version of the command prompt you should use.

The page http://msdn.microsoft.com/en-us/library/jj153218.aspx lists five such command prompts:

  • Developer Command Prompt for VS2013
  • VS2013 ARM Cross Tools Command Prompt
  • VS2013 x64 Cross Tools Command Prompt
  • VS2013 x64 Native Tools Command Prompt
  • VS2013 x86 Native Tools Command Prompt

On my machine, only the 1st, 3rd, and 5th of these are present, and they launch, respectively:

%comspec% /k ""C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\Tools\VsDevCmd.bat"" %comspec% /k ""C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\vcvarsall.bat"" x86_amd64 %comspec% /k ""C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\vcvarsall.bat"" x86

To check the environment variables, running the set command for first and "x86 Native" shells gives identical results on my machine. And mmohamad's answer tp Difference between VsDevCmd.bat & vcvarsall.bat in VS2012 agrees with this.

But "x64 Cross" is different: the difference is (excluding Path and LIBPATH for brevity):

 + CommandPromptType=Cross
 + FrameworkDIR64=C:\WINDOWS\Microsoft.NET\Framework64
 + FrameworkVersion64=v4.0.30319
 + Platform=x64
 - LIB=C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\LIB;C:\Program Files (x86)\Windows Kits\8.1\lib\winv6.3\um\x86;
 + LIB=C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\LIB\amd64;C:\Program Files (x86)\Windows Kits\8.1\lib\winv6.3\um\x64;
于 2014-07-17T17:51:54.117 に答える