In this case, the easiest way to compile from the command line.
Launch a command prompt window and run the batch file to set environment variables ( %PATH% , etc.) accordingly. On my pc it is
"C:\Program Files\Microsoft Visual Studio 9.0\vc\vcvarsall.bat"
Then, to compile foo.cpp to foo.exe , just use
cl /EHsc foo.cpp
source share