Code blocks

Translation for trunk

Language Status Untranslated Needs review Last Changed

Afrikaans

18

099.17

2155

2009-01-22 11:29:08 UTC
2009-01-22

Albanian

64

097.05

2109

6

2008-12-05 20:31:31 UTC
2008-12-05

Arabic

654

069.90

1519

52

2016-04-01 18:11:36 UTC
2016-04-01

Basque

179

091.76

1994

2012-01-24 17:56:04 UTC
2012-01-24

Belarusian

79

096.36

2094

2014-04-14 18:44:36 UTC
2014-04-14

Bengali

38

098.25

2135

2007-02-24 14:01:37 UTC
2007-02-24

Bosnian

80

096.32

2093

46

2011-10-04 17:56:05 UTC
2011-10-04

Brazilian Portuguese

2173

000.00

6

2021-09-04 14:20:56 UTC
2021-09-04

Breton

120

094.48

2053

2018-04-26 08:11:32 UTC
2018-04-26

Bulgarian

798

063.28

1375

66

2011-02-05 16:44:20 UTC
2011-02-05

Catalan

957

055.96

1216

7

2011-03-17 13:37:43 UTC
2011-03-17

Catalan (Valencian)

100.00

2173

2017-08-27 10:34:02 UTC
2017-08-27

Chinese (Hong Kong)

39

098.21

2134

2009-01-24 11:05:42 UTC
2009-01-24

Chinese (Simplified)

2173

000.00

3

2021-08-18 10:37:37 UTC
2021-08-18

Chinese (Traditional)

2173

000.00

2021-02-26 08:18:09 UTC
2021-02-26

Chuang; Zhuang

14

099.36

2159

2010-12-10 11:56:21 UTC
2010-12-10

Czech

912

058.03

1261

233

2011-07-28 20:06:21 UTC
2011-07-28

Danish

320

085.27

1853

123

2008-05-17 23:04:56 UTC
2008-05-17

Dutch

2120

002.44

53

2017-03-16 21:47:10 UTC
2017-03-16

English (United Kingdom)

2173

000.00

2020-10-18 10:48:24 UTC
2020-10-18

Estonian

11

099.49

2162

2

2008-05-16 13:59:50 UTC
2008-05-16

Finnish

265

087.80

1908

2009-02-05 17:28:22 UTC
2009-02-05

Franco-Provençal

8

099.63

2165

2

2009-02-18 23:12:30 UTC
2009-02-18

French

2173

000.00

2021-08-24 10:07:39 UTC
2021-08-24

French (Canada)

100.00

2173

2021-05-28 16:18:33 UTC
2021-05-28

Galician

146

093.28

2027

2021-01-30 10:32:31 UTC
2021-01-30

German

2173

000.00

1

2021-04-20 18:53:55 UTC
2021-04-20

Greek

1675

022.92

498

2012-01-28 22:15:51 UTC
2012-01-28

Hebrew

59

097.28

2114

4

2010-09-27 12:00:53 UTC
2010-09-27

Hungarian

1387

036.17

786

12

2013-01-06 14:50:56 UTC
2013-01-06

Indonesian

393

081.91

1780

24

2011-10-11 16:05:15 UTC
2011-10-11

Italian

2172

000.05

1

2021-04-25 15:38:09 UTC
2021-04-25

Japanese

1388

036.13

785

2014-07-18 10:07:23 UTC
2014-07-18

Korean

1313

039.58

860

7

2015-05-03 09:19:09 UTC
2015-05-03

Kurdish

58

097.33

2115

2017-04-06 23:17:29 UTC
2017-04-06

Latvian

25

098.85

2148

2011-05-06 13:26:57 UTC
2011-05-06

Lithuanian

2173

000.00

1

2014-03-01 09:03:44 UTC
2014-03-01

Low German

1

099.95

2172

2009-08-19 14:11:23 UTC
2009-08-19

Malay

100.00

2173

2008-04-05 10:28:34 UTC
2008-04-05

Min Nan Chinese

13

099.40

2160

2011-12-07 14:45:06 UTC
2011-12-07

Norwegian Bokmal

772

064.47

1401

8

2014-03-08 20:33:23 UTC
2014-03-08

Ossetian

100.00

2173

2017-09-04 16:14:56 UTC
2017-09-04

Persian

103

095.26

2070

1

2008-12-29 18:42:15 UTC
2008-12-29

Polish

1833

015.65

340

14

2020-04-29 09:48:06 UTC
2020-04-29

Portuguese

2173

000.00

2017-06-11 13:56:44 UTC
2017-06-11

Romanian

412

081.04

1761

6

2014-02-05 17:50:41 UTC
2014-02-05

Russian

2173

000.00

3

2020-12-16 12:05:16 UTC
2020-12-16

Serbian

436

079.94

1737

2020-03-15 11:15:36 UTC
2020-03-15

Serbian Latin

100.00

2173

2014-02-08 18:38:57 UTC
2014-02-08

Sinhalese

2136

001.70

37

5

2014-06-15 07:47:12 UTC
2014-06-15

Slovak

750

065.49

1423

2012-10-26 19:29:11 UTC
2012-10-26

Slovenian

1275

041.33

898

72

2012-09-01 17:31:22 UTC
2012-09-01

Spanish

2172

000.05

1

1

2021-04-18 23:32:30 UTC
2021-04-18

Swedish

1226

043.58

947

119

2010-02-13 14:41:20 UTC
2010-02-13

Thai

219

089.92

1954

2021-05-17 13:35:10 UTC
2021-05-17

Turkish

1657

023.75

516

180

2013-03-31 16:44:34 UTC
2013-03-31

Ukrainian

1251

042.43

922

3

2020-08-03 15:27:30 UTC
2020-08-03

Uyghur

17

099.22

2156

1

2016-05-10 15:48:14 UTC
2016-05-10

Uzbek

14

099.36

2159

14

2021-03-22 10:43:42 UTC
2021-03-22

Vietnamese

32

098.53

2141

43

2008-12-20 13:39:00 UTC
2008-12-20

Yiddish

100.00

2173

2008-04-16 21:28:59 UTC
2008-04-16

Translated

Untranslated

Создание проекта

Для создания проекта необходимо перейти в меню File -> New -> Project…. Либо сразу нажать на кнопку Create a new project на стартовой странице.

В появившемся окне выбираем необходимый тип проекта. Здесь мы видим, что Code::Blocks имеет большое количество шаблонов проектов. В нашем случае это Console application (консольное приложение).

В следующем окне выбираем используемый язык программирования. Выбираем C++ и нажимаем на кнопку Next.

Далее в поле Project Title вписываем название проекта. В нашем случае это Test. Тут же указываем расположение проекта на диске (поле Folder to create project in). В указанной нами папке Code::Blocks автоматически создаст папку с ранее указанным названием проекта. Указав имя папки и имя файла, нажимаем на кнопку Next.

В следующем окне выбираем компилятор, а также сценарии сборки. По умолчанию выбран GNU GCC Compiler, который мы и будем использовать. Сценарии сборки позволяют получить несколько версий одного приложения. По умолчанию предполагается два сценария: Debug (используется при отладке) и Release (сценарий компиляции готового приложения). Хотя бы один из сценариев должен быть выбран. Если выбраны оба сценария, то в дальнейшем можно будет переключаться между ними.

Жмём Finish и получаем минимальную программу, так называемый Hello World!

Нажмимаем F9 для компиляции и запуска программы и получаем следующее окно.

Обратите внимание на кнопки на панели инструментов, предназначенные для запуска и компиляции программы

Первая слева кнопка (с желтой шестеренкой) запускает только компиляцию программы, вторая (с зеленым треугольником) запускает
на исполнение последний скомпилированный файл программы, третья (с зеленым треугольником и желтой шестеренкой) — сначала
запускает компиляцию программы, а затем запускает полученный exe-файл программы. Частой ошибкой является использование кнопки запуска (с зеленым треугольником) для компиляции и запуска программы.
В этом случае внесенные в исходный код изменения не будут влиять на поведение программы, поскольку программа не была перекомпилирована.

Если открытый для редактирования файл был изменен, то на его вкладке слева от имени появится звездочка как на рисунке ниже.
Для сохранения программ, как и во многих других приложениях достаточно нажать сочетание клавиш Ctrl+S.
Расположение (путь) и имя отрытого в данный момент файла отображается в строке состояния, в левой нижней части окна.

Если ваши программы имеют небольшой объем и состоят только из одного файла, то лучше создавать не проект, а просто новый файл (File -> New -> Empty file).
Связано это с тем, что если у вас несколько проектов, то Code::Blocks будет компилировать и запускать только активный проект. Определить какой проект у вас активен в текущий момент
можно по состоянию окна Management, в котором показываются все открытые проекты и файлы. Если одновремено открыто несколько проектов, то название активного будет выделено полужирным шрифтом.
Если окно отсутствует, то открыть его можно через меню View -> Manager.

Для переключения между проектами необходимо навести указатель мыши, на тот проект, который вы необходимо
сделать активным и затем дважды кликнуть левой кнопкой мыши на названии проекта либо кликнуть один раз правой кнопкой мыши и в появившемся контекстном меню выбрать пункт Activate project.
В этом же меню доступны другие действия с проектом (в том числе добавление в проект новых файлов).

Частой ошибкой является редактирование файлов одного проекта, а запуск и тестирование другого проекта. Также если у вас открыт проект и просто отдельный файл программы, то Code::Blocks будет компилировать и запускать только активный проект.
Поэтому в учебных целях, когда весь проект зачастую состоит из одного файла желательно создавать не проекты, а отдельные .cpp файлы.

Other Plugins

  • abbreviations: Applied patch to fix abbreviations target is missing in some project files (thanks stahta01)
  • abbreviations: Fixed bug in with non-alpha-numeric character abbreviations (thanks BlueHazzard)
  • cb_share_config: Added simple “export all” functionality for easy backup of all config stubs to a backup folder
  • cbp2make: Added (further improved) cbp2make by mirai-computing due to project seems dead otherwise
  • CodeStat: Fix assert in the progress update (thanks blauzahn)
  • cscope: Fix hang of cscope when given a missing file (ticket #448 Robert Morin)
  • help: allow to search for keywords also on CPlusPlus.com
  • DoxyBlocks: Clean up the UI a bit
  • DoxyBlocks: Filter out comment strings in the parameter documentation (thanks Yves De Muyter)
  • HexEditor: Change the label of the OK button to Find
  • HexEditor: Limit vertical resizing of the search dialog
  • HexEditor: Fix text misalignment when selecting numbers in the editor
  • IncrementalSearch: wx3 compatibility-fix
  • ProjectImporter: Better handling for more recent VC workspaces / project files (patch by unknown person)
  • SourceExporter/NassiShneiderman: Make sure only one File -> Export menu is created no matter which plugin is created first
  • SourceExporter: Fix undefined behaviour
  • ThreadSearch: Add option to disable/enable the autosizing of log columns (fixes #324, thanks Sergey Bezgodov)
  • ThreadSearch: Fix infinite filesystem traversal when there are cyclic symlinks present
  • todo: Display count of list item (ticket #452 Sergey Bezgodov)
  • todolist plugin: some code improvements by frithjofh
  • Valgrind: Quote the path to the xml file if needed — makes the plugin work when the project is located in a path with spaces

Debug

Menu Path
Function
Keyboard Shortcut
Debug > Start / Continue
Run current project in debugger
F8
Debug > Stop debugger
Stop current debugging session
Shift-F8
Debug > Run to cursor
Run program until it reaches the current line
F4
Debug > Next line
Execute the next line of code
F7
Debug > Step into
Execute the next line of code, but step inside functions
Shift-F7
Debug > Step out
Continue execution until the current frame exits
Ctrl-F7
Debug > Next instruction
Execute the next assembly instruction
Alt-F7
Debug > Step into instruction
Execute the next assembly instruction, if it is a function call step into it
Alt-Shift-F7
Debug > Toggle breakpoint
Toggle breakpoint in current line
F5

Misc (targeting wx3)

  • Fix assert when loading files and the global enconding setting is set to default (ticket #305)
  • Fix assert when closing the application during long compilation
  • Memory dump window has wrong proportion on windows (ticket #557, thanks bluehazzard)
  • Fix assert when executing Build -> Errors -> Next error and there is no error in the list
  • Fix the highlight language button in the status bar
  • Fix assert when pressing the auto-detect button in the compiler settings
  • Always disable symbol browser in such builds to prevent crashes (ticket #225)
  • Fix compilation with latest wx master (thanks blauzahn)
  • Fix assert on startup in IncrementalSearch (ticket #405, thanks bluehazzard)
  • Fix assert due to the same labeled property added to the wxSmith’s property grid for wxStdDialogButtonSizer
  • Fix some alignment asserts reported for some of the dialogs
  • Fix assert when calling wxSetWorkingDirectory with an empty path
  • Fix two asserts in the AVR wizard
  • Fix lots of asserts when batch building (there are some left though)
  • Fix assert when the current target uses “No compiler” (fixes ticket #315)
  • Fix asserts when wizard icons are no 32×32 pixels big (fixes ticket #314)
  • Fix an assert in ToDo plugin (thanks blauzahn)
  • Fix assert when deleting a compiler
  • Fix assert when the search mask in the Find/Replace dialog is empty (fix formatting of the code around)
  • Fix the ValueTooltip autosizing. It was disabled for wx29, but should work in all wx3.0, because my patch should be in them

Summary, for download

Download the full changelog here: http://sourceforge.net/projects/codeblocks/files/Binaries/17.12/changelog

Не хватает нужных компонентов (компилятора, отладчика, библиотек)

Нужно понимать, что CodeBlocks — это просто каркас для подключения различных инструментов. Если вы просто скачаете пустой CodeBlocks с официального сайта и попытаетесь писать и отлаживать программу, то у вас ничего не получится. CodeBlocks не сможет запустить ни комплятор, ни отладчик. Все это нужно скачивать и устанавливать отдельно.

Но тут будет новая проблема — проблема выбора. CodeBlocks поддерживает все существующие компиляторы Си, какой выбрать? То же относится к любому другому инструментарию: отладчикам, профайлерам, плагинам и т.д.

Именно поэтому я и сделал сборку Си-экспресс, чтобы можно было сразу распаковать и работать. Все нужные компоненты уже установлены. Если вы точно знаете, что вам нужен другой компонент, то просто найдите и замените его на тот, который вам нужен.

Решение: Скачайте сборку Си-экспресс.

Install Instructions

  • Nightly Build (frequently updated: 22 May 2010)
    • Those are the 3 things we need to install and start up a nigthly build. All 3 of them are available in their own zip file, zipped by using the free and excellent 7-zip (www.7-zip.org). Just get your copy of 7-zip for unzipping.
    • Final steps :
      • unzip the CB nightly in some directory
      • unzip both dll’s : requirement : they need to be in your PATH, most easiest is to unzip both of them into the same directory where you unzipped the nightly, so they reside next to the codeblocks.exe .
    • By performing these simple steps you nightly is ready to roll.
  • Build from source
    • There is a detailed description on the codeblocks wiki related to your os

Installation instructions / Howto for Debian/Ubuntu/Mint

Download and install Debian package for D compiler ] (32bit) or ] (64bit).

Then, i.e. after installing dmd2, install the «codeblocks» debian package (No download necessary; it’s in the standard repositories, so «sudo apt-get install codeblocks» will do fine).

Start code:blocks and go to «Settings»->»Compiler».

    • Click «Compiler Settings» and change the sub-tab to «Other options». Then enter «-m32» in the edit field (or «-m64» if you are running on amd64 (x86_64). If you are unsure, enter «uname -p» in a terminal to find out)
    • Next, click on the «Linker Settings» tab and add «phobos2» into the «link libraries» (Do not change/edit/delete the «m» and «pthread» entries and do not enter libphobos2 or similar as suggested by some online resources but simply «phobos2»).
    • Next, click on the «Search directories» tab and then on «Compiler» and add the two entries «/usr/include/dmd/druntime/import» and «/usr/include/dmd/phobos».
    • Next, click the «Linker» sub tab and add or edit «/usr/lib/i386-linux-gnu» (or «/usr/lib/x86_64-linux-gnu» for the 64bit version).
    • Next, click on the «Toolchain executables» tab and enter or change the «Compilers installation directory» to «/usr».
    • Finally, adapt the edit field under «Program files» for «Linker for dynamic libs» to your needs, typically to «gcc -m32 -lrt» (again, replace «-m32» with «-m64» for a 64bit version).

That’s it. Now, you can create a D project and it should compile/link fine. 😉

Usage¶

This section discusses how to use different syntax highlighting features with Pygments – the default highlighter – so they don’t apply when using a JavaScript syntax highlighter.

Specifying the language

Code blocks must be enclosed with two separate lines containing three backticks. To add code highlighting to those blocks, add the language short name directly after the opening block. See the list of available lexers to find the short name for a given language.

Example:

Result:

Adding annotations

Source · Experimental · Insiders only

Annotations offer a comfortable and friendly way to attach explanations to arbitrary sections of code blocks by adding simple markers within block/inline comments that refer to items of a list following the code block, i.e. , , etc. Material for MkDocs detaches the list from the flow of the document, injects the content of each list item into a tooltip, and links each list marker to the corresponding tooltip.

In order to opt-in to annotation support, a slightly different syntax is required – just add the respective language short code and the class, after the three backticks. Alternatively, if you want to enable annotations globally, add the following to :

Note that annotations can be placed anywhere in a code block where a comment for the language can be placed, which for JavaScript is and , for Yaml , etc.

Example:

Result:

  1. Annotations can contain arbitrary content which is shown when the marker is focussed, including any kind of formatting, links, admonitions, details, and even diagrams:

    Tip: You can use Tab to navigate annotations.

  2. Annotations can be placed anywhere in a code block were a comment for the underlying language can be placed.

    Python JavaScript Lua

    We’re working on a solution for languages without comments, which will be available shortly.

  3. Of course, this can be combined with , highlighting and all other code block related features.

Annotations require syntax highlighting with – they’re currently not compatible with other JavaScript-based syntax highlighters. Support may be added later on.

Adding line numbers

Line numbers can be added to a code block by using the option directly after the short name, whereas represents the starting line number. A code block can start from a line number other than , which allows splitting large code blocks for readability.

Example:

Result:

1
2
3
4
5

Highlighting specific lines

Specific lines can be highlighted by passing the line numbers to the argument placed right after the language short name. Note that line counts start at , regardless of the starting line number specified as part of .

Example:

Result:

Line ranges can also be used for conveniently specifying multiple lines.

Example:

Result:

Highlighting inline code blocks

When is enabled, inline code blocks can be highlighted by prefixing them with a shebang-like sequence, i.e. , directly followed by the language short name.

Example:

Result:

The function is used to generate a sequence of numbers.

Adding keyboard keys

When is enabled, keyboard keys can be rendered with a simple syntax. Consult the Python Markdown Extensions documentation to learn about all available key codes.

Example:

Result:

Ctrl+Alt+Del

Embedding external files

Also known as transcludes or file transclusion in MultiMarkdown.

When is enabled, content from other files can be embedded, which is especially useful to reference and embed the contents of source files directly into your project documentation.

Example:

Result:

Note that is not limited to code blocks, but can be used anywhere from a document to move repeating content to separate files, which is also explained in the official documentation.

Misc

  • Support for new lexers: BibTeX, Coffee, IHex, JavaScript, Proty, Windows-Registry files, SREC, TeHEX
  • Editor: Add menu commands for searching the selected text without opening the find-replace dialog
  • Editor: Mark editor tabs of read-only files with an icon
  • New tool: CbLauncher to launch C::B under Windows using modified application path’s variables (for experts)
  • New version of crash handler (exchndl): More resiliency against truncated PE files and log message when loading symbols
  • New command line option –user-data-dir= to specify an alternative directory for user settings and user installed plugins
  • ‘Add file(s)’ doesn’t account for all generated files for all target’s compilers
  • Assign CRTL+P to the “Print” command by default
  • Save notebook layout in project- and workspace-layout files (and load it from there)
  • Save tab-layout of the files belonging to the project in a project-layout file; save all tabs in a workspace-layout file
  • Better multi monitor support for non windows system
  • Introduce new API’s to SDK for convenience
  • Scripting: Expose several new API’s
  • Add versioning to project and workspace layout files
  • Re-organised editor settings to make the grouping more logical
  • Removed obsolete google code search, added StackOverflow and CodeProject search
  • File properties: Count statistics language independantly
  • SmartIndent: Handle (some) smart indentation for embedded languages (PHP, JavaScript, etc) within HTML
  • Fixed plugin installation errors under Windows
  • Make the check for externally modified files configurable, useful for slow network shares
  • Ignore VCS (SVN, GIT, Mercurial…) folders when recursively adding files
  • Avoid conflicts in portable mode
  • Allow to clean a single object file within a project tree from project manager
  • Updated C++ lexer keywords for more correctness
  • Linux: Use standard-conform paths for config- and data-folders
  • Support for Windows 10
  • Many UI improvements
  • Many other bug-fixes and improvements

Summary, for download

Download the short (this) changelog here: http://sourceforge.net/projects/codeblocks/files/Binaries/16.01/changelog

Download the full changelog here: http://sourceforge.net/projects/codeblocks/files/Binaries/16.01/changelog_full

Debugger

  • Fix issue with watches window column auto-sizing
  • Better auto-sizing in the CPU registers dialog
  • Fix infinite loop when parsing watches generated by Python pretty printers
  • Fix parsing gdb locals/arguments when the values contain escaped double and single quotes
  • Add support for executing additional shell commands when using GDB
  • Add flag to enable/disable loading of .gdbinit
  • Expand macros in the additional GDB commands
  • Improve logging, while trying to interrupt the debuggee
  • Try to detect when the terminal couldn’t be started and print an error instead of entering annoying loop
  • Determine console pid from ps-command, returns either the same as we have now (e.g. xterm) or the pid of the sleep-command and works therefore also with newer gnome-terminals

Examples

There’s nothing like learning by example! Here are a few contrived examples of things you can accomplish
with code blocks.

HTTP

The object (representing the HTTP user agent belonging to the currently running bot) has methods for all of the
common HTTP methods (GET, POST, etc).

Response Validation

Validators (similar to the Validation Rules that you can use with ordinary
HTTP steps) call a JavaScript function to examine the response and return true if it’s valid, or false if it’s not.

Validator functions can be normal JavaScript functions or the newer ES2016+ arrow functions.

You can specify multiple validator functions for a single response.

Response Capturing

Often, the server will send you some data that you need to save and use later in your script.

In code blocks, you can capture these from the response and store them using a validator function. Note that we use
the for capturing too; there is no separate property
for Capturing Rules as there is with ordinary HTTP steps.

Simply call anywhere in your code block to set a bot-scoped variable. These special
variables are
available for the bot’s entire iteration of the Loadster script, unlike ordinary JavaScript variables
which are scoped to the individual code block and may not be available to subsequent steps.

Looping and conditionals can be done with all the usual JavaScript language constructs. This trivial example shows
looping with a loop, the modulus function, an statement, and setting and getting special bot
variables with variable interpolation of .

Code-Completion

  • Fix crash when showing the call tip
  • Fix doxygen spelling in the settings panel
  • Make the size of toolbar controls configurable in the settings (ticket #303)
  • Fix an issue that Code Completion list got hidden after shown up
  • Fix assert on generate ctor implementation
  • Fix possible inconsistency caused by bad usage of cbAssert — the expression must not have side effects, because in some builds they might not be executed
  • Fix default colours for code call tips (thanks darmar)
  • Send proper events for ‘Autoselect single match’
  • Automatically test for doxygen document. (thanks White-Tiger)
  • Fix a bug that we have forget adding the doxygen documents for macro
  • Fix a endless loop crash bug when parsing C99 designated initializer
  • Fix ticket #278 and ticket #393 (thanks White-Tiger)
  • Fix ticket #351
  • Try to fix issue #14 for real this time (high memory consumption due to recursive symbolic links)
  • show an error to the user if expression could not be resolved
  • Fix a parsing std namespace bug.
Добавить комментарий

Ваш адрес email не будет опубликован. Обязательные поля помечены *

Adblock
detector