cpp compiling and linking

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.

  • C++ Dynamic Initialization of Objects
  • C++ Copy Constructor
  • C++ Dynamic Constructor
  • C++ Destructors
  • C++ Exercise
  • C++ Operator Overloading
  • C++ Overloading Unary Operators
  • Const pointer in C
  • Void pointer in c
  • C++ Overloading Binary Operators
  • C++ Overloading Binary Operators Using Friends
  • C++ Manipulation String Using Operators
  • C++ Rules for overloading operators
  • C++ Exercise
  • C++ Basic To class Type
  • C++ Class TO Basic Type
  • C++ One class To another class type
  • C++ Exercise
  • C++ Inheritance introduction
  • C++ Single Inheritance
  • C++ Multiple Inheritance
  • C++ Ambiguity Resolution in inheritance
  • C++ Hierarchical Inheritance
  • C++ Hybrid Inheritance
  • C++ Virtual Base Classes
  • C++ Exercise
  • C++ abstract class
  • C++ nesting of classes
  • C++ Exercise
  • C++ polymorphism
  • C++ Exercise
  • C++ pointers
  • C++ Pointers TO object
  • C++ this pointer
  • C++ Pointer to Derived class
  • C++ Virtual functions
  • C++ Exercise
  • C++ streams
  • C++ unformatted I/O operations
  • C++ Put() and get()
  • C++ getline() and write()
  • C++ Formatted console I/O
  • C++ Manipulators
  • C++ Exercise
  • C++ file handling
  • C++ file stream classes
  • C++ Open and closing file
  • C++ open using constructor
  • C++ open using open()
  • C++ Detecting End of file
  • C++ File modes
  • C++ File pointers and Manipulators
  • C++ Sequential I/O
  • C++ Reading and Writing
  • C++ Updating a File
  • C++ Error handling In File
  • C++ Command Line Arguments
  • C++ Exercise
  • C++ Template introduction
  • C++ Class Templates with multiple Parameters
  • C++ Function templates
  • C++ Function templates with multiple parameters
  • C++ member function Template
  • C++ Exercise
  • C++ Exception handling
  • C++ Basics of Exception Handling
  • C++ Exception Handling Mechanism
  • C++ Throwing Mechanism
  • C++ Catch Mechanism
  • C++ Catch all Exceptions
  • C++ Re-Throwing An Exception
  • C++ Specifying Exceptions
  • C++ Exercise