If you’re planning to learn C Programming or C++, then Code::Blocks is one of the best IDEs you can use. It’s a free, open-source, cross-platform Integrated Development Environment (IDE) specifically designed for C, C++, and Fortran development.
Code::Blocks supports multiple compilers — including GCC and G++ — and allows you to install various plugins to extend its functionality.
In this guide, we’ll walk you through the complete process of downloading, installing, and setting up Code::Blocks IDE on Windows 11, along with creating your first C program. Let’s dive right in.
How to Download Code::Blocks IDE for Windows 11
You can download the latest version of Code::Blocks directly from the official website. Here’s how:
- Open your preferred web browser and go to the official site — codeblocks.org.
- Click on Download in the top menu.
- On the download page, you’ll see three options —
- Download the binary release
- Download the source code
- Retrieve source code from SVN
- Select Download the binary release.
- Next, choose Windows as your operating system and click the link to download
codeblocks-20.03mingw-setup.exe from SourceForge.net.
Tip: Always select the version that includes MinGW — this ensures that GCC and G++ compilers are automatically installed with Code::Blocks.
How to Install Code::Blocks IDE on Windows 11
Once the installer is downloaded, follow these steps to install Code::Blocks on your Windows system:
- Double-click the downloaded file and allow Windows to make changes if prompted.
- In the Setup Wizard, click Next to begin the installation.
- Read and accept the License Agreement, then click I Agree.
- Choose the components you want to install.
- Recommendation: Keep all default components and plugins selected.
- Select your installation location (or leave it as default), then click Install.
- Wait for the installation to complete, then click Next → Finish.
You’ve now successfully installed Code::Blocks IDE on Windows 11!
How to Create Your First C Program in Code::Blocks IDE
Before you start coding, you’ll need to ensure that the GNU GCC Compiler is properly set as the default compiler. Code::Blocks will usually detect it automatically the first time you launch the IDE.
Here’s how to create and run your first C program:
- Open Code::Blocks IDE. When prompted, select GNU GCC Compiler and click Set as Default.
- Go to File → New → Project.
- Choose Console Application, then click Go.
- Select your programming language — choose C — and click Next.
- Enter a project title, filename, and choose a folder where you want to save your project.
- Click Next, then select GNU GCC Compiler from the dropdown list. Leave other settings as default and click Finish.
- You’ll now see the main.c file in the project manager — this is where you can start writing your C code.
- To compile and run your program, go to Build → Build and Run, or simply press F9 on your keyboard.
Your program will now compile and execute in the built-in console window.
Conclusion
That’s it! You’ve successfully installed Code::Blocks on Windows 11 and created your first C program.
Code::Blocks is one of the easiest IDEs to get started with if you’re learning C or C++, and its built-in compiler support makes coding much smoother for beginners.
If you’re new to programming, we recommend checking out beginner-friendly C Programming Tutorials to strengthen your understanding.