Setup Dev C++ and Settings

Setup Dev C++ and Settings:

In this article, I will show you, how to download Dev C++, how to set it up, and how to use it. This is an IDE (Integrated Development Environment) for writing C++ programs and most of the students use Dev C++. So, let us learn how to download and set up.

How to download Dev C++?

To download Dev C++, open Google Chrome search for download Dev C++ with MinGW as shown in the below image. Mingw is a compiler. So, when we download Dev C++, it’s an IDE and along with this IDE, the MinGW compiler will also get downloaded and installed on your machine.

How to download Dev C++?

Here, you need to click on the link that is from SourceForge.Net and once you click on that link, then it will navigate you to the page on the SourceForge website as shown below. Here, you need to click on the Download latest version button which will download the latest Dev C++ version.

Setup Dev C++ and Settings

Once you click on the Download Latest Version button, it will start downloading Dev C++ on your machine. Once the downloading is completed, install it. To install just double click on the Setup file and follow the below steps.

Select language as English.

Select the language as English

Then accept the License Agreement by clicking on the “I Agree” button as shown below.

accept the License Agreement by clicking on the "I Agree" button

Then click on the Next button from the choose component window as shown below.

Next button from the choose component window

Then select the location where you want to install the Dev C++. You can also go with the default location and click on the install button as shown in the below image.

location where you want to install the Dev C++

Once you click on the install button, then it will take some time to install Dev C++ on your machine. Once the installation is completed then simply click on the Finish button as shown in the below image.

Setup Dev C++ and Settings

Once you click on the Finish button, it will open the below window, and here, you select English (Optional) as the language.

Development Environment Setup for Dev C++ and Settings

Let see where Dev C+++ is installed:

In my machine it is installed on C:\Program Files (x86)\Dev-Cpp folder location as shown in the below image. Here, you can see along with Dev C++, it is also installed MinGW that is a GNU compiler for windows. This is a minimal compiler for windows.

Development Environment Setup of Dev C++

How to use Dev C++?

C++ is ready now. Before we start using it, we have to make some important settings, and these settings we have to do only once. So, let us see what setting we have to do. go to the menus and there you will find a menu called tools on the top and then select compiler options as shown in the below image.

How to use Dev C++?

Once you click on the Compiler Options, the following window will open, and here you will find few tabs like General. Settings, Directories, and Programs. First, select the General tab and there is few general and inside this tab type “-g” as shown in the below image. This will allow the compiler or the debugger to debug the program.

Dev C++ Compiler Settings

Then select the programs tab as shown in the below image. Here you will find the gcc compiler and by default, this compiler will be C++ 98 version. But we are going to use the latest C++ version i.e. C++ 11. So, we have to tell the GCC compiler to use C++ 11, and to do this we need to type -sdd=c++11. By doing the above changes now the Dev C++ IDE will be using C++ 11 Compiler. Finally, click on the OK button as shown below.

Dev C++ Compiler Settings

Note: In our course, we are going to use the features of C++ 11, If we have not done the above settings then the C++ 11 features will not work. So, this is a very important thing that we have to do in the settings.

How to create a new project using Dev C++ IDE?

Now, we are ready to do any project or write C++ programs. let us see how to create a new project using Dev C++ IDE. To create a new project in Dev C++, select the File => New => Project option from the context menu as shown in the below image.

How to create a new project using Dev C++ IDE?

Once you click on the File => New => Project option, it will open the New Project window, here you need to select the Console Application and also you need to provide the project Name and finally click on the OK button as shown below.

How to create a new project using Dev C++ IDE?

Once you click on the OK button, on the next screen it will ask you where you want to save the project. I am going with the default location i.e. Documents and simply click on the Save button as shown in the below image.

Dev C++ IDE

As soon as you click on the Save button the project will be created with main.cpp file as shown below.

Creating new project using Dev C++ IDE

Let us type a simple hello world message and then build and execute the project. So, modify the main.cpp code as follows.

int main(int argc, char** argv) {
 std::cout<<"Hello World!"<<std::endl;
 return 0;
}

Then let us build the project and execute. To do so, select the Execute menu and then click on the Compile & Run option as shown in the below image.

Compile & Run project using Dev C++ IDE

Once you click on the Compile and Run option, it will compiler and run the project and you should get the following output.

This is how we can install, setting, create, and run projects using Dev C++.

In the next article, I am going to discuss the Development Environment Setup using the CodeBlocks IDE. Here in this article, I try to explain the Development Environment Setup using CodeBlocks IDE. I hope you enjoy this article.

Leave a Reply

Your email address will not be published. Required fields are marked *