2. Setup CodeBlocks and Settings
Category
ЁЯУЪ
LearningTranscript
00:00for practicing C++ program or developing applications in C++ you need some IDE
00:06where you can type the program and compile the programs and also you need a
00:10compiler so for a IDE we choose IDE that is code blocks so let us see how to
00:17download code blocks open Chrome and say download code blocks so code blocks dot
00:27o-r-g this is the URL so if you want you know that URL that so if you want you
00:33can directly go to this URL that is code blocks dot o-r-g slash downloads here in
00:38downloads three options are there that is download binary release or source
00:42code and retrieve source code from subversion that is SVN we'll go to
00:47binary release and here we have multiple options that is only setup file or no
00:55setup just a zip or min GW setup or min GW no setup so you have to select min GW
01:06setup this will download compiler as well as IDE so select this one go to the
01:12website that is SourceForge for downloading it will start downloading
01:17the setup file it's downloaded so let us start setup file here it starts
01:25installation of code blocks say next and agree on and click I agree next then
01:40here is a place where the code blocks will be installed if you want to change
01:44the directory you can change and we'll start installation so it will extract
01:48all the files of IDE and the compiler so do you want to run code blocks now so I
02:00will say no and let us finish this one so next and it is finished it is
02:04installed now let us open the code blocks yes now the code blocks IDE is
02:14open now before we start using it before we start writing the programs we have to
02:19make some settings here and these are one time settings so let us see what are
02:26the settings we have to do go to menu in the menu at the end you will find
02:30settings option select that one and go to compiler now this tab is open see
02:39here right now if you see the language selected here is C++ 98 so there's a
02:46older version so we should select a later version so that we can use all the
02:51features that we'll be talking about in this course so that is C++ 11 select
02:57C++ 11 this is one setting you have to change otherwise some of the features
03:03that I'll be showing you will not work so you have to select C++ 11 then in
03:10toolchain executables there's a tab above here and this was the compiler
03:15settings right after selecting this go to the next tab here that is toolchain
03:21executables here insert the resource compiler we have to select a compiler so
03:30click on this one then here if you scroll down you will find GDB 32 so
03:37select this compiler that is for debugger open it and say okay now what
03:45is debugging will be looking at it in the next videos now I have to make one
03:50more settings here so go to settings again now this time select debugger so
03:55we have to enable debugger then only we will be able to debug the program so
03:59debugger allow us to trace the program line by line more oftenly I'll be
04:03tracing the programs so same way if you would like to do that in your IDE you
04:08can do it here so select default okay once again I will come back so go to
04:15settings and select debugger and here select default and here you have to
04:21select the executable path so here click and again select the same file GDB 32
04:31GDB 32 select this file open that's it say okay now you are ready with the
04:41environment now we can use code blocks for writing C++ programs that are shown
04:46in this course now I will show you how to create a new project and whatever the
04:51steps I am showing you always follow those same steps for creating a new
04:55project so for every program it's better you create a new project so let us see
05:00how to create a new project so I can go to files and say new project I can start
05:07a new project and the project type that you have to select is console
05:12application and the language that you have to select a C++ and the project
05:18name my first finish now here the project is created and the in the
05:28sources this is a C++ file double click on it and this is the source code file
05:34so here is already some code is written so you can type your own code in this
05:39place and you can write all your programs here see already IO stream
05:44header file is included and the namespace is also included here so using
05:49namespace this hello world is displayed now you can write all your programs here
05:54that is using this main function and you can write your own functions or classes
05:58that will be learning slowly so let us see how to run so first you have to
06:03build this one so compile say build this project build and run the program
06:07so it displays hello world so that's it so this is how you can download and use
06:13this IDE