Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What are these types of VS2012 Command Prompt?

When having VS2012 installed, I see many Command Prompt types

  1. Developer Command Prompt for VS2012
  2. VS2012 ARM Cross Tool Command Prompt
  3. VS2012 x64 Cross Tool Command Prompt
  4. VS2012 x86 Native Tool Command Prompt
  5. VS2012 x64 Native Tool Command Prompt

What are they and in what case should I use one over another ?

I read this and many answers on SO, but they all seem ambiguous

like image 870
onmyway133 Avatar asked Jun 20 '13 08:06

onmyway133


2 Answers

The different command prompts are shortcuts which set up paths and the like so you can build from the command line just by invoking 'cl.exe' or 'link.exe' and other associated tools.

2-5 are self explanatory - if you run cl.exe blah.cpp then the version of cl [and associated tools]invoked will be different for each window:

2) compiler that generates arm code

3) 32 bit compiler that generates 64 bit code

4) 32 bit compiler that generates 32 bit code

5) 64 bit compiler that generates 64 bit code

If you don't compile from the command line just use number 1 and that will set up non platform specific tools - such as tf.exe. If you do compile from the command line, choose from 2-5 depending on what platform you're targeting [and in the case of 2 or 4 what bit'ness of Windows you're currently running].

like image 54
Mike Vine Avatar answered Sep 19 '22 02:09

Mike Vine


They matter when you build native code from the command line. Like code written in the C, C++, C++/CLI or C++/CX languages. Such projects are highly dependent on the target architecture since the code gets directly translated to machine code. The tooling for them needs to be selected properly, like the compiler, linker and libraries. And you use a build tool other than MSBuild.exe. Like makefiles or running the tools directly.

Some tools used in .NET projects are architecture dependent as well. Like Regasm.exe. Although you tend to run them directly with the full path instead of relying on the Start menu shortcut to set the PATH correctly. In case of doubt, type "where toolname.exe" and it will show you which toolname.exe is going to be used when you type its name on the command prompt without a full path.

like image 22
Hans Passant Avatar answered Sep 21 '22 02:09

Hans Passant