Wednesday, April 10, 2002

Compiling from command line with Microsoft Visual C

In summary, if you want to compile a unique C source code file into an executable like for example test.cpp and you have already executed VCVARS32.BAT it would be enough to write at the command line:

CL test.cpp


that would generate the file test.exe.

...trying again to explain simply.... CL is actually a file called CL.EXE that comes with Visual Studio.... all you are trying to do with the VCVAR32.BAT file (it also comes with the VCStudio and is in BIN folder) is to set the computer's environmental variables so you can execute that CL.EXE compiler program from the root (e.g. C:\).... all this does is saves you from having to type in the whole path everytime you want to run the compiler (ala C:\Program Files\Microsoft Visual Studio\VC98..blah blah whatever...).... get it?



0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home