C/C++与Fortran开发环境,说明25.03包选择、工具链配置、更新及编译链接运行问题。 / C/C++ and Fortran IDE with v25.03 package selection, toolchain setup, release notes and build troubleshooting.
中文
Code::Blocks 是面向 C、C++ 与 Fortran 的免费开发环境,支持工程构建、断点调试和插件扩展。本文整理 Code::Blocks 下载安装、25.03 更新日志、普通包与 MinGW 包的区别,解释编译器找不到、运行按钮不可用及工具链配置问题,建议先编译简单项目,再为课程选择编译器与目标架构。
Code::Blocks 下载前:IDE、编译器与工程分别负责什么
Code::Blocks 是 Code::Blocks Team 维护的 C、C++ 与 Fortran 集成开发环境。编辑器、工程构建和调试界面可由插件扩展,支持工作区、多目标工程、并行构建、代码与数据断点、调用栈等。源文件写在 IDE 里,并不等于编译器、链接器或调试器已经就绪;这些程序的路径、版本和目标架构仍需要配套配置。

选择课程环境时,先确认课程要求的 GCC 或其他编译器、语言标准、库与架构。对于已有工程,保留项目文件和原工具链记录。IDE 可以提供新的标准选项,但所选编译器是否完整实现该标准,还要看编译器自身与所用库的支持情况。
Code::Blocks 安装步骤:选对是否附带 MinGW 的包
- 进入 官方 Binary releases,选择 Windows 分组。默认是 64 位,另有标为特殊用途的 32 位包;不要只看文件名相似就混用不同架构。
- 新手需要现成工具链时,可按官网建议选择
codeblocks-25.03mingw-setup.exe。该包额外带有 WinLibs 项目的 GCC/G++/GFortran/Clang 和 GDB,页面标示工具链版本为 14.2.0。普通 setup.exe 包含 IDE 与插件,不附带上述整套工具链。
- 按向导安装并保留所需编译器组件。已有合适工具链的人可选普通包,并在编译器设置中核对可执行程序目录;无管理员权限者可查看非管理员安装包。免安装 ZIP 包含所有功能,但不提供组件选择与开始菜单快捷方式,需要自行安排目录。
- 启动后选择目标编译器,建立一个最小的控制台项目并构建,再运行输出程序。若失败,先读 Build log 的第一条实际错误,确认编译器路径与目标架构;先让这个小项目成功,再打开复杂课程作业或旧工程。

官网的官方下载入口链接至 Code::Blocks 的分发文件,不需要为基础 IDE 购买激活码。应用采用 GPL 第 3 版,SDK 是 LGPL 第 3 版;闭源插件、第三方库和生成程序各自的许可仍需分别判断,不能把 IDE 许可证直接套到所有工程内容。
Code::Blocks 25.03 更新日志:构建配置与高 DPI 改进
官方公告于 2025 年 3 月 31 日发布 25.03,日志整理了自 20.03 以来的变化。通用部分增加自动源目录与工程 glob 管理、全局变量集合导入导出,改进高 DPI、拖放、编码处理与窗口行为。代码补全部分恢复 Symbol Browser,并修复添加工程文件时冻结、非法 UTF-8 解析循环等问题。

编译器插件增加 MinGW64、MSYS2、MSVC17 与 TDM 配置,增加 C++23、C++26 及相关 GNU 方言选项,并处理长命令行响应文件、C++20 版本选择和 MinGW 检测。调试器对 CDB 的参数、内存、线程与局部变量支持也有扩充。这里描述的是 IDE 和插件能力;启用 C++26 选项不等于所带编译器已经完整实现 C++26。
Code::Blocks 常见问题 FAQ:找不到编译器与不能运行
安装成功,为什么提示编译器不存在? 先看自己是否装了普通 IDE 包。若没有其他工具链,按官方入口选择带 MinGW 的完整包;若已有编译器,在相应配置中核对其安装目录、编译和链接程序。不要用一个空文件夹来消除提示,也不要同时修改多个编译器配置。
运行按钮不可用,是软件坏了吗? 25.03 日志明确改进了 Run 的可用条件:没有工程且没有有效编辑文件,或可执行文件不存在时,会禁用运行。先选择正确构建目标并成功生成程序,再运行;编译错误、链接错误和启动错误应分开处理。

32 位 IDE 能否直接解决 64 位库链接失败? IDE 程序位数、编译器的目标架构和所链接库的架构是不同条件。检查工程目标、工具链及依赖库是否一致,而不是只更换 IDE 的安装包。
换新版本后旧工程失败,需要删除全部配置吗? 先备份项目与配置,记录原编译器版本、搜索路径、库顺序和全局变量。用一个最小项目区分工具链问题与原工程问题,再逐项迁移。日志新增的全局变量导入导出可帮助管理设置,但不能替你判断所有路径在新电脑上是否仍有效。
完成 Code::Blocks 下载与安装后,先确认选对工具链并生成一个简单程序。为现有工程记录编译器、语言标准、目标架构和依赖,让后续构建与调试更容易复现。
English
Code::Blocks download guide: choose v25.03 Windows packages, install the right compiler, review updates, and troubleshoot build paths, architecture, and GDB.
Before downloading Code::Blocks: separate the IDE and toolchain
Code::Blocks is a C, C++, and Fortran IDE maintained by the Code::Blocks Team. Its plugin framework supports editing, project builds, and debugging, with workspaces, multiple targets, parallel builds, code and data breakpoints, and call stacks. Writing source in the IDE does not establish that a compiler, linker, and debugger are installed or correctly selected. Their paths, versions, and target architectures must fit the project.

For coursework, first check the required compiler, language standard, libraries, and target architecture. Preserve the project files and original toolchain details for an existing application. An IDE offering a language-standard switch does not establish full implementation by the selected compiler and libraries.
How to install Code::Blocks: choose a package with the required tools
- Open the official binary releases page and use its Windows section. The default builds are 64-bit, with separate special-purpose 32-bit packages. Similar filenames are not a reason to mix architectures.
- If you need a bundled toolchain, the site recommends
codeblocks-25.03mingw-setup.exe. It additionally includes GCC/G++/GFortran/Clang and GDB from WinLibs, with the page identifying toolchain version 14.2.0. The ordinary setup.exe includes the IDE and plugins without that complete compiler bundle.
- Follow setup and retain the required compiler components. If you already have a suitable toolchain, select the ordinary package and verify executable directories in the compiler settings. A nonadmin installer is offered for users without administrator rights. No-setup ZIPs include everything without component selection or Start menu shortcuts, so directory setup is manual.
- Select the intended compiler, create a minimal console project, build it, then run the output. If it fails, read the first actual error in Build log and check toolchain paths and architecture. Make this small project work before importing a complex assignment or older workspace.

The official page links to the project's distribution files; the basic IDE does not require a purchased activation code. The application uses GPL version 3 and its SDK uses LGPL version 3. Separately evaluate closed-source plugins, libraries, and generated programs rather than applying the IDE license to all project content.
Code::Blocks v25.03 release notes: builds and high-DPI behavior
The official announcement dates v25.03 to March 31, 2025. Its changelog covers changes since v20.03. General changes add automatic source folders and project globs, import/export of global variable sets, and improvements to high-DPI rendering, drag and drop, encoding, and window behavior. Code completion restores the Symbol Browser and fixes issues including freezing while adding project files and parsing loops for invalid UTF-8.

Compiler integration adds MinGW64, MSYS2, MSVC17, and TDM configurations, options for C++23/C++26 and GNU dialects, response files for long command lines, version-aware C++20 selection, and MinGW detection improvements. CDB debugger support expands for arguments, memory, threads, and local variables. These are IDE/plugin capabilities: selecting a C++26 option does not imply complete C++26 implementation by the bundled compiler.
Code::Blocks FAQ: missing compilers and disabled Run
Why is a compiler missing after successful installation? Check whether you installed the ordinary IDE package. If no toolchain is available, choose the official MinGW bundle; if one exists, verify its directory and compile/link executables in the appropriate configuration. An empty folder does not fix a missing compiler. Adjust one configuration at a time.
Does a disabled Run button mean the IDE is broken? The v25.03 log specifies improved conditions: Run is disabled without a project or valid editor, or when the executable does not exist. Select the right target and successfully build the output first. Compilation, linking, and startup failures are separate stages.

Will switching the IDE to 32-bit solve a 64-bit library mismatch? IDE bitness, compiler target architecture, and linked-library architecture are distinct. Check the project target, toolchain, and libraries together rather than changing only the IDE installer.
Should I delete every setting when an old project fails after updating? Back up the project and configuration, and record the former compiler, search paths, library order, and global variables. Use a minimal project to separate environment issues from project-specific problems. Global-variable import/export helps manage settings but does not establish that old paths exist on a new computer.
After a Code::Blocks download and installation, first verify the toolchain by building a simple program. Record the compiler, language standard, architecture, and dependencies for existing work so later builds and debugging can be reproduced.