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 發布。

上一篇:付費自習室

下一篇:UG

相關詞條

相關搜索

其它詞條