How can I compile a C / C ++ file in Windows 8 using VS2012 from the console?
For example, such:
// main.cpp #include <iostream> using namespace std; int main() { cout << "Hello" << endl; }
There is no desire to put MinGW or Cygwin, because the compiler is already there (it’s in Visual Studio).
UPD:
First, in the console from the folder C: \ Program Files (x86) \ Microsoft Visual Studio 11.0 \ VC \ bin run the file vcvars32.bat
Then use:
cl main.cpp
All sorts of keys for the compiler: Compiler Options Listed by Category