Code::Blocks

Code::Blocks

开放源码软件
Code::Blocks 是一个开放源码的全功能的跨平台C/C++集成开发环境。 Code::Blocks是开放源码软件。Code::Blocks由纯粹的C++语言开发完成,它使用了著名的图形界面库wxWidgets(3.x)版。对于追求完美的C++程序员,再也不必忍受Eclipse的缓慢。
  • 软件名称:Code::Blocks
  • 软件平台:Windows ,Linux ,Mac OS
  • 软件语言:C、C
  • 开发商:The Code::Blocks Team
  • 软件授权:GNU GPLv3开源许可证
  • 软件版本:20.03
  • 软件大小:531.5MB
  • 软件类型:IDE(集成开发环境)

安装配置

Windows平台安装

进入Code::Blocks官网 ,点击导航栏上的Downloads,再点击 Download the binary release 进入下载界面选择Windows平台的安装包即可。

下载后双击安装包即可安装。

若需使用软件自带编译器,可选择末尾带“mingw-setup.exe”的安装包下载

若需设置编译器,打开CodeBlocks,在Settings->Compiler and debugger settings->选择GNU GCC Compiler,并在Toolchain executables中设置好对应执行软件路径(若是希望使用VC编译器,类似地设置即可)。

Linux平台安装

A.编译安装(适用于所有Linux发行版)

进入Code::Blocks官网,点击导航栏上的Downloads,再点击 Download the source code 进入下载界面。

选择文件后缀为“.tar.xz”的压缩包下载后即可编译安装。

注意安装前检查所需软件依赖是否安装到位。

B.软件包安装

这里以Debian GNU/Linux为例说明安装过程,其他系统可以参考官网的Wiki。

使用Debian GNU/Linux及其衍生版的用户可以直接使用以下命令下载并安装:

1sudo apt-get install codeblocks

但是这种方法安装的通常不是最新版本(一般是13.12)

需要下载最新版本的需要到Download the binary release界面选择对应的压缩文件下载。

解压后文件夹中会有很多.deb包。

除了 “codeblocks_--version--_--architecture--.deb” 是Code::Blocks主程序之外,其余都是软件依赖,需要按一定顺序安装,遇到压缩包中没有的依赖就需要去软件仓库找找了。所以请留意安装时输出的错误。

安装好依赖后即可安装主程序。

配置

软件界面改为中文

需要到网上下载一个zh_CN.mo文件,然后放入指定的路径中。

Windows平台

需要找到软件安装文件夹下的share文件夹,进入codeblocks文件夹下新建一个新的文件夹locale,进入locale文件夹,再新建一个文件夹并命名为zh_CN。将zh_CN.mo文件放于此处。

启动软件后点击菜单栏:settings---> environment,点击environment,选择view,再从右侧第一个下拉栏选择Chinese (Simplified)后确认并重启软件即可。

Linux平台

打开终端,输入以下命令后重启软件即可。

1 cd /usr/share/codeblocks/   #进入软件安装目录

2 sudo mkdir locale           #新建一个文件夹并命名为locale

3 cd locale                   #进入locale文件夹

4 sudo mkdir zh_CN            #新建一个文件夹并命名为zh_CN

5 cd zh_CN                    #进入zh_CN文件夹

6 cp codeblocks.mo            #从目标文件夹复制文件(务必添加路径)

7 chmod 777 CodeBlocks.mo     #赋予执行权限

主要特点

虽然Code::Blocks从一开始就追求跨平台目标,但是最初的开发重点是Windows平台,从06年3月21日版本:1.0 revision 2220开始,Code::Blocks在它的每日构建中正式提供GNU/Linux版本,这样 Code::Blocks在1.0发布时就成为了跨越平台的C/C++IDE,支持Windows和GNU/Linux。由于它开放源码的特点,Windows用户可以不依赖于VS. NET,编写跨平台C++应用。

Code::Blocks提供了许多工程模板,这包括:控制台应用、DirectX应用、动态连接库、FLTK应用、GLFW应用、Irrlicht工程、OGRE应用、OpenGL应用、QT应用、SDCC应用、SDL应用、SmartWin应用、静态库、Win32 GUI应用、wxWidgets应用、wxSmith工程,另外它还支持用户自定义工程模板。在wxWidgets应用中选择UNICODE支持中文。

Code::Blocks支持语法彩色醒目显示,支持代码完成,支持工程管理、项目构建、调试。

Code::Blocks支持插件,包括代码格式化工具AStyle;代码分析器;类向导;代码补全;代码统计;编译器选择;复制字符串到剪贴板;调试器;文件扩展处理器;Dev-C++DevPak更新/安装器;DragScroll,源码导出器,帮助插件,键盘快捷键配置,插件向导;To-Do列表;wxSmith;wxSmith MIME插件;wsSmith工程向导插件;Windows7外观。

Code::Blocks具有灵活而强大的配置功能,除支持自身的工程文件、C/C++文件外,还支持AngelScript、批处理、CSS文件、D语言文件、Diff/Patch文件、Fortan77文件、GameMonkey脚本文件、Hitachi汇编文件、Lua文件、MASM汇编文件、Matlab文件、NSIS开源安装程序文件、Ogre Compositor脚本文件、Ogre Material脚本文件、OpenGL Shading语言文件、Python文件、Windows资源文件、XBase文件、XML文件、nVidia cg文件。识别Dev-C++工程、MS VS 6.0-7.0工程文件,工作空间、解决方案文件。

Code::Blocks基于wxWidgets开发,正体现了wxWidgets的强大。以前Borland C++Builder X宣称基于wxWidgets开发跨平台、兼容性好、最优秀的C++ IDE环境,但没有实现;让我们拭目以待。国内的Code::Blocks爱好者和跨平台开发员应该尽快建立中文Code::Blocks网站,提供Code::Blocks中文化支持,促进Code::Blocks在国内的发展。

版本发布

2020年3月19日 04:41

大致

修复其基础类型指定(C++11)

修复函数结果强制转换为 void 时的分析

添加对 -std=c++17 标志的支持

改进调试器项目选项面板的 UI

使可以在语法突出显示预览中输入

修复在工作区中重新加载多个项目时的崩溃

wxPDFDoc 使用 v0.9.8(用于源导出插件)

删除重复的编译器选项

在窗口上修复 wxWidgets 脚本

以上是少数更新,如需完整了解,请参见codeblocks官网 

完成代码

代码自动完成

- Calltip improvements: cleaned it up (strip duplicates), refined the calltip window position, "Pretty Print" each function

names

关于提示点的改进:可以清除它(去除重复),重新定位一个精致的Windows提示点,对每个函数名称的"Pretty Print"功能

- Fixed showing the Call tip for consturctors and destructors

修复了构造器和解构造器的提示点显示功能

- Optimised the Symbols browser by avoid unnecessary updates

优化了符号浏览状态下关于avoid的一些不太重要的更新

- Fixed some bug when saving/loading the Code completion options

修复了一些代码自动完成选项中保存和载入的问题

- Made 'Find implementation' and 'Find declaration' to be more precise (goto to line and column)

使"Find implementation"(注:搜索实现)和"Find declaration"(搜索声明)更准确(直接定位到行和列)

- Fixed some bugs with the refresh of the Code completion toolbar

修复了代码自动完成工具栏上刷新的一些问题

- Fixed many bugs in the parser (crashes, deadlocks and parsing errors)

修复了语法分析器(崩溃、死锁、分析错误)的多个问题

- Added support to the parser for handling conditional preprocessor directives (only for file scope, included files aren't

expanded)

增加了对语法分析器手动预处理指令的支持(仅限文件作用域,include文件尚未扩展进来)

- Improved the Macro replacement and added macro replacement for GCC/MSVC build-ins

改进了宏替换功能,增加了GCC/MSVC上构建的的宏替换功能

- Made the parser more robust and improved the thread safety

使语法分析器更加运行强健并且改进了它的线程安全

- Introduce two major options for the operation of the Code completion plugin: one parser for all workspace or a parser per

计划

介绍两个比较重点的自动完成操作选项功能的插件:一个工作区全局语法分析器和一个逐个项目的语法分析器

- Improved the parsing of Class inheritance, now it is better and faster

改进了类继承的语法分析

- Improved parsing of C++ template constructs, typedef statements, operator overloading

改进了C++构件、类型自定义语句typedef和重载操作的语法分析器

- Added macro expansion for some code patterns (e.g. wxWidgets's event handling table/entry macros)

增加了许多代码块的宏扩展功能(比如wxWidgets的事件处理表单或资源宏)

- Added None/Null parser for parsing files not included in any C::B project.

增加了不包含任何C::B项目的文件中的None/Null的语法分析

- Adding code with auto-completion follows the active indentation and EOL style

增加代码自动完成功能和下面内容自动缩进,并且拥有EOL(注:面向表达式的语言)风格

- Support auto-completion for include header file names and preprocessor directives

支持include头文件名称和预处理指令的自动完成功能

- Automatically append the text if the prefix word already exists before the caret(after the user hit Enter on the suggestion

list)

在已经在前面存在的的插入符号前自动追加文本文件的前缀(如果用户按了回车键则显示建议候选值列表)

- Support auto-completion for member variable initialisation

支持成员变量初始化自动完成功能

- Added some tools for simple refactoring tasks: find references, rename a symbol (not 100% precise)

增加了一些简单重构任务的工具:查找参照,符号重名称(并非百分之百精确)

* Not implemented (TODO) - parsing of multiple template arguments

未执行的(TODO)-多样化模板参数语言分析器

调试

调试器

- Reworked the plugin API and made it easier to implement different debugger plugins (currently there are at least 3 plugins

in progress)

重写和插件API功能并且使它更容易为不同的实现调试器所调用(当前至少还有3个插件正在此进程中继续进行着)

- Reimplemented the watches window to be easier to use* using wxPropertyGrid control. Now adding, removing, editing watches

should be easier

重应用一个观察窗口使它更易于为wxPropertyGrid所调用。增加、删除、编辑观察点容易多了

- Reimplemented the UI used for the 'Evaluate expression under cursor' feature, it is similar to the new watches window

重应用"Evaluate expression under cursor"的一个有特色的用户界面(UI),它与全新的观察窗口竟然有些相似

- Fixed some problems in the callstack window - switching to the selected frame should work 99% of the time

修复了多个栈调用窗口的问题-切换到已选择的窗口框架可以看到99%的时间下工作的栈

- There were many improvement to the disassembly window

还有许多反汇编窗口的重要改进

- The debugger options have been extracted in Settings->Debugger. Multiple configurations are supported for every different

插件

调试器选项被调整到了"Settings"菜单下的"Debugger"这里。多个不同功能的插件可以在这里被支持并且可以配置它们

- Made it possible to run the host application for a DLL project in a terminal

使运行在终端上调用DDL项目的主机应用程序更加合适

- The GDB plugin is way more robust and reliable now, GDB 7.5 is supported

7.5版也已经支持了

- The CDB plugin is vastly improved

大幅改进CDB插件

- Remote debugging works better

远程调用工作可以更好的进行

- Made it possible to use marco replacement variables in many places

使宏替换变量在许多地方可以运行的更好

* The local variables and function arguments features have not been reimplemented, because of complexities in the UI design,

reliability issues and performance

本地变量和函数参数特性没有重应用,所以UI设计的复杂性、可靠性问题和性能问题仍然存在

新增插件

- Abbreviatons (extracted from the core): provides auto-completion (note that this has nothing to do with code completion):

Abbreviatons(由内核释出):自动完成功能改进(注:这里没有代码自动完成功能需要做的任何事情)

- Cscope: integrates the source code searching features of Cscope:

Cscope:集成源代码查找特性,

- DoxyBlocks: support for doxygen inline documentation:

DoxyBlocks:支持doxygen内联函数文档在

- EditorConfig:

EditorConfig:

- EditorTweaks: make one off changes to active editor (EOL mode, wrap etc) and code alignment

工具

EditorTweaks:使用了一个编辑器激活代码工具并且它有停靠对齐工具栏(EOL模式、wrap模式等等),访问

- FileManager: tree view of the file system with support for basic file management operations in the management pane:

FileManager:以树状结构查看已经支持的基本文件系统及其操作选项管理面板

- NassiShneiderman: creation of Nassi Shneiderman diagrams:

NassiShneiderman:创建一个Nassi Shneiderman对话框

- ReopenEditor: reopens last closed editor(s) via hotkey (Ctrl+Shift+t) or menu-item

ReopenEditor:重新打开最后一次从编辑器中关闭的文件(热键^+~+t)或菜单条目

- SmartIndent (extracted from the core): multi-language support for automatic indenting of code to match typical indentation

样式

SmartIndent(内核释出):多种语言支持代码自动匹配和自动智能缩进

- SpellChecker: check spelling in comments and strings using hunspell:

SPellChecker:用户字符串和注释中的拼写检查,使用hunspell(注:一种拼写检查器)技术

- ToolsPlus: creation and management of custom tools

ToolsPlus:创建和管理一个自定义工具

Improved plugins:

改进插件

- Abbreviations: added support for autocompletion and automatic conversion of tab/space and eol style of the editor

Abbreviations:增加和对编辑器的自动完成和自动转换标签、空格和EOL风格的支持

- AStyle: add brackets option, delete empty lines option, other new features from moving to astyle 2.02

AStyle:增加括号选项,删除空行选项以及其他一些关于AStyle2.02的新特性

- AutoSave: new option to autosave entire workspace, bug fix for timer UI

AutoSave:新选项支持工作区自动保存,修复了时间UI上的一个问题

- AutoVersion: improved svn support (legacy versions, git-svn), bug fixes

AutoVersion:提升了SVN的支持(遗留版本、GIT-SVN),修复多个问题

- BrowseTracker: jump tracker now ignores line 1 activations

- CppCheck: configuration UI, bug fixes

CppCheck:UI配置多个问题修复

- CodeSnippets: bug fix (crasher)

CodeSnippets:多个问题修复(关于崩溃的)

- CodeStatistics: stats for project or entire workspace

CodeStatistics:工作区条目或项目状态

- DragScroll: bug fix (gtk crasher)

DragScroll:修复问题(GTK崩溃问题)

- Header Fix-up: STL and C library bindings

Header Fix-up:STL和C语言库绑定

- Help: support for windows help collections, fixes crash on exit

帮助

支持Windows帮助集合对象,修复了在退出时崩溃的问题

- HexEditor: crash fix

HexEditor:崩溃问题修复

- KeyBinder: remove Ctrl-C/V/X (copy/paste/cut) from menu keybinder table to allow native behavior, other fixto play more

nicely with OS *********-check?

KeyBinder:删除了KeyBinder菜单中的CTRL-C/V/X(复制、粘贴、剪切)以允许本地化行为,其他更精细的操作对于操作系统***怎么检查好

呢?

- Profiler: autoselect active target,fix for rare crash

档案

自动选择活动标头,修复偶然崩溃问题

- Project Importer: new support for MSVC 7, 10

Project Importer:增加了对MSVC7和10的项目导入功能的支持

- ThreadSearch: UI improvements

ThreadSearch:UI改进

- ToDo: more language independent, fixes annoying UI bugs

多语言独立模式,修复了一些让人恼火的UI问题

- Valgrind: added configuration panel, works better with CB projects, more output handling and support for valgrind features

Valgrind:增加了配置面板,CB项目工作将更好,更多valgrind关于输出可以手动控制的特性

- wxSmith: support for many new widgets (including KWIC, ImagePanel, GridBagSizer), internationalization support, duplicate

IDs are allowed, tons of bug fixes

wxSmith:支持更多新的小工具(包括KWIC、ImagePanel、GridBagSizer),支持国际化,复制ID也已被允许,巨量的问题已修复

2010年05月23日,Code::Blocks (6271) 发布,C++开发环境,

修正一个缺陷“高级选项”页面的wxWidgets项目向导。(谢谢汉斯·亨瑞克为指向这个)

KeyBinder 1 0 49 2010/03/3:应用补丁2885年由易怒的

CppCheck插件:切换到输入文件列表风格的新CppCheck(1.41)

构建SqPlus修复。

修正:编译器警告——“警告:“dllimport”属性忽视”

固定一臭虫在linux上:插件列表,应该被加载在批处理构建模式没有保存

cc:应用补丁通过所修复VC头解析

答:一些代码清理,额外的调试消息

修正了在sqstdstring.cpp错字

修复bug # 17097(经理面板不正确的行为),也改变了行为,得到如果接近所有标签是活跃和关闭按钮被单击时,

CC:bug修复GetGCCCompilerDirs Archlinux失败(由于所)

应用补丁为向导的默认编译器错误(谢谢所)

CC:修复的记号赋予器::FixArgument“bug:支持跳过c++注释(谢谢所)

CC:修复一个bug为“外来的”C + +”(谢谢所)

应用:[补丁# 2974]调整路径闪烁在“plugin::ScriptedWizard”

应用:[补丁# 2969]到wxWidgets向导。

固定可能崩溃的候选人

应用:[补丁# 2977]wxSmith补丁,固定大小的最小预览bug。

准备新标识。

2010年05月31日,Code::Blocks 10.05 发布。

2012年11月25日,Code::Blocks 12.11 发布。

2013年12月27日,Code::Blocks 13.12 发布。

2016年1月28日,Code::Blocks 16.01 发布。

2017年12月30日,Code::Blocks 17.12 发布。

2020年3月19日,Code::Blocks 20.03 发布。

相关词条

相关搜索

其它词条