COMPILE AND LINKING
The process of implementation of C++ program under UNIX is similar to that of a C program.
We should use “CC”(The Uppercase) command to compile the program. Remember we use lowercase “cc” for copiling C programs. The command
CC example.C
At the UNIX command prompt would compile The C++ language program source code contained in the file example.C The compiler would provide(produce) an object file example.o and then automatically linking with the library functions to produce an executable file. The default executable filename is a.out
The statement compiler only the file file1.c and link it with the previous compiled file2.0 file . This is very useful when only one of the files needs to be modified. The files that are not modified (change)need not be compiled again
Turbo C++ and Borland C++
Turbo C++ and Borland C++ provides an integrated program development environment
under MSDOS. They provide a built in editor and the menu bar which includes options such as File,Compile, Edit and run.
Description
C++ programs always written in human readable source code that is not understand by computer or not directly executable by a computer. It takes a three step process to convert source code into executable code.
These three steps are:
1. Preprocessing
2. compiling
3. linking.
Preprocessing – The Processes directives (commands that begin with a hash (#character))
which can modify the source code before it is compiled.The C Preprocessor directive is not a part of the compiler,
but for the compilation process it is separate step.
Compiling – The modified source code is compiled and converted into binary object code.
But this code is not yet executable.
Linking – After compiling, the object code is combined with required supported code to make an executable program.
and linking Refers to the creation of a one executable file using multiple object files,This step involves add any libraries that are required for the program.