Monday, November 05, 2007

Compiling C++ on MS VS without IDE

Although many people ignore this functionality, it is possible to use the Microsoft Visual Studio .NET without opening the IDE. Indeed, many tasks can be made from the command line, thus providing a way to improve the scripting capabilities of this tool. For instance, to compile a project from the command line, only two steps are necessary:

  1. Set the environment variables (eventually they can be already set)

    Run "VCvars32.bat" (in .NET2003)

  2. Compile the project

    Call $ DevEnv project_name /Build configuration_name
With these functionalities, some scripting skills and using the task scheduler, complex tasks can be easily automated.

No comments: