Categories
Programming Tutorial

Windows Programming with Dev-C++

Dev-C++ is good IDE for programming in C++. Considering it supports MinGW and MSVC (Rarely used with MSVC). It has syntax highlighting, debugger, profiler, to do lists and many more. It is best for small and medium size project development.

Dev-C++ is a good IDE for programming in C++. It supports both MinGW and MSVC compilers and includes useful features like syntax highlighting, integrated debugger, profiler, and TO-DO lists. It's best suited for small to medium-sized project development and is particularly popular among beginners and students.

Basic Requirements

Microsoft Windows

This tutorial assumes you're running Windows XP or later. While newer versions of Windows are recommended, Dev-C++ works well on older systems.

MinGW

Download Direct Link (SourceForge)

MinGW is an open source development suite for Microsoft Windows. It stands for "Minimalist GNU for Windows" and is a Windows port of the famous GCC (GNU Compiler Collection) development suite. It supports multiple languages including C/C++, Objective-C, Java, Fortran77, and Ada.

Dev-C++ (4.9.9.2) /wxDev-C++ (6.10.2)

Download (4.9.9.2)
Download (6.10.2)
It comes WITH MinGW or Without MinGW. You can always download latest MinGW or even compile its source from older compiler. You have to download both Dev-C++ 4.9.9.2 and wxDev-C++ 6.10.2 as wxDev is just an Executable file which runs on the old 4.9.9.2 base.

Tutorial

All optional steps are recommended for a better development experience.

Step 1: Install Dev-C++

Install Dev-C++ 4.9.9.2 following the standard installation wizard. Choose the version that includes MinGW if you don't have it installed separately.

Step 2: Upgrade to wxDev-C++ (Optional)

If you want the enhanced wxDev-C++ interface:

  1. Extract wxDev-C++ 6.10.2 to your Dev-Cpp/bin directory
  2. Rename the existing devcpp.exe to olddevcpp.exe
  3. Rename the new wxDev-C++ executable to devcpp.exe

Step 3: Install MinGW (If Needed)

If you installed Dev-C++ without MinGW, download and install MinGW separately from the link above.

Step 4: Add to System PATH (Optional)

Add MinGW/bin or Dev-Cpp/bin to your system PATH environment variable. This allows you to use the compiler from the command line. See Microsoft's documentation for instructions on editing PATH.

Step 5: Create Your First Windows Project

Start Dev-C++ and click on File → New → Project.

windows programming a

Select the language C++ and choose Windows Application as the project type. Enter a name for your project.

windows programming b

Choose a directory where you want to save your project files.

windows programming c

Dev-C++ will generate a Windows application template with a main.cpp file. The template includes the basic structure for a Windows GUI application.

windows programming d

Step 6: Configure the GDI32 Library

Before compiling, you need to link the GDI32 library. Right-click on your project name in the Project Inspector and select Project Options.

windows programming e

In the Parameters tab, under the Linker section, add the following flag:

-lgdi32
windows programming f

Step 7: Compile and Run

Click Execute → Compile or press F9 to build your project.

windows programming g

If everything is configured correctly, you'll see a basic Windows application window appear. Congratulations! You've successfully created your first Windows GUI application with Dev-C++.

By Shishir Sharma

Shishir Sharma is a Software Engineering Leader, husband, and father based in Ottawa, Canada. A hacker and biker at heart, and has built a career as a visionary mentor and relentless problem solver.

With a leadership pedigree that includes LinkedIn, Shopify, and Zoom, Shishir excels at scaling high-impact teams and systems. He possesses a native-level mastery of JavaScript, Ruby, Python, PHP, and C/C++, moving seamlessly between modern web stacks and low-level architecture.

A dedicated member of the tech community, he serves as a moderator at LUG-Jaipur. When he’s not leading engineering teams or exploring new technologies, you’ll find him on the open road on his bike, catching an action movie, or immersed in high-stakes FPS games.

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.