How to Install Code::Blocks on Windows 11 With the GCC Compiler

//

Michael Collins

To install Code::Blocks on Windows 11, download codeblocks-25.03mingw-setup.exe from the official Code::Blocks download page, run it, keep the default components, and click Install. That file includes the GCC compiler, so after Code::Blocks opens you can create a console project and press F9 to build and run your first program.

This covers Code::Blocks 25.03 (released March 31, 2025, and still the current release in October 2026) on Windows 11 Home and Pro, including Arm laptops. The same steps apply to the older 20.03 release, apart from the file names.

Pick the right download first

Most installation problems start with the wrong file. Code::Blocks is an IDE (integrated development environment): the editor, project manager and debugger window you work in. It is not a compiler. The compiler is a separate program (GCC, from a package called MinGW) that turns your C or C++ code into a .exe file. Some Code::Blocks downloads include that compiler and some do not.

The Code::Blocks binary releases page lists these Windows files for 25.03:

File What it contains Who it suits
codeblocks-25.03mingw-setup.exe Code::Blocks plus GCC, G++, GFortran, Clang and the GDB debugger (WinLibs toolchain, version 14.2.0) Almost everyone, and all beginners
codeblocks-25.03-setup.exe Code::Blocks with all plugins, no compiler People who already have a compiler installed
codeblocks-25.03-setup-nonadmin.exe Code::Blocks for accounts without administrator rights, no compiler School or work PCs where you cannot approve installs
codeblocks-25.03mingw-nosetup.zip Code::Blocks plus the compiler as a ZIP, no installer Portable use, or no administrator rights

The page itself says that if you are unsure, use the mingw setup file. The default builds have been 64-bit since release 20.03, which is what every Windows 11 PC needs. The 32-bit files further down the page exist for older systems and are not needed on Windows 11.

Illustration comparing three Code::Blocks 25.03 Windows downloads: the mingw setup file with the GCC compiler, the plain setup file without a compiler, and the mingw ZIP for PCs without administrator rights
Illustration: which Code::Blocks 25.03 file to download on Windows 11.

The download page still lists Windows versions only up to Windows 10 (which reached end of support on October 14, 2025) and has not been updated to name Windows 11. Windows 11 runs the same 64-bit Windows programs, and the steps below use that standard build.

Install Code::Blocks with the bundled compiler

You need an administrator account for the standard installer, because it writes to the Program Files folder. If you cannot approve the administrator prompt, skip to the section on PCs without administrator rights.

  1. Open the Code::Blocks binary releases page in your browser and find the Windows section.
  2. On the codeblocks-25.03mingw-setup.exe row, click one of the two download mirrors listed (dAppCDN or Sourceforge.net). The mirror page starts the download after a few seconds, and the file lands in your Downloads folder.
  3. Open Downloads in File Explorer and double-click codeblocks-25.03mingw-setup.exe. When Windows asks “Do you want to allow this app to make changes to your device?”, select Yes.
  4. On the welcome screen, click Next, then click I Agree on the license page.
  5. On the Choose Components page, leave the preselected default install as it is and click Next. The default keeps the compiler and the common plugins.
  6. On the Choose Install Location page, keep C:\Program Files\CodeBlocks unless you have a reason to change it, then click Install. The installer copies Code::Blocks and the MinGW folder that holds the compiler.
  7. When the progress bar finishes, the installer may ask whether to run Code::Blocks now. Choose either answer, then click Next and Finish to close the wizard.
Example Code Blocks IDE workspace after setup (illustration)
Illustration: Example Code Blocks IDE workspace after setup.

If nothing happens at step 3, or a blue “Windows protected your PC” box appears, Windows is checking the file’s reputation. Microsoft explains in its guide to SmartScreen reputation for apps that unrecognized downloads can trigger this warning and that you should continue only after confirming the source. If you downloaded the file from the official page above, the safe way through is to allow just that one file with More info and Run anyway rather than turning SmartScreen off. A message that you can only install apps from the Microsoft Store has a different cause: the PC is set to Store-only apps or is in S mode, and you can check which setting blocks third-party apps on Windows 11 and how to change it.

Open Code::Blocks for the first time

Open Code::Blocks from the Start menu (type codeblocks in Search if you do not see it). On the first launch it scans the PC for compilers and shows a list of every compiler it supports, with a status next to each one.

  1. Find GNU GCC Compiler in the list. Its status should say it was detected.
  2. Select it, click Set as default, then click OK.
  3. A second window asks whether Code::Blocks should become the default app for C and C++ source files. Either choice is fine; picking yes means double-clicking a .c or .cpp file opens it in Code::Blocks.
Example Code Blocks start page after first launch (illustration)
Illustration: Example Code Blocks start page after first launch.

If GNU GCC Compiler is not marked as detected, you most likely installed a file without the compiler, or the automatic scan missed the bundled folder (users on the Code::Blocks forums have reported this with 25.03). The next section fixes both cases.

Point Code::Blocks at the compiler if it was not found

The error most beginners meet is a build log message saying Code::Blocks “can’t find compiler executable in your configured search path” for GNU GCC Compiler. It means the compiler path in the settings is empty or wrong. Here is how to set it:

  1. In Code::Blocks, open the Settings menu and choose Compiler….
  2. Make sure Global compiler settings is selected on the left and that Selected compiler at the top shows GNU GCC Compiler.
  3. Click the Toolchain executables tab.
  4. Click Auto-detect. If Code::Blocks finds the compiler, the Compiler’s installation directory box fills in.
  5. If the box stays empty or shows the wrong folder, click the … button next to it and choose C:\Program Files\CodeBlocks\MinGW. Pick the MinGW folder itself, not the bin folder inside it. The Code::Blocks guide to installing a supported compiler is explicit that the installation directory is wanted, not the bin subfolder.
  6. Check the Program Files list below: the C compiler should read gcc.exe, the C++ compiler g++.exe, and the make program mingw32-make.exe.
  7. Click Set as default, then OK.
Code Blocks Toolchain executables with an example MinGW folder (illustration)
Illustration: Code Blocks Toolchain executables with an example MinGW folder.

If C:\Program Files\CodeBlocks\MinGW does not exist, the file you installed had no compiler. Uninstall Code::Blocks, download the mingw setup file and install again. If you upgraded from an older version and the error appeared afterward, the old settings may still point at the previous compiler folder; the Reset defaults button on the same Compiler settings window clears them before you run Auto-detect again.

Build and run your first program

A test project proves that the editor, compiler and console all work together. It takes about two minutes.

  1. Click File > New > Project….
  2. Select Console application and click Go, then click Next on the welcome page of the wizard.
  3. Choose C++ (or C if your course uses C) and click Next.
  4. Type a project title such as HelloTest and choose a folder to save it in. Code::Blocks fills in the remaining file name boxes from those two. Click Next.
  5. On the compiler page, confirm GNU GCC Compiler is selected, leave the Debug and Release configurations ticked, and click Finish.
  6. In the Management pane on the left, open the Projects tab, expand Sources and double-click main.cpp (or main.c). The template already contains a short program that prints “Hello world!”.
  7. Press F9, or click Build > Build and run.
Sample Hello world console result from a fictional Code Blocks project (illustration)
Illustration: Sample Hello world console result from a fictional Code Blocks project.

A console window opens showing Hello world!, and Code::Blocks keeps it open until you press a key. The Build log tab at the bottom should end with a line saying the process terminated with status 0. If you see that, Code::Blocks and GCC are installed correctly.

Useful shortcuts while you practice: Ctrl + F9 builds without running, Ctrl + F10 runs the last build, and F9 does both. The drop-down on the compiler toolbar switches between the Debug target (for stepping through code with the debugger) and Release (for the final .exe).

Once your programs grow, a crash may happen when you run the .exe outside Code::Blocks. Windows can offer to attach a debugger at that moment if you turn on JIT debugging in Windows 11, which gives you the call stack instead of a silent close.

Use GCC from Command Prompt or PowerShell (optional)

Code::Blocks does not need the compiler on the Windows PATH, so skip this unless a course asks you to type gcc or g++ in a terminal.

  1. Click Start, type environment variables, and open Edit environment variables for your account.
  2. Under User variables, select Path and click Edit.
  3. Click New, type C:\Program Files\CodeBlocks\MinGW\bin, and click OK in each window.
  4. Open a new Terminal window and type g++ --version. A version line confirms the terminal can find the compiler.
Sample terminal output for g plus plus version (illustration)
Illustration: Sample terminal output for g plus plus version.

This time you do point at the bin folder, because that is where gcc.exe and g++.exe live. Because the path contains a space, wrap it in quotation marks if you ever type it as part of a command.

PCs without administrator rights and Arm laptops

On a school or work PC where you cannot approve the administrator prompt, download codeblocks-25.03mingw-nosetup.zip instead. Right-click it, choose Extract All, and extract it to a folder inside your user profile, such as Documents. Open codeblocks.exe from that folder. The ZIP version does not create Start menu shortcuts and does not let you choose plugins, so pin it to the taskbar yourself if you use it often. If Code::Blocks reports that it cannot find the compiler, set the Compiler’s installation directory to the MinGW folder inside your extracted folder, as in the section above. The separate setup-nonadmin installer has no compiler, so it only helps if you already have one.

On a Windows 11 laptop with an Arm processor (for example, a Snapdragon X model), there is no Arm build of Code::Blocks. Microsoft documents that Windows 11 on Arm runs x64 apps through emulation, using the Prism emulator in version 24H2 and later, so the normal 64-bit mingw setup file installs and runs. The programs GCC builds are x64 programs too, and they run through the same emulation.

Fix common problems after installation

What you see Likely cause Fix
“can’t find compiler executable in your configured search path” No compiler installed, or the path is wrong Use Auto-detect or set the MinGW folder on the Toolchain executables tab (see above)
Build and run does nothing, or the file builds without being part of a project The file is not saved with a .c or .cpp extension, or it is not in a project Save it as main.c or main.cpp, or create a Console application project and add the file
“Permission denied” when building The previous run of the program is still open Close the old console window, or end the program in Task Manager, then build again
The console window appears blank or the .exe disappears Antivirus software is blocking or removing the new program Add your own project folder as an exclusion (below)
Errors mention a different compiler, such as Microsoft’s The project is set to another compiler Open Project > Build options… and select GNU GCC Compiler

The Code::Blocks compiling errors FAQ lists further causes of “Permission denied”, including folders you cannot write to. Saving projects in your Documents folder instead of Program Files avoids that one.

Antivirus programs sometimes flag brand new .exe files that only exist on your PC. If that keeps happening, open Windows Security > Virus & threat protection, click Manage settings, then under Exclusions select Add or remove exclusions > Add an exclusion > Folder, and pick only the folder that holds your Code::Blocks projects. Microsoft’s page on adding an exclusion to Windows Security warns to do this only for files you are confident are safe, so never exclude your whole Downloads folder.

When a build fails and the message is unclear, the full command line helps. Open Settings > Compiler…, go to the Build options tab, and tick Always output the full command line. The Build log tab then shows exactly what Code::Blocks asked GCC to do.

Update or remove Code::Blocks

New releases appear on the same Code::Blocks download page, often years apart (20.03 came out in 2020, 25.03 in 2025). To update, uninstall the old version, install the new mingw setup file, then open Settings > Compiler… and run Auto-detect once to make sure the compiler path points at the new MinGW folder.

To remove it, open Settings > Apps > Installed apps, click the … button next to Code::Blocks, and choose Uninstall, then follow the uninstaller. Your projects stay wherever you saved them, and your personal Code::Blocks settings remain in the %APPDATA%\CodeBlocks folder; delete that folder if you want a completely clean reinstall.

Code::Blocks Questions

Is Code::Blocks free?

Yes. Code::Blocks is open source under the GNU GPL version 3, so there is no paid edition, trial period or account to create. The bundled WinLibs compiler is free as well.

Can I use Code::Blocks for C, C++ and Fortran?

Yes. The mingw setup file installs GCC for C, G++ for C++ and GFortran for Fortran, and it also includes Clang. When you create a console project, the wizard asks which language to use, and each project is built with the compiler you choose on the last wizard page.

My course still uses Turbo C. Do I need it as well?

Usually not. Turbo C is 16-bit DOS software that cannot run directly on Windows 11, and Code::Blocks with GCC compiles the same standard C. If your course needs the old editor anyway, see how to run Turbo C on Windows 11 with DOSBox, which also covers the small code changes old Turbo C programs need under GCC.

Should I pick Code::Blocks or Visual Studio Code?

Code::Blocks works for C and C++ the moment the mingw setup finishes, with the compiler and debugger already connected. Visual Studio Code is a general editor that supports many languages through extensions, but you install and configure a compiler for it separately. Beginners following a C or C++ course often find Code::Blocks quicker to start with; if you also write Python or web code, installing Visual Studio Code on Windows 11 may suit you better.

How can I test my code on Linux without leaving Windows?

The Code::Blocks build you installed produces Windows programs only. If an assignment will be graded on Linux, you can compile and run it there in a container with Docker Desktop on Windows 11, using the same source files you wrote in Code::Blocks.