Wednesday, April 10, 2002

Compiling from command line with Microsoft Visual C







Visual C supports the possibility to compile 32 bits programs with no need to use the integrated development environment, simply from the comman line.

For that, first of all we need that a series of system environment variables be suitably defined. More concretely they are the variables %INCLUDE% and %LIB% that define the directories where the include and library files are, as well as it is also recommendable to add the directories where the executable file that we need to compile are to the path.

Luckily, during the initial installation of Visual C a BAT file called VCVARS32.bat would have been automatically created defining all these environment variables for us. This BAT file is located at the subdirectory BIN that hangs from the directory where you have installed Visaul C , that by default would be something similar to:

C:\Program Files\Microsoft Visual Studio\VC98\BIN 


Maybe this file is already being automatically executed whenever our operating system starts up, to know that we can just try this test: from the command line type:

set INCLUDE


if the system shows a series of paths separated by commas the file has already been executed. If a message telling that the environment variable has not yet been defined (is not defined) is shown you will have to execute the file ,b>VCVARS32.bat manually.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home