Search
|
BloodShed
Dev C++
This is my favorite compiler. It is fast, has an IDE,
a great custom made Mingw compiler, a debugger and best of all , its
free!
Index:
-
-
-
-
- Screen Shots
- Complete Win32 IDE.
- Fast integrated MinGW compiler.
- Command line debugger, separate Win32 debugger available for free
download.
- Project manager.
- Compiles Win32 programs.
Return to top
Review:
Let me start by saying that I cant believe that this application is free.
This is all I use even though I got Visual C++ installed on my computer.
It is fast and produces the smallest file sizes from any of the compilers
I have used.
First, the positives. The IDE is well laid out and resembles VC++ to
a large extent. The project bar on the left gives you one click access
to all of the files in your project. When you open a project all the files
are opened by default so you can get straight to work. Unlike Visual C++,
it allows you to work just as easily with files that don't belong to any
particular project. It comes with all the tools required including a resource
editor which has wizards for creating dialog boxes, menus, adding icons
and so on. It also comes with a command line debugger as part of the download
although I recommend you download the custom made Win32 debugger separately.
On the negative side, this application cannot match VC++ when it comes
to large projects spread over many people. Nor does it have the ready
made tools for making database driven applications. Having said that this
compiler is not aimed at large corporations. It is meant for stand alone
developers looking for a cost effective and easy way to develop C++ programs.
Return to top
Setup:
The Various Options:
- Fire up Dev C++ and go to Options> Compiler Options.
- Check mark the box "Add the directory below to be searched for
include files" and in the accompanying text box enter the location
of the directory where you will be saving your include files. Do not
use directories with spaces and separate multiple entries with semi
colons.
- Click the linker tab and select "Generate Debugging information".
This will ensure that you will be able to debug your programs. Make
sure that you uncheck this tab when you are compiler the final release
version of your project.
- There are other options that you can set for the compiler. The "Code
generation / Optimization" tab has some optimizing features. However
I would not recommend enabling them unless you are sure that they will
not limit the functionality of your program. I find they do not make
much of a difference to my programs and so I turn these off.
- Read the help file located at "X:\Your Dev C++ installation\Help\DevCpp.hlp"
file for detailed explanations on all the options available.
Creating a project:
- Click on File>New Project. Here you will be asked what type of
project your are looking to build. Select the appropriate option.
- You will then be asked for a project name. Enter a name of choice.
Remember that the project name will be the name of the final exe.
- Choose the location where the project will be saved. I recommend creating
separate directories for your projects, especially for the large ones.
- I recommend that you make projects for all programs that you write.
This not only gets things organized but also sets the compiler settings
for the particular project. Now you can start adding files to your projects.
Create/add source file(s).
- You should now have a project with one empty and untitled source file.
This would be sufficient if we were writing simple programs that relied
exclusively on the standard library and/or pre-compiled object code,
but we're not.
-
You can create additional empty source files one of two ways,
Go to the "File" menu and select "New Source File"
(or just press CTRL+U) OR Go to the "Project" menu
and select "New Unit in Project" (or just press CTRL+F1).
Note that Dev-C++ will not ask for a filename for any source file
until you attempt to:
1) Compile
2) Save the project
3) Save the source file
4) Exit Dev-C++
-
You can add pre-existing source files one of two ways,
Go to the "Project" menu and select "Add to project..."
(or just press CTRL+F2) OR Right-click on the project name
in the left-hand panel and select "Add to project..." (or
just press CTRL+F2).
Compile and Execute:
Once you have entered all of your source code, you are ready to compile.Go
to the "Execute" menu and select "Compile" (or just
press CTRL+F9). Any errors will be reported in full detail at the bottom
of the window. Double click an error message to jump straight to the offending
line.
Once your project successfully compiles, you will get a dialog box with
several options:
- "Continue", which will just take you back to Dev-C++.
- "Parameters", which will allow you to pass command-line
parameters to your program.
- "Execute", which will execute your program.
Debug:
When things aren't happening the way you planned, a source-level debugger
can be a great tool in determining what really is going on. From this
point forward, I will assume that you have downloaded and installed the
Insight debugger
- Go to the "Execute" menu and select "Debug" (or
just press F8).
After a console window pops up and disappears, the debugger Source Window
should appear. If the Source Window is blank, it is likely that you
compiled your project without the necessary debugging information (see
above).
- Passing command-line arguments:
Go to the "File" menu of the Source Window and select "Target
Settings..."; select "Exec" from the "Target"
drop-down list and enter any command-line arguments (separated by spaces)
in the "Arguments:" field. If using filenames as arguments,
be sure to include the full file path.
- Using the debugger:
The various features of the debugger are pretty obvious. Click the "Run"
icon to start your program; "Step" to step through every command;
"Next" to execute the next block of code. You can view memory/variables/expressions
using the various tools such as Registers, Memory, Watch Expressions
and Local Variables
Note that Insight was not originally designed to work with Dev-C++ and
may be a bit flaky under certain situations. If you are having too much
trouble with Insight and want to go back to the original version you will
have to re-install Dev C++. For more information about using GDB, start
Dev-C++ and go to "Help", "GNU Debugger help".
Return to top
Important
Links:
Download links: Click the links to directly download the files
Other Links: Some useful related websites
Return to top
Screen
Shots:
Here are some screen shots of Dev C++ 4.0 with the Gnome Icons.
 |
This is how a typical project window will look in Dev
C++. |
 |
The Insight Debugger. |
 |
This is the resource editor that comes with Dev C++ |
Return to top
<<Back to Compiler's main page.
|
Have a C++ question? Share it at our forums
Add your C++ Source Codes

|