Command - Line Compilation
Most of the compilers support the command line compilation of a program. All the needed arguments are passed to the compiler from the command line. For the purpose of discussion, let consider the Borland C++ compiler. (However this procedure is implementation dependent.)
The command - line compiler is invoked through issuing the command:
tcc filename.cpp (in the case of Turbo C++)
bcc filename.cpp (in the case of Borland C++)
at the DOS prompt. It makes an object file filename.obj, and an executable file by the explicit issue of the linking command:
tlink filename1.obj filename2.obj <library name>
The library file could also be passed as a parameter to the linker for binding functions defined in it. To build the executable of hello.cpp, will issue the command at the MS-DOS prompt bcc hello.cpp.