Hi this is anil and welcome to your second video tutorial on c++ programming.
So in this tutorial we are gonna see some basic terms and the software's used in the
development of c++, the compilers, archivers, linkers, toolsets,
ide's and also we are gonna see how c++ works or you know what is the process to get an
executable or an exe file from an c++ source file.
ok lets begin. So first we are gonna see you know what is
a toolset. So the computer can only understand the machine
language code which is the combination of 0's and 1's.
All of you know that you know,computer can only execute the code written in o's and 1's.
The three basic tools used to build c++ applications are the compilers, the linkers and the archivers.
So we are gonna use these three tools and we are gonna convert our c++ source file to
an executable one, which we can execute.
A collection of these programs and possibly other tools is called toolset.
Or we can say that the combination of the compilers, the linkers, and archivers together
called as toolsets.
So now we are gonna see the compilers, archivers and the linkers in detail.
The compiler takes c++ source files as input and produces object files, which contain a
mixture of machine executable code you know the zeroes and one's the code in zeroes and
one's, and also some symbolc references to functions and data.
So in our program we are gonna use some functions and we are gonna refer the library functions
you know which are provided by the c++, and also we are gonna refer some data in some
other files. So the object file created by this compiler
is gonna contain the code of our program, you know in 0's and 1's and also some references
to this functions and data.
Then the archiver which takes a collection of object files you know which is generated
by the compiler, as the input and it produces a static library or a archive which is simply
a collection of object files grouped for convenient use.
And next the linker.
The linker takes a collection of object files and libraries and it resolves their symbolic
references to produce either an executable or a dynamic library.
So once we have this object files, we pass that object file to the linker.
The linker is gonna take the group of object files that we have passed, and its gonna link
them. you know whatever the symbolic references to the functions or the data we have made
you know all that references will be resolved and an executable file or a dynamic library
file you know dll file will be generated.
So now we are gonna see what is an executable and a dynamic library.
An excutable or a application is simply any program that can be executed by the operating
system. For example we have the notepad, and the wordpad,
and any other application which we execute in our computer.
you know the operating system can easily execute.
A dynamic library is also called a shared library, is like an executable except that
it can't be run on its own. An application file can make use of this dynamic
library files. On windows operating system, these dynamic
library files are also called dll files are also called as dll files or dynamic link libraries.
Ok now we know about the compilers, the linkers, the archivers, the toolsets you know how c++
works? or what is the procedure to get an application
or a executable from the c++ source file. So first we have the c++ source code, and
then we are gonna compile that source code using the compiler, and this process is called
compilation and we will get the machine code version.
This machine code version is gonna contain some symbolic references to some other functions,
data or some references to the library functions provided by the c++.
So next what we are gonna do is we are gonna link this object file or the machine code
version with c++ library using the linker and the process is called linking.
Here that references are resolved and we will get the complete machine executable program.
So this complete machine executable program is an application which can be executed by
the operating system.
OK now we know how c++ works or the procedure to get the application or the executable from
a c++ source file, you know what are the available toolsets and command line tools that we can
use to do that. So the command line tools for various toolsets
are, if you are gonna select gcc toolset then,
you will get the g++ compiler, g++ linker and also arr or ranlib archiver.
Similarly for visual c++ toolset we have their specific compiler, linker and archiver.
and similarly for you know intel, for windows linux, metroworks comeau and all this different
toolsets contains different compilers, linkers and archivers.
OK now what is an ide and why to use an ide? Ok the compiler, linker and archiver are command
line tools. you know we use to pass the input files, you
know name of the input file and output file together with some necessary configuration
information to the compilers, linkers and archivers as text in the command prompt and
we will get the specific output from that specific programs.
So invoking these tools by hand is tedious again and again.
For example when you develop a program, you know you want to check that program again
and again you know to make sure that program is working properly while developing.
So at that time invoking these tools by command prompt you know its tedious you know cant
write all these things again and again. its time consuming.
So to solve that we are gonna use the ides. An ide provides a graphical interface for
organizing a collection of source files and describing the binary files that should be
nerated from them.
So we just need to click some buttons in the ide you know in the graphical user interface,
and then the specific compilers, linkers, archivers and all those things are called
automatically and we will get the application. Ok some available ide's for c++ are the visual
c++, the code warrior, c++ builder, dev c++, code blocks and many other are available.
So we are gonna use code blocks ide in our upcoming videos because you know code blocks
is available for all the platforms you know windows mac linux, and also its very simple
to set up.
Ok this is guys. this is about some information on compilers, linkers archivers and toolsets,
ide's and also how a c++ program works. So thank you for watching. don't forget to
subscribe, like my facebook page at facebook.com/LearningLad and i will see you in the next tutorial.