Professional Documents
Culture Documents
Lab. Session
Summary
o About Dev-C++
o How to install Dev-C++ from URL
o How to install Dev-C++ from the CD
o How to access Dev-C++ from the startup menu
o How to access Dev-C++ from the icon on the desktop
o First look at Dev-C++
o Configure Dev-C++
o Our First ‘C’ program
• Write the code
• Save
• Compile
• Execute
About Dev-C++4.9.7
Installation:
Note: if the older version of DEV C++ 4.0 is already installed on your machine , then
before installing this version uninstall it from the Add/Remove programs and delete the
folder from the directory.
http://vulms.vu.edu.pk/courses/cs301/supporting_software/supporting_software.zip
Paste the above URL in your browser, a window will appearing asking for saving the file
on your disk OR open from current location.
Save the file and then unzip using Winzip application or you can directly open the file
from current position. If you have installed winzip on your PC then it will ask for
unzipping the file you press the button “I Agree”. Then run the devcpp4970-gcc295.exe
from the folder where you unzip the file. Remaining steps are same from step 3 of
installation from CD.
How to install Dev-C++ from the CD
3. On the ‘Software License Agreement” Dialog box Press the button labeled yes
4. The following dialog box appear
On this dialog box select option from drop down list ‘Typical’
And press button labeled ‘Next’
6. The following dialog box will appear
Setup will copy the files on the disk in folder named c:\Dev-Cpp and Dev-
C++ icon in the startup menu.. And then following dialog box appears
At this stage Dev C++ will extract all the files required for installation.
To Access Dev-C++
1. Go to the start button (located at the bottom-left corner of the window)
2. Select the option ‘programs
3. Select the sub-option ‘Bloodshed Dev-C++’
4. Take the mouse over to the program name ‘Dev C++’ and click
Thus your path to reach Dev-C++ would be as follows
Start->programs->Bloodshed Dev-C++->Dev-C++
You can also make an icon of Dev-C++ 4.9.7 on your desk top.
Configure Dev-C++
Before we start to write our first program let us configure it. i.e. tell the compiler where
we plan to put header files.
• Go to the "Tools" menu and select "Compiler Options".
• In the "Directories" tab, sub menu contains a tab ‘C++ includes’ enter the
location(s) of where you plan to save your files. To add a path of location
containing your files press the button labeled’…’. After that a window will appear
on your screen browse the path and then press ok , in the end press the button
‘Add’ to save the path.
• In the "Settings" tab, "Linker" link is given on left side of window click on it.
You’ll see four options on right side of the window one of them will be
"Generate debugging information" by default it is set to No, click on No you’ll
see drop down list select Yes .
This will allow you to use the debugger with your programs.
#include <iostream.h>
main()
{
cout << "Welcome to Virtual University";
}
Save
o Go to the File drop down menu
o Select option “Save as” and press enter
o Windows dialog box appear. Within this dialog box select the directory where
you want to save the file and then enter the name of your file e.g. my_first_prg and press
the save button
Compile
o Go to the "Execute" drop down menu and select "Compile"
Execute
To execute the program:
o Make an icon of ‘command prompt’ on the desktop
Open the property window of the ‘command prompt icon
In the ‘start in’ input field select the path of the directory where you saved your
file
Press ‘OK’ button
o On the command prompt write the name of the executable file e.g. my_first_prg