<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.codeblocks.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Ollydbg</id>
	<title>Code::Blocks - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.codeblocks.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Ollydbg"/>
	<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php/Special:Contributions/Ollydbg"/>
	<updated>2026-06-05T08:55:47Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.35.0</generator>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=Installing_Code::Blocks_from_source_on_Windows&amp;diff=9883</id>
		<title>Installing Code::Blocks from source on Windows</title>
		<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php?title=Installing_Code::Blocks_from_source_on_Windows&amp;diff=9883"/>
		<updated>2025-09-25T07:25:08Z</updated>

		<summary type="html">&lt;p&gt;Ollydbg: the new cb_cpp_std global variable&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Installing Code::Blocks]]&lt;br /&gt;
[[Category:Installing Code::Blocks from source]]&lt;br /&gt;
== Overview ==&lt;br /&gt;
&lt;br /&gt;
=== Self-Hosting ===&lt;br /&gt;
&lt;br /&gt;
The build process described on this page is a kind of &amp;quot;[https://en.wikipedia.org/wiki/Self-hosting Self-Hosting].&amp;quot;  You use an existing version of Code::Blocks to compile the next version.  When that version is proven to function correctly it is used to compile the next, and so on.&lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
&lt;br /&gt;
=== Bootstrap Code::Blocks ===&lt;br /&gt;
&lt;br /&gt;
A properly working Code::Blocks is required to compile the next SVN version.  A [[Installing_Code::Blocks_nightly_build_on_Windows | Nightly Build]] is a good candidate to use.  It will be paired with a MinGW compiler in the next item.&lt;br /&gt;
&lt;br /&gt;
=== MinGW Compiler ===&lt;br /&gt;
&lt;br /&gt;
At the present time, Code::Blocks only compiles successfully with a MinGW compiler toolchain on Windows. You will need a complete, working [[MinGW installation]].&lt;br /&gt;
&lt;br /&gt;
=== wxWidgets ===&lt;br /&gt;
&lt;br /&gt;
wxWidgets is the &amp;quot;[https://en.wikipedia.org/wiki/Graphical_user_interface graphical user interface toolkit]&amp;quot; that Code::Blocks is built on top of.&lt;br /&gt;
&lt;br /&gt;
For information about wxWidgets, see their official site ➡ [https://www.wxwidgets.org/ wxWidgets.org]&lt;br /&gt;
&lt;br /&gt;
You can use any version of wxWidgets &amp;gt;= 3.1.3, but the latest stable release will work better. At this moment it is wx3.2.4, download it in [https://github.com/wxWidgets/wxWidgets/releases/download/v3.2.4/wxWidgets-3.2.4.zip zip] or [https://github.com/wxWidgets/wxWidgets/releases/download/v3.2.4/wxWidgets-3.2.4.7z 7z] format.&lt;br /&gt;
&lt;br /&gt;
=== Utilities ===&lt;br /&gt;
&lt;br /&gt;
ZIP and SVN functions are not required to run Code::Blocks but ZIP is required to build it and a SVN client is strongly recommended but not absolutely necessary.&lt;br /&gt;
&lt;br /&gt;
==== ZIP ====&lt;br /&gt;
&lt;br /&gt;
You will need a command-line &amp;lt;tt&amp;gt;zip.exe&amp;lt;/tt&amp;gt; program. Some toolchains include it, if yours does not then the recommended one can be found on the [[MinGW installation#Development Tools|Development Tools]] page. You do ''not'' need WinZip.&lt;br /&gt;
&lt;br /&gt;
Make sure &amp;lt;tt&amp;gt;zip.exe&amp;lt;/tt&amp;gt; is in your [https://en.wikipedia.org/wiki/PATH_(variable) PATH] as it is used both during the compilation in your current version of Code::Blocks and also by the &amp;lt;tt&amp;gt;update.bat&amp;lt;/tt&amp;gt; script.&lt;br /&gt;
&lt;br /&gt;
==== SVN ====&lt;br /&gt;
&lt;br /&gt;
It is recommended, but not required, that you install a SVN client. If you are a absolute beginner in programming skip this part and go to [https://wiki.codeblocks.org/index.php/Installing_Code::Blocks_from_source_on_Windows#Code::Blocks_Sources Code::Blocks Sources].  An example would be [http://tortoisesvn.net/downloads TortoiseSVN] if you would like an all-in-one SVN solution. ''TortoiseSVN'' includes optional command-line client tools, which you should install as they provide a command-line SVN client.  Choosing to install the command-line client tools will automatically add them to your PATH.  However, if you do not wish to have the ''TortoiseSVN'' Explorer extensions in your right-click context menu or just don't feel a need for a graphical client in particular then you can use another: [http://subversion.apache.org/packages.html SVN command-line client] equally well.  Just make sure that whichever client you install has its executable in your PATH.&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;autorevision&amp;lt;/tt&amp;gt; tool which is used during the build of Code::Blocks makes use of the &amp;lt;tt&amp;gt;svn.exe&amp;lt;/tt&amp;gt; binary if it is available (in your PATH) and also uses the SVN meta-data generated by a SVN checkout.  If you have both a SVN command-line client in your PATH, and the meta-data, the resulting build of Code::Blocks will show the revision on the loading splash window, the Start here page, and in the About dialog (shown here in the About dialog, indicated by the red arrow):&lt;br /&gt;
&lt;br /&gt;
[[Image:About_SVN10627.png]]&lt;br /&gt;
&lt;br /&gt;
=== Code::Blocks Sources ===&lt;br /&gt;
&lt;br /&gt;
If you don't wish to use a SVN utility, you can download a snapshot from [https://sourceforge.net/p/codeblocks/code/HEAD/tree/ here] clicking on &amp;quot;Download Snapshot&amp;quot;. Now you can go on to the [https://wiki.codeblocks.org/index.php/Installing_Code::Blocks_from_source_on_Windows#Build_wxWidgets_Support_Library next section]&lt;br /&gt;
&lt;br /&gt;
The last item is to acquire the Code::Blocks source code.  Follow the appropriate instructions for whether you have a graphical or command line SVN client.&lt;br /&gt;
&lt;br /&gt;
==== TortoiseSVN ====&lt;br /&gt;
&lt;br /&gt;
If you prefer a graphical SVN client you can use ''TortoiseSVN'' - make a directory where you want to store the sources, right-click on the directory, and select &amp;quot;'''SVN Checkout''',&amp;quot; and as shown you will get a checkout dialog:&lt;br /&gt;
&lt;br /&gt;
[[Image:Tor_SVN.png]]&lt;br /&gt;
&lt;br /&gt;
In the URL of the repository box, enter &amp;lt;tt&amp;gt;&amp;lt;nowiki&amp;gt;svn://svn.code.sf.net/p/codeblocks/code/trunk&amp;lt;/nowiki&amp;gt;&amp;lt;/tt&amp;gt; and verify the checkout directory is where you would like it to be.  The example given here is &amp;quot;''C:\cb_svn''&amp;quot; - once satisfied with the arguments click the OK button to process the checkout.&lt;br /&gt;
&lt;br /&gt;
==== Command-Line SVN ====&lt;br /&gt;
&lt;br /&gt;
If you do not wish to use a graphical SVN client then a command-line equivalent to the above is to use the &amp;lt;tt&amp;gt;svn&amp;lt;/tt&amp;gt; command - open a command prompt, make a directory, change into that directory, and then checkout a copy of the repository:&lt;br /&gt;
&lt;br /&gt;
 mkdir codeblocks-head&lt;br /&gt;
 cd codeblocks-head&lt;br /&gt;
 svn checkout &amp;lt;nowiki&amp;gt;svn://svn.code.sf.net/p/codeblocks/code/trunk&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Build wxWidgets Support Library ==&lt;br /&gt;
&lt;br /&gt;
=== Configure Build Options ===&lt;br /&gt;
&lt;br /&gt;
Please note that support has been removed for wxWidgets &amp;lt; 3.1.3 because it lacks Direct2D support.&lt;br /&gt;
&lt;br /&gt;
Unpack the wxWidgets zip file to a directory of your choice, open a command-line prompt, and navigate to the directory &amp;lt;tt&amp;gt;build/msw&amp;lt;/tt&amp;gt; inside the wxWidgets directory.  In this directory there is a text file named &amp;lt;tt&amp;gt;config.gcc&amp;lt;/tt&amp;gt; which you can edit with notepad to control the build options.  There are two lines to note, &amp;lt;tt&amp;gt;CFLAGS ?=&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;CXXFLAGS ?=&amp;lt;/tt&amp;gt;.  The options given here will go in either or both of those lines.&lt;br /&gt;
&lt;br /&gt;
If your linker runs out of memory while building use:&lt;br /&gt;
&lt;br /&gt;
 -fno-keep-inline-dllexport&lt;br /&gt;
&lt;br /&gt;
Some versions of the MinGW Windows Runtime Library will cause an error during compilation. See [https://sourceforge.net/p/tdm-gcc/bugs/269/ Bug #269]. If this is the case with the toolchain you are using then try this workaround:&lt;br /&gt;
&lt;br /&gt;
 -D_WIN32_IE=0x0603&lt;br /&gt;
&lt;br /&gt;
To silence warnings that can significantly slow down the compilation process:&lt;br /&gt;
&lt;br /&gt;
 -Wno-unused-local-typedefs&lt;br /&gt;
&lt;br /&gt;
and&lt;br /&gt;
&lt;br /&gt;
 -Wno-deprecated-declarations&lt;br /&gt;
&lt;br /&gt;
All of these options apply to both &amp;lt;tt&amp;gt;CFLAGS&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;CXXFLAGS&amp;lt;/tt&amp;gt; so the two lines containing all the options would look like this:&lt;br /&gt;
&lt;br /&gt;
  CFLAGS ?= -fno-keep-inline-dllexport -D_WIN32_IE=0x0603 -Wno-unused-local-typedefs -Wno-deprecated-declarations&lt;br /&gt;
&lt;br /&gt;
  CXXFLAGS ?= -fno-keep-inline-dllexport -D_WIN32_IE=0x0603 -Wno-unused-local-typedefs -Wno-deprecated-declarations&lt;br /&gt;
&lt;br /&gt;
=== Build wxWidgets Library ===&lt;br /&gt;
&lt;br /&gt;
First you must edit include\wx\msw\setup.h; locate a line containing&lt;br /&gt;
&lt;br /&gt;
 #define wxUSE_GRAPHICS_DIRECT2D 0&lt;br /&gt;
&lt;br /&gt;
and change it to&lt;br /&gt;
&lt;br /&gt;
 #define wxUSE_GRAPHICS_DIRECT2D 1&lt;br /&gt;
&lt;br /&gt;
If you can not find setup.h please copy setup0.h to setup.h&lt;br /&gt;
&lt;br /&gt;
At a command-line, inside the &amp;lt;tt&amp;gt;build/msw&amp;lt;/tt&amp;gt; directory, use the following commands to build wxWidgets:&lt;br /&gt;
&lt;br /&gt;
 mingw32-make -f makefile.gcc SHARED=1 MONOLITHIC=1 BUILD=release UNICODE=1 clean&lt;br /&gt;
 mingw32-make -f makefile.gcc SHARED=1 MONOLITHIC=1 BUILD=release UNICODE=1&lt;br /&gt;
&lt;br /&gt;
or, if you want to build using multiple threads:&lt;br /&gt;
&lt;br /&gt;
 mingw32-make -f makefile.gcc     SHARED=1 MONOLITHIC=1 BUILD=release UNICODE=1 clean&lt;br /&gt;
 mingw32-make -f makefile.gcc     SHARED=1 MONOLITHIC=1 BUILD=release UNICODE=1 setup_h&lt;br /&gt;
 mingw32-make -f makefile.gcc -j8 SHARED=1 MONOLITHIC=1 BUILD=release UNICODE=1&lt;br /&gt;
&lt;br /&gt;
If your compiler toolchain is not in your PATH (it should be on a development machine), then put it in your path first:&lt;br /&gt;
&lt;br /&gt;
 set PATH=X:\path\to\toolchain\bin;%PATH%&lt;br /&gt;
&lt;br /&gt;
Where &amp;quot;'''''X'''''&amp;quot; is the drive letter, and &amp;quot;'''''\path\to\toolchain\bin'''''&amp;quot; is where your toolchain is located. &lt;br /&gt;
&lt;br /&gt;
If your compilation fails for any reason then make sure to run the ''clean'' line before trying again.&lt;br /&gt;
&lt;br /&gt;
== Build Code::Blocks ==&lt;br /&gt;
&lt;br /&gt;
=== Self-Hosting ===&lt;br /&gt;
&lt;br /&gt;
All the preparation work is now complete and we can actually perform a self-hosting compile of the next Code::Blocks with our current one.  If you do not make any changes to your non-Code::Blocks prepared items, like your MinGW compiler version, and the wxWidgets library, then when building subsequent SVN versions of Code::Blocks you can keep all the preparation from a previous build and start with this section.  When restarting from this point you can refresh your current Code::Blocks local source with ''TortoiseSVN''.  Right-click on your local source directory, go to &amp;quot;TortoiseSVN&amp;quot; in the context-menu, then choose &amp;quot;update to revision.&amp;quot;  The &amp;quot;head&amp;quot; is always the latest version.  If you are using a command-line SVN, just run &amp;lt;tt&amp;gt;svn update&amp;lt;/tt&amp;gt; in the root of your local source directory.&lt;br /&gt;
&lt;br /&gt;
=== Open project ===&lt;br /&gt;
This guide uses wx3.1, you can use wx3.2 just replacing 31 with 32 where needed.&lt;br /&gt;
&lt;br /&gt;
Open the project file '''CodeBlocks_wx31.cbp''' (or '''CodeBlocks_wx31_64.cbp''' for 64-bit mode). &lt;br /&gt;
*You will be prompted to define the global variable $(#wx31). In the base field, enter the root of the location where you unpacked wxWidgets.&lt;br /&gt;
&lt;br /&gt;
*You will also be prompted to enter the global variable '''cb_release_type'''. Here you can add compiler optimization or debug-flags. Enter '''-g''' in the '''base''' field as a default or any other options you require for your specific needs.&lt;br /&gt;
&lt;br /&gt;
[[Image:Global_Variables.png]]&lt;br /&gt;
&lt;br /&gt;
[[Image:Global_wx.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you would like to build  Code::Blocks against with the wx 3.3.1+ library, you need to set another global variable named '''cb_cpp_std''', and currently, you should set it to '''-std=gnu++11'''&lt;br /&gt;
&lt;br /&gt;
=== Prevent unnecessary warnings ===&lt;br /&gt;
&lt;br /&gt;
Building Code::Blocks against the wxWidgets library will generate an excessive amount of warnings during the compilation. This can significantly impact the time it takes to compile both the main project and the contributors workspace as each warning has to be printed to the build log.  To silence these warnings, go to Compiler Settings:&lt;br /&gt;
&lt;br /&gt;
[[Image:Compiler_Settings.png]]&lt;br /&gt;
&lt;br /&gt;
And under the &amp;quot;Compiler settings&amp;quot; tab (red arrow), &amp;quot;Other compiler options&amp;quot; sub-tab (green arrow), enter &amp;quot;&amp;lt;tt&amp;gt;-Wno-unused-local-typedefs&amp;lt;/tt&amp;gt;&amp;quot; (blue arrow), and you may also add &amp;quot;&amp;lt;tt&amp;gt;-Wno-deprecated-declarations&amp;lt;/tt&amp;gt;&amp;quot; on its own line here too.&lt;br /&gt;
&lt;br /&gt;
[[Image:Unused_Local_Typedefs.png]]&lt;br /&gt;
&lt;br /&gt;
=== Compile project ===&lt;br /&gt;
Make sure that &amp;quot;All&amp;quot; is selected as the target (blue arrow), and then click the Build icon (red arrow).&lt;br /&gt;
&lt;br /&gt;
[[Image:Compile_All.png]]&lt;br /&gt;
&lt;br /&gt;
If everything builds correctly your build messages should end with no errors.&lt;br /&gt;
&lt;br /&gt;
[[Image:Build_Log.png]]&lt;br /&gt;
&lt;br /&gt;
=== Copy wxWidgets support DLL ===&lt;br /&gt;
After the compilation has finished, copy &amp;lt;tt&amp;gt;lib\gcc_dll\wxmsw31u_gcc_custom.dll&amp;lt;/tt&amp;gt; from the wxWidgets directory to the &amp;lt;tt&amp;gt;devel31&amp;lt;/tt&amp;gt; (or &amp;lt;tt&amp;gt;devel31_64&amp;lt;/tt&amp;gt; for 64-bit) directory in the Code::Blocks &amp;lt;tt&amp;gt;src&amp;lt;/tt&amp;gt; directory. If you are confident enough you can copy it instead to System32 (on 32 bits Windows) or SysWOW64 (on 64 bits Windows).&lt;br /&gt;
&lt;br /&gt;
[[Image:Update_Devel_Output.png]]&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;tt&amp;gt;devel31&amp;lt;/tt&amp;gt; directory is created by compiling the Code::Blocks project in Code::Blocks.&lt;br /&gt;
&lt;br /&gt;
=== Generate Production Output ===&lt;br /&gt;
Move to the &amp;lt;tt&amp;gt;src&amp;lt;/tt&amp;gt; directory) and run &amp;lt;tt&amp;gt;update_31.bat&amp;lt;/tt&amp;gt;. This will pack the resource files and copy the executables, libraries, and plugins to the &amp;lt;tt&amp;gt;output_31&amp;lt;/tt&amp;gt; directory. It will also create the &amp;lt;tt&amp;gt;output_31&amp;lt;/tt&amp;gt; directory if it does not exist. If you are compiling the 64-bit version please call &amp;lt;tt&amp;gt;update_31_64.bat&amp;lt;/tt&amp;gt; and use folders &amp;lt;tt&amp;gt;devel_31_64&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;output_31_64&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
[[Image:Update_bat.png]]&lt;br /&gt;
&lt;br /&gt;
The stripped (&amp;quot;production&amp;quot;) executable is found in &amp;lt;tt&amp;gt;output_31&amp;lt;/tt&amp;gt; directory together with all libraries and data files. If you want a version with debug symbols instead (caution: huge size!), use the one found in the &amp;lt;tt&amp;gt;devel_31&amp;lt;/tt&amp;gt; directory.&lt;br /&gt;
&lt;br /&gt;
[[Image:Update_Output.png]]&lt;br /&gt;
&lt;br /&gt;
=== Compile contributed (or your own) plugins ===&lt;br /&gt;
&lt;br /&gt;
The workspace file '''ContribPlugins_wx31.workspace''' (or '''ContribPlugins_wx31_64.workspace''' for 64-bit compilation) contains the project files for all contributed plugins. Open that workspace and compile the plugins which you would like to use (or select &amp;quot;Build workspace&amp;quot; from the Build menu if you want them all).&lt;br /&gt;
&lt;br /&gt;
The NassiShneiderman plugin has a dependency on the &amp;quot;[http://www.boost.org/ Boost]&amp;quot; library. If you do not wish to use that plugin and therefore not need the library, just right-click on that plugin and choose &amp;quot;close project.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Don't forget to run &amp;lt;tt&amp;gt;update_31.bat&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;update_31_64.bat&amp;lt;/tt&amp;gt; again after building the contributed plugins.&lt;br /&gt;
&lt;br /&gt;
[[Image:Build_Workspace.png]]&lt;br /&gt;
&lt;br /&gt;
== Install Code::Blocks ==&lt;br /&gt;
&lt;br /&gt;
Copy or move the &amp;lt;tt&amp;gt;output_31&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;output_31_64&amp;lt;/tt&amp;gt; directory to where you want Code::Blocks to reside. Then you probably want to rename the directory to something else. You can also optionally right-click on &amp;lt;tt&amp;gt;codeblocks.exe&amp;lt;/tt&amp;gt; and choose &amp;quot;Create shortcut&amp;quot; and then rename that shortcut to your liking and move it to another location such as your desktop for easy access.&lt;br /&gt;
&lt;br /&gt;
If you want to run Code::Blocks on a machine without your compiler toolchain being in the PATH then you will likely have to include, in the same directory as the &amp;lt;tt&amp;gt;codeblocks.exe&amp;lt;/tt&amp;gt; is fine, support .dll files from your compiler toolchain. The easiest way to determine the required files is to not have your compiler toolchain in your PATH and repeatedly run Code::Blocks and copy over each .dll it says is missing until all have been found.&lt;/div&gt;</summary>
		<author><name>Ollydbg</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=Developer_documentation&amp;diff=9841</id>
		<title>Developer documentation</title>
		<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php?title=Developer_documentation&amp;diff=9841"/>
		<updated>2025-02-12T09:26:41Z</updated>

		<summary type="html">&lt;p&gt;Ollydbg: /* Debugging C::B */ distribute separate debug files&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Code::Blocks Documentation]]&lt;br /&gt;
[[Category:Developer Documentation]]&lt;br /&gt;
{{Layout_box2|1=&lt;br /&gt;
'''Official Code repository Subversion'''&amp;lt;br/&amp;gt;&lt;br /&gt;
* Web-interface by ViewVC: http://sourceforge.net/p/codeblocks/code/log/&lt;br /&gt;
* Subversion URL: &amp;lt;nowiki&amp;gt;svn://svn.code.sf.net/p/codeblocks/code/trunk&amp;lt;/nowiki&amp;gt; or &amp;lt;nowiki&amp;gt;http://svn.code.sf.net/p/codeblocks/code/trunk&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Mirror by Carsten Arnholm''' (Read-only; )&lt;br /&gt;
* Web-interface: https://github.com/arnholm/codeblocks_sfmirror&lt;br /&gt;
* Git URL: see the above page.&lt;br /&gt;
&lt;br /&gt;
'''Mirror by biplab''' (Read-only; refreshed every 10 minutes. As 2022-09-12, it looks dead.)&lt;br /&gt;
* Subversion URL: &amp;lt;nowiki&amp;gt;svn://cb.biplab.in/codeblocks/trunk&amp;lt;/nowiki&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
* Web-interface: http://cb.biplab.in/websvn/&lt;br /&gt;
* Git URL: git://cb.biplab.in/codeblocks.git&lt;br /&gt;
* Web-interface:http://cb.biplab.in/cgit/&lt;br /&gt;
&lt;br /&gt;
'''Mirror by Jens''' (Read-only; refreshed every 10 minutes. As 2022-09-12, it looks dead.)&lt;br /&gt;
* Web-interface: http://cgit.jenslody.de/&lt;br /&gt;
* Git URL: git://jenslody.de/git/codeblocks&lt;br /&gt;
* the above Web-interface link contains many other mirrors such as wxWidgets trunk, git mirror, and git mirror of codeblocks.github&lt;br /&gt;
&lt;br /&gt;
'''Mirror by Obf''' (Read-only; refreshed manually. As 2022-09-12, it looks dead.)&lt;br /&gt;
* Web-interface: https://github.com/obfuscated/codeblocks_sf&lt;br /&gt;
* Git URL: see the above page.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Articles for Code::Blocks developers.'''&lt;br /&gt;
&lt;br /&gt;
* '''&amp;lt;u&amp;gt;Documentation&amp;lt;/u&amp;gt;'''&lt;br /&gt;
:[https://www.codeblocks.org/manual.shtml User's manual] in various formats and languages.&lt;br /&gt;
:Browse SDK documentation at http://alpha0010.github.io/cb-docs/ as html.&lt;br /&gt;
&lt;br /&gt;
* Compile the complete Code::Blocks from sources on '''[[Installing Code::Blocks from source on Windows|Windows]]''' and '''[[Installing Code::Blocks from source on Linux|Linux]]'''&lt;br /&gt;
&lt;br /&gt;
* '''[[Compile Code::Blocks plugins based on a nightly]]''' without the need to compile wxWidgets or the Code::Blocks core.&lt;br /&gt;
&lt;br /&gt;
:Code::Blocks uses Launchpad to coordinate translation efforts.&lt;br /&gt;
* '''[http://launchpad.net/products/codeblocks/ Old Translation page]'''&lt;br /&gt;
* '''[http://launchpad.net/products/codeblocks-gd/ New Translation page]'''&lt;br /&gt;
:See also [https://forums.codeblocks.org/index.php/topic,1022.msg159075.html#msg159075 Code::Blocks' translation]&lt;br /&gt;
&lt;br /&gt;
* '''[[Coding style]]'''&lt;br /&gt;
:The source code formatting style used in the Code::Blocks' source.&lt;br /&gt;
&lt;br /&gt;
* '''[[Creating a custom lexer for Code::Blocks editor]]'''&lt;br /&gt;
:How to add support for new syntax lighting schemes.&lt;br /&gt;
&lt;br /&gt;
* '''[[Creating a patch to submit (Patch Tracker)]]'''&lt;br /&gt;
:Creating a diff file and then submitting it to the patch tracker.&lt;br /&gt;
&lt;br /&gt;
* '''[[Unicode Standards]]'''&lt;br /&gt;
:Information about unicode standards and how unicode is handled in Code::Blocks' source code.&lt;br /&gt;
&lt;br /&gt;
* '''[[Various development tips]]'''&lt;br /&gt;
:List of various development tips for Code::Blocks.&lt;br /&gt;
&lt;br /&gt;
* '''[[Scripting Code::Blocks]]'''&lt;br /&gt;
:Information about scripting Code::Blocks with [http://www.squirrel-lang.org/ Squirrel].&lt;br /&gt;
&lt;br /&gt;
* '''[[A short overview about Code::Blocks architecture]]'''&lt;br /&gt;
:Information about the architecture of Code::Blocks.&lt;br /&gt;
&lt;br /&gt;
* '''[[Code::Blocks SDK events]]'''&lt;br /&gt;
:Information about the Code::Blocks SDK events and how to work with them.&lt;br /&gt;
&lt;br /&gt;
* '''[[File formats description]]'''&lt;br /&gt;
:Description of the format of each file Code::Blocks produces.&lt;br /&gt;
&lt;br /&gt;
* '''[[Version control]]'''&lt;br /&gt;
:Tips and trick for working with our version control system.&lt;br /&gt;
&lt;br /&gt;
== Plug-In development ==&lt;br /&gt;
&lt;br /&gt;
* [[Plugin structure of C::B]]&lt;br /&gt;
* [[Creating a simple &amp;quot;Hello World&amp;quot; plugin]]&lt;br /&gt;
* [[Creating a Plug-in which modifies CB's Menus]]&lt;br /&gt;
* [[Creating a plugin that actually does something]]&lt;br /&gt;
* [[Linking the plugin to a Nightly Build]]&lt;br /&gt;
* [[Managing Plug-in Resources]]&lt;br /&gt;
&lt;br /&gt;
* [[Research on doing a Plug-in for embedded help in CB]]&lt;br /&gt;
&lt;br /&gt;
* [[wxSmith extensions]]&lt;br /&gt;
* [[Code::Completion Rewrite]] and [[Code Completion plugin]] and [[Code Completion Design]]&lt;br /&gt;
&lt;br /&gt;
== Scripting ==&lt;br /&gt;
&lt;br /&gt;
Using scripting to extend Code::Blocks' functionality&lt;br /&gt;
&lt;br /&gt;
* [[Wizard scripts|Creating a new project wizard]]&lt;br /&gt;
&lt;br /&gt;
== Developing C::B with Git ==&lt;br /&gt;
For devs who want to use Git to develop C::B, here are some steps to follow, especially you need to correctly set the SVN and GIT properties so that you can make your local git commits back to the official SVN repo. See [https://forums.codeblocks.org/index.php/topic,16096.msg128152.html#msg128152 Re: Read-only Git, SVN Repo for Code::Blocks], also stahta01 has a nice instruction about how to use git, see [https://forums.codeblocks.org/index.php/topic,19533.msg133422.html#msg133422 Development How to use a Code::Blocks Git Repo].&lt;br /&gt;
&lt;br /&gt;
If you want to create a SVN style patch from git, see: [https://forums.codeblocks.org/index.php/topic,19391.msg132530.html#msg132530 This forum post].&lt;br /&gt;
&lt;br /&gt;
It's possible to build Code::Blocks through GitHub Actions, see [https://wiki.codeblocks.org/index.php/Building_Code::Blocks_through_GitHub_Actions Building Code::Blocks through GitHub Actions].&lt;br /&gt;
&lt;br /&gt;
== Debugging C::B ==&lt;br /&gt;
&lt;br /&gt;
* When C::B crashes, it will generate a call-stack file &amp;quot;codeblocks.RPT&amp;quot;, at the crash point (see [[FAQ-Compiling_(general)#Q: How do I report a compilation problem on the forums?|this]] for more information). This is a text file that you can open; if your C::B contains the debug information, it will have file and line information about each call. If your C::B is a stripped version, but you have the debug version of C::B, you can try to run the [https://forums.codeblocks.org/index.php/topic,13129.msg88254.html#msg88254 Debugging made easier], this is an address2line UI interface that works under Windows.&lt;br /&gt;
* You can debug C::B under C::B (with the debugger plugin), also, you can link C::B to the debug version of wxWidgets library, so you can see whether a bug is located in C::B source code or wxWidgets' source code, see here: [https://forums.codeblocks.org/index.php/topic,17316.msg130972.html#msg130972 patch to build C::B against wx debug library]. You can use the project option plugin to change all the custom variable WX_SUFFIX from &amp;quot;u&amp;quot; to &amp;quot;ud&amp;quot; in the workspace, so that you can build C::B against wx debug library, see discussion here: [https://forums.codeblocks.org/index.php/topic,25959.0.html How to globally set the &amp;quot;custom variables&amp;quot; in the cbp files under a workspace].&lt;br /&gt;
* to accelerate the debugging process for many plugins(when GDB load a lot of plugins with debug information, it will be slow), there is a special profile named &amp;quot;debug-plugin&amp;quot;, a profile file is just a configure file named &amp;quot;debug-plugin.conf&amp;quot;, when you start with this profile, you can exclude other plugins, and only load the plugins you needed, see discussion here: [https://forums.codeblocks.org/index.php/topic,25161.0.html How to exclude the other plugins when debugging]&lt;br /&gt;
* if you application or the debugee C::B is built against release version of wxWidgets library, how to debug the wxWidgets symbols, the method is to use the gcc's option &amp;quot;-femit-class-debug-always&amp;quot;, see forum discussion here: [https://forums.codeblocks.org/index.php/topic,25731.0.html How to add gcc option &amp;quot;-femit-class-debug-always&amp;quot; to a single cpp file in cbp]&lt;br /&gt;
* to catch more debug information on the crash, we can distribute separate debug files, see discussion here: [https://forums.codeblocks.org/index.php/topic,25712.0.html new idea: ship the debug symbols in a separate file when we distribute C::B]&lt;/div&gt;</summary>
		<author><name>Ollydbg</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=Developer_documentation&amp;diff=9840</id>
		<title>Developer documentation</title>
		<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php?title=Developer_documentation&amp;diff=9840"/>
		<updated>2025-02-12T08:56:09Z</updated>

		<summary type="html">&lt;p&gt;Ollydbg: /* Debugging C::B */ use the -femit-class-debug-always for debugging&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Code::Blocks Documentation]]&lt;br /&gt;
[[Category:Developer Documentation]]&lt;br /&gt;
{{Layout_box2|1=&lt;br /&gt;
'''Official Code repository Subversion'''&amp;lt;br/&amp;gt;&lt;br /&gt;
* Web-interface by ViewVC: http://sourceforge.net/p/codeblocks/code/log/&lt;br /&gt;
* Subversion URL: &amp;lt;nowiki&amp;gt;svn://svn.code.sf.net/p/codeblocks/code/trunk&amp;lt;/nowiki&amp;gt; or &amp;lt;nowiki&amp;gt;http://svn.code.sf.net/p/codeblocks/code/trunk&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Mirror by Carsten Arnholm''' (Read-only; )&lt;br /&gt;
* Web-interface: https://github.com/arnholm/codeblocks_sfmirror&lt;br /&gt;
* Git URL: see the above page.&lt;br /&gt;
&lt;br /&gt;
'''Mirror by biplab''' (Read-only; refreshed every 10 minutes. As 2022-09-12, it looks dead.)&lt;br /&gt;
* Subversion URL: &amp;lt;nowiki&amp;gt;svn://cb.biplab.in/codeblocks/trunk&amp;lt;/nowiki&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
* Web-interface: http://cb.biplab.in/websvn/&lt;br /&gt;
* Git URL: git://cb.biplab.in/codeblocks.git&lt;br /&gt;
* Web-interface:http://cb.biplab.in/cgit/&lt;br /&gt;
&lt;br /&gt;
'''Mirror by Jens''' (Read-only; refreshed every 10 minutes. As 2022-09-12, it looks dead.)&lt;br /&gt;
* Web-interface: http://cgit.jenslody.de/&lt;br /&gt;
* Git URL: git://jenslody.de/git/codeblocks&lt;br /&gt;
* the above Web-interface link contains many other mirrors such as wxWidgets trunk, git mirror, and git mirror of codeblocks.github&lt;br /&gt;
&lt;br /&gt;
'''Mirror by Obf''' (Read-only; refreshed manually. As 2022-09-12, it looks dead.)&lt;br /&gt;
* Web-interface: https://github.com/obfuscated/codeblocks_sf&lt;br /&gt;
* Git URL: see the above page.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Articles for Code::Blocks developers.'''&lt;br /&gt;
&lt;br /&gt;
* '''&amp;lt;u&amp;gt;Documentation&amp;lt;/u&amp;gt;'''&lt;br /&gt;
:[https://www.codeblocks.org/manual.shtml User's manual] in various formats and languages.&lt;br /&gt;
:Browse SDK documentation at http://alpha0010.github.io/cb-docs/ as html.&lt;br /&gt;
&lt;br /&gt;
* Compile the complete Code::Blocks from sources on '''[[Installing Code::Blocks from source on Windows|Windows]]''' and '''[[Installing Code::Blocks from source on Linux|Linux]]'''&lt;br /&gt;
&lt;br /&gt;
* '''[[Compile Code::Blocks plugins based on a nightly]]''' without the need to compile wxWidgets or the Code::Blocks core.&lt;br /&gt;
&lt;br /&gt;
:Code::Blocks uses Launchpad to coordinate translation efforts.&lt;br /&gt;
* '''[http://launchpad.net/products/codeblocks/ Old Translation page]'''&lt;br /&gt;
* '''[http://launchpad.net/products/codeblocks-gd/ New Translation page]'''&lt;br /&gt;
:See also [https://forums.codeblocks.org/index.php/topic,1022.msg159075.html#msg159075 Code::Blocks' translation]&lt;br /&gt;
&lt;br /&gt;
* '''[[Coding style]]'''&lt;br /&gt;
:The source code formatting style used in the Code::Blocks' source.&lt;br /&gt;
&lt;br /&gt;
* '''[[Creating a custom lexer for Code::Blocks editor]]'''&lt;br /&gt;
:How to add support for new syntax lighting schemes.&lt;br /&gt;
&lt;br /&gt;
* '''[[Creating a patch to submit (Patch Tracker)]]'''&lt;br /&gt;
:Creating a diff file and then submitting it to the patch tracker.&lt;br /&gt;
&lt;br /&gt;
* '''[[Unicode Standards]]'''&lt;br /&gt;
:Information about unicode standards and how unicode is handled in Code::Blocks' source code.&lt;br /&gt;
&lt;br /&gt;
* '''[[Various development tips]]'''&lt;br /&gt;
:List of various development tips for Code::Blocks.&lt;br /&gt;
&lt;br /&gt;
* '''[[Scripting Code::Blocks]]'''&lt;br /&gt;
:Information about scripting Code::Blocks with [http://www.squirrel-lang.org/ Squirrel].&lt;br /&gt;
&lt;br /&gt;
* '''[[A short overview about Code::Blocks architecture]]'''&lt;br /&gt;
:Information about the architecture of Code::Blocks.&lt;br /&gt;
&lt;br /&gt;
* '''[[Code::Blocks SDK events]]'''&lt;br /&gt;
:Information about the Code::Blocks SDK events and how to work with them.&lt;br /&gt;
&lt;br /&gt;
* '''[[File formats description]]'''&lt;br /&gt;
:Description of the format of each file Code::Blocks produces.&lt;br /&gt;
&lt;br /&gt;
* '''[[Version control]]'''&lt;br /&gt;
:Tips and trick for working with our version control system.&lt;br /&gt;
&lt;br /&gt;
== Plug-In development ==&lt;br /&gt;
&lt;br /&gt;
* [[Plugin structure of C::B]]&lt;br /&gt;
* [[Creating a simple &amp;quot;Hello World&amp;quot; plugin]]&lt;br /&gt;
* [[Creating a Plug-in which modifies CB's Menus]]&lt;br /&gt;
* [[Creating a plugin that actually does something]]&lt;br /&gt;
* [[Linking the plugin to a Nightly Build]]&lt;br /&gt;
* [[Managing Plug-in Resources]]&lt;br /&gt;
&lt;br /&gt;
* [[Research on doing a Plug-in for embedded help in CB]]&lt;br /&gt;
&lt;br /&gt;
* [[wxSmith extensions]]&lt;br /&gt;
* [[Code::Completion Rewrite]] and [[Code Completion plugin]] and [[Code Completion Design]]&lt;br /&gt;
&lt;br /&gt;
== Scripting ==&lt;br /&gt;
&lt;br /&gt;
Using scripting to extend Code::Blocks' functionality&lt;br /&gt;
&lt;br /&gt;
* [[Wizard scripts|Creating a new project wizard]]&lt;br /&gt;
&lt;br /&gt;
== Developing C::B with Git ==&lt;br /&gt;
For devs who want to use Git to develop C::B, here are some steps to follow, especially you need to correctly set the SVN and GIT properties so that you can make your local git commits back to the official SVN repo. See [https://forums.codeblocks.org/index.php/topic,16096.msg128152.html#msg128152 Re: Read-only Git, SVN Repo for Code::Blocks], also stahta01 has a nice instruction about how to use git, see [https://forums.codeblocks.org/index.php/topic,19533.msg133422.html#msg133422 Development How to use a Code::Blocks Git Repo].&lt;br /&gt;
&lt;br /&gt;
If you want to create a SVN style patch from git, see: [https://forums.codeblocks.org/index.php/topic,19391.msg132530.html#msg132530 This forum post].&lt;br /&gt;
&lt;br /&gt;
It's possible to build Code::Blocks through GitHub Actions, see [https://wiki.codeblocks.org/index.php/Building_Code::Blocks_through_GitHub_Actions Building Code::Blocks through GitHub Actions].&lt;br /&gt;
&lt;br /&gt;
== Debugging C::B ==&lt;br /&gt;
&lt;br /&gt;
* When C::B crashes, it will generate a call-stack file &amp;quot;codeblocks.RPT&amp;quot;, at the crash point (see [[FAQ-Compiling_(general)#Q: How do I report a compilation problem on the forums?|this]] for more information). This is a text file that you can open; if your C::B contains the debug information, it will have file and line information about each call. If your C::B is a stripped version, but you have the debug version of C::B, you can try to run the [https://forums.codeblocks.org/index.php/topic,13129.msg88254.html#msg88254 Debugging made easier], this is an address2line UI interface that works under Windows.&lt;br /&gt;
* You can debug C::B under C::B (with the debugger plugin), also, you can link C::B to the debug version of wxWidgets library, so you can see whether a bug is located in C::B source code or wxWidgets' source code, see here: [https://forums.codeblocks.org/index.php/topic,17316.msg130972.html#msg130972 patch to build C::B against wx debug library]. You can use the project option plugin to change all the custom variable WX_SUFFIX from &amp;quot;u&amp;quot; to &amp;quot;ud&amp;quot; in the workspace, so that you can build C::B against wx debug library, see discussion here: [https://forums.codeblocks.org/index.php/topic,25959.0.html How to globally set the &amp;quot;custom variables&amp;quot; in the cbp files under a workspace].&lt;br /&gt;
* to accelerate the debugging process for many plugins(when GDB load a lot of plugins with debug information, it will be slow), there is a special profile named &amp;quot;debug-plugin&amp;quot;, a profile file is just a configure file named &amp;quot;debug-plugin.conf&amp;quot;, when you start with this profile, you can exclude other plugins, and only load the plugins you needed, see discussion here: [https://forums.codeblocks.org/index.php/topic,25161.0.html How to exclude the other plugins when debugging]&lt;br /&gt;
* if you application or the debugee C::B is built against release version of wxWidgets library, how to debug the wxWidgets symbols, the method is to use the gcc's option &amp;quot;-femit-class-debug-always&amp;quot;, see forum discussion here: [https://forums.codeblocks.org/index.php/topic,25731.0.html How to add gcc option &amp;quot;-femit-class-debug-always&amp;quot; to a single cpp file in cbp]&lt;/div&gt;</summary>
		<author><name>Ollydbg</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=Developer_documentation&amp;diff=9839</id>
		<title>Developer documentation</title>
		<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php?title=Developer_documentation&amp;diff=9839"/>
		<updated>2025-02-05T09:49:58Z</updated>

		<summary type="html">&lt;p&gt;Ollydbg: /* Debugging C::B */ add some debug tips&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Code::Blocks Documentation]]&lt;br /&gt;
[[Category:Developer Documentation]]&lt;br /&gt;
{{Layout_box2|1=&lt;br /&gt;
'''Official Code repository Subversion'''&amp;lt;br/&amp;gt;&lt;br /&gt;
* Web-interface by ViewVC: http://sourceforge.net/p/codeblocks/code/log/&lt;br /&gt;
* Subversion URL: &amp;lt;nowiki&amp;gt;svn://svn.code.sf.net/p/codeblocks/code/trunk&amp;lt;/nowiki&amp;gt; or &amp;lt;nowiki&amp;gt;http://svn.code.sf.net/p/codeblocks/code/trunk&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Mirror by Carsten Arnholm''' (Read-only; )&lt;br /&gt;
* Web-interface: https://github.com/arnholm/codeblocks_sfmirror&lt;br /&gt;
* Git URL: see the above page.&lt;br /&gt;
&lt;br /&gt;
'''Mirror by biplab''' (Read-only; refreshed every 10 minutes. As 2022-09-12, it looks dead.)&lt;br /&gt;
* Subversion URL: &amp;lt;nowiki&amp;gt;svn://cb.biplab.in/codeblocks/trunk&amp;lt;/nowiki&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
* Web-interface: http://cb.biplab.in/websvn/&lt;br /&gt;
* Git URL: git://cb.biplab.in/codeblocks.git&lt;br /&gt;
* Web-interface:http://cb.biplab.in/cgit/&lt;br /&gt;
&lt;br /&gt;
'''Mirror by Jens''' (Read-only; refreshed every 10 minutes. As 2022-09-12, it looks dead.)&lt;br /&gt;
* Web-interface: http://cgit.jenslody.de/&lt;br /&gt;
* Git URL: git://jenslody.de/git/codeblocks&lt;br /&gt;
* the above Web-interface link contains many other mirrors such as wxWidgets trunk, git mirror, and git mirror of codeblocks.github&lt;br /&gt;
&lt;br /&gt;
'''Mirror by Obf''' (Read-only; refreshed manually. As 2022-09-12, it looks dead.)&lt;br /&gt;
* Web-interface: https://github.com/obfuscated/codeblocks_sf&lt;br /&gt;
* Git URL: see the above page.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Articles for Code::Blocks developers.'''&lt;br /&gt;
&lt;br /&gt;
* '''&amp;lt;u&amp;gt;Documentation&amp;lt;/u&amp;gt;'''&lt;br /&gt;
:[https://www.codeblocks.org/manual.shtml User's manual] in various formats and languages.&lt;br /&gt;
:Browse SDK documentation at http://alpha0010.github.io/cb-docs/ as html.&lt;br /&gt;
&lt;br /&gt;
* Compile the complete Code::Blocks from sources on '''[[Installing Code::Blocks from source on Windows|Windows]]''' and '''[[Installing Code::Blocks from source on Linux|Linux]]'''&lt;br /&gt;
&lt;br /&gt;
* '''[[Compile Code::Blocks plugins based on a nightly]]''' without the need to compile wxWidgets or the Code::Blocks core.&lt;br /&gt;
&lt;br /&gt;
:Code::Blocks uses Launchpad to coordinate translation efforts.&lt;br /&gt;
* '''[http://launchpad.net/products/codeblocks/ Old Translation page]'''&lt;br /&gt;
* '''[http://launchpad.net/products/codeblocks-gd/ New Translation page]'''&lt;br /&gt;
:See also [https://forums.codeblocks.org/index.php/topic,1022.msg159075.html#msg159075 Code::Blocks' translation]&lt;br /&gt;
&lt;br /&gt;
* '''[[Coding style]]'''&lt;br /&gt;
:The source code formatting style used in the Code::Blocks' source.&lt;br /&gt;
&lt;br /&gt;
* '''[[Creating a custom lexer for Code::Blocks editor]]'''&lt;br /&gt;
:How to add support for new syntax lighting schemes.&lt;br /&gt;
&lt;br /&gt;
* '''[[Creating a patch to submit (Patch Tracker)]]'''&lt;br /&gt;
:Creating a diff file and then submitting it to the patch tracker.&lt;br /&gt;
&lt;br /&gt;
* '''[[Unicode Standards]]'''&lt;br /&gt;
:Information about unicode standards and how unicode is handled in Code::Blocks' source code.&lt;br /&gt;
&lt;br /&gt;
* '''[[Various development tips]]'''&lt;br /&gt;
:List of various development tips for Code::Blocks.&lt;br /&gt;
&lt;br /&gt;
* '''[[Scripting Code::Blocks]]'''&lt;br /&gt;
:Information about scripting Code::Blocks with [http://www.squirrel-lang.org/ Squirrel].&lt;br /&gt;
&lt;br /&gt;
* '''[[A short overview about Code::Blocks architecture]]'''&lt;br /&gt;
:Information about the architecture of Code::Blocks.&lt;br /&gt;
&lt;br /&gt;
* '''[[Code::Blocks SDK events]]'''&lt;br /&gt;
:Information about the Code::Blocks SDK events and how to work with them.&lt;br /&gt;
&lt;br /&gt;
* '''[[File formats description]]'''&lt;br /&gt;
:Description of the format of each file Code::Blocks produces.&lt;br /&gt;
&lt;br /&gt;
* '''[[Version control]]'''&lt;br /&gt;
:Tips and trick for working with our version control system.&lt;br /&gt;
&lt;br /&gt;
== Plug-In development ==&lt;br /&gt;
&lt;br /&gt;
* [[Plugin structure of C::B]]&lt;br /&gt;
* [[Creating a simple &amp;quot;Hello World&amp;quot; plugin]]&lt;br /&gt;
* [[Creating a Plug-in which modifies CB's Menus]]&lt;br /&gt;
* [[Creating a plugin that actually does something]]&lt;br /&gt;
* [[Linking the plugin to a Nightly Build]]&lt;br /&gt;
* [[Managing Plug-in Resources]]&lt;br /&gt;
&lt;br /&gt;
* [[Research on doing a Plug-in for embedded help in CB]]&lt;br /&gt;
&lt;br /&gt;
* [[wxSmith extensions]]&lt;br /&gt;
* [[Code::Completion Rewrite]] and [[Code Completion plugin]] and [[Code Completion Design]]&lt;br /&gt;
&lt;br /&gt;
== Scripting ==&lt;br /&gt;
&lt;br /&gt;
Using scripting to extend Code::Blocks' functionality&lt;br /&gt;
&lt;br /&gt;
* [[Wizard scripts|Creating a new project wizard]]&lt;br /&gt;
&lt;br /&gt;
== Developing C::B with Git ==&lt;br /&gt;
For devs who want to use Git to develop C::B, here are some steps to follow, especially you need to correctly set the SVN and GIT properties so that you can make your local git commits back to the official SVN repo. See [https://forums.codeblocks.org/index.php/topic,16096.msg128152.html#msg128152 Re: Read-only Git, SVN Repo for Code::Blocks], also stahta01 has a nice instruction about how to use git, see [https://forums.codeblocks.org/index.php/topic,19533.msg133422.html#msg133422 Development How to use a Code::Blocks Git Repo].&lt;br /&gt;
&lt;br /&gt;
If you want to create a SVN style patch from git, see: [https://forums.codeblocks.org/index.php/topic,19391.msg132530.html#msg132530 This forum post].&lt;br /&gt;
&lt;br /&gt;
It's possible to build Code::Blocks through GitHub Actions, see [https://wiki.codeblocks.org/index.php/Building_Code::Blocks_through_GitHub_Actions Building Code::Blocks through GitHub Actions].&lt;br /&gt;
&lt;br /&gt;
== Debugging C::B ==&lt;br /&gt;
&lt;br /&gt;
* When C::B crashes, it will generate a call-stack file &amp;quot;codeblocks.RPT&amp;quot;, at the crash point (see [[FAQ-Compiling_(general)#Q: How do I report a compilation problem on the forums?|this]] for more information). This is a text file that you can open; if your C::B contains the debug information, it will have file and line information about each call. If your C::B is a stripped version, but you have the debug version of C::B, you can try to run the [https://forums.codeblocks.org/index.php/topic,13129.msg88254.html#msg88254 Debugging made easier], this is an address2line UI interface that works under Windows.&lt;br /&gt;
* You can debug C::B under C::B (with the debugger plugin), also, you can link C::B to the debug version of wxWidgets library, so you can see whether a bug is located in C::B source code or wxWidgets' source code, see here: [https://forums.codeblocks.org/index.php/topic,17316.msg130972.html#msg130972 patch to build C::B against wx debug library]. You can use the project option plugin to change all the custom variable WX_SUFFIX from &amp;quot;u&amp;quot; to &amp;quot;ud&amp;quot; in the workspace, so that you can build C::B against wx debug library, see discussion here: [https://forums.codeblocks.org/index.php/topic,25959.0.html How to globally set the &amp;quot;custom variables&amp;quot; in the cbp files under a workspace].&lt;br /&gt;
* to accelerate the debugging process for many plugins(when GDB load a lot of plugins with debug information, it will be slow), there is a special profile named &amp;quot;debug-plugin&amp;quot;, a profile file is just a configure file named &amp;quot;debug-plugin.conf&amp;quot;, when you start with this profile, you can exclude other plugins, and only load the plugins you needed, see discussion here: [https://forums.codeblocks.org/index.php/topic,25161.0.html How to exclude the other plugins when debugging]&lt;/div&gt;</summary>
		<author><name>Ollydbg</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=Developer_documentation&amp;diff=9802</id>
		<title>Developer documentation</title>
		<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php?title=Developer_documentation&amp;diff=9802"/>
		<updated>2024-08-20T03:59:33Z</updated>

		<summary type="html">&lt;p&gt;Ollydbg: add new github mirror of our source code&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Code::Blocks Documentation]]&lt;br /&gt;
[[Category:Developer Documentation]]&lt;br /&gt;
{{Layout_box2|1=&lt;br /&gt;
'''Official Code repository Subversion'''&amp;lt;br/&amp;gt;&lt;br /&gt;
* Web-interface by ViewVC: http://sourceforge.net/p/codeblocks/code/log/&lt;br /&gt;
* Subversion URL: &amp;lt;nowiki&amp;gt;svn://svn.code.sf.net/p/codeblocks/code/trunk&amp;lt;/nowiki&amp;gt; or &amp;lt;nowiki&amp;gt;http://svn.code.sf.net/p/codeblocks/code/trunk&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Mirror by Carsten Arnholm''' (Read-only; )&lt;br /&gt;
* Web-interface: https://github.com/arnholm/codeblocks_sfmirror&lt;br /&gt;
* Git URL: see the above page.&lt;br /&gt;
&lt;br /&gt;
'''Mirror by biplab''' (Read-only; refreshed every 10 minutes. As 2022-09-12, it looks dead.)&lt;br /&gt;
* Subversion URL: &amp;lt;nowiki&amp;gt;svn://cb.biplab.in/codeblocks/trunk&amp;lt;/nowiki&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
* Web-interface: http://cb.biplab.in/websvn/&lt;br /&gt;
* Git URL: git://cb.biplab.in/codeblocks.git&lt;br /&gt;
* Web-interface:http://cb.biplab.in/cgit/&lt;br /&gt;
&lt;br /&gt;
'''Mirror by Jens''' (Read-only; refreshed every 10 minutes. As 2022-09-12, it looks dead.)&lt;br /&gt;
* Web-interface: http://cgit.jenslody.de/&lt;br /&gt;
* Git URL: git://jenslody.de/git/codeblocks&lt;br /&gt;
* the above Web-interface link contains many other mirrors such as wxWidgets trunk, git mirror, and git mirror of codeblocks.github&lt;br /&gt;
&lt;br /&gt;
'''Mirror by Obf''' (Read-only; refreshed manually. As 2022-09-12, it looks dead.)&lt;br /&gt;
* Web-interface: https://github.com/obfuscated/codeblocks_sf&lt;br /&gt;
* Git URL: see the above page.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Articles for Code::Blocks developers.'''&lt;br /&gt;
&lt;br /&gt;
* '''&amp;lt;u&amp;gt;Documentation&amp;lt;/u&amp;gt;'''&lt;br /&gt;
:[https://www.codeblocks.org/manual.shtml User's manual] in various formats and languages.&lt;br /&gt;
:Browse SDK documentation at http://alpha0010.github.io/cb-docs/ as html.&lt;br /&gt;
&lt;br /&gt;
* Compile the complete Code::Blocks from sources on '''[[Installing Code::Blocks from source on Windows|Windows]]''' and '''[[Installing Code::Blocks from source on Linux|Linux]]'''&lt;br /&gt;
&lt;br /&gt;
* '''[[Compile Code::Blocks plugins based on a nightly]]''' without the need to compile wxWidgets or the Code::Blocks core.&lt;br /&gt;
&lt;br /&gt;
:Code::Blocks uses Launchpad to coordinate translation efforts.&lt;br /&gt;
* '''[http://launchpad.net/products/codeblocks/ Old Translation page]'''&lt;br /&gt;
* '''[http://launchpad.net/products/codeblocks-gd/ New Translation page]'''&lt;br /&gt;
:See also [https://forums.codeblocks.org/index.php/topic,1022.msg159075.html#msg159075 Code::Blocks' translation]&lt;br /&gt;
&lt;br /&gt;
* '''[[Coding style]]'''&lt;br /&gt;
:The source code formatting style used in the Code::Blocks' source.&lt;br /&gt;
&lt;br /&gt;
* '''[[Creating a custom lexer for Code::Blocks editor]]'''&lt;br /&gt;
:How to add support for new syntax lighting schemes.&lt;br /&gt;
&lt;br /&gt;
* '''[[Creating a patch to submit (Patch Tracker)]]'''&lt;br /&gt;
:Creating a diff file and then submitting it to the patch tracker.&lt;br /&gt;
&lt;br /&gt;
* '''[[Unicode Standards]]'''&lt;br /&gt;
:Information about unicode standards and how unicode is handled in Code::Blocks' source code.&lt;br /&gt;
&lt;br /&gt;
* '''[[Various development tips]]'''&lt;br /&gt;
:List of various development tips for Code::Blocks.&lt;br /&gt;
&lt;br /&gt;
* '''[[Scripting Code::Blocks]]'''&lt;br /&gt;
:Information about scripting Code::Blocks with [http://www.squirrel-lang.org/ Squirrel].&lt;br /&gt;
&lt;br /&gt;
* '''[[A short overview about Code::Blocks architecture]]'''&lt;br /&gt;
:Information about the architecture of Code::Blocks.&lt;br /&gt;
&lt;br /&gt;
* '''[[Code::Blocks SDK events]]'''&lt;br /&gt;
:Information about the Code::Blocks SDK events and how to work with them.&lt;br /&gt;
&lt;br /&gt;
* '''[[File formats description]]'''&lt;br /&gt;
:Description of the format of each file Code::Blocks produces.&lt;br /&gt;
&lt;br /&gt;
* '''[[Version control]]'''&lt;br /&gt;
:Tips and trick for working with our version control system.&lt;br /&gt;
&lt;br /&gt;
== Plug-In development ==&lt;br /&gt;
&lt;br /&gt;
* [[Plugin structure of C::B]]&lt;br /&gt;
* [[Creating a simple &amp;quot;Hello World&amp;quot; plugin]]&lt;br /&gt;
* [[Creating a Plug-in which modifies CB's Menus]]&lt;br /&gt;
* [[Creating a plugin that actually does something]]&lt;br /&gt;
* [[Linking the plugin to a Nightly Build]]&lt;br /&gt;
* [[Managing Plug-in Resources]]&lt;br /&gt;
&lt;br /&gt;
* [[Research on doing a Plug-in for embedded help in CB]]&lt;br /&gt;
&lt;br /&gt;
* [[wxSmith extensions]]&lt;br /&gt;
* [[Code::Completion Rewrite]] and [[Code Completion plugin]] and [[Code Completion Design]]&lt;br /&gt;
&lt;br /&gt;
== Scripting ==&lt;br /&gt;
&lt;br /&gt;
Using scripting to extend Code::Blocks' functionality&lt;br /&gt;
&lt;br /&gt;
* [[Wizard scripts|Creating a new project wizard]]&lt;br /&gt;
&lt;br /&gt;
== Developing C::B with Git ==&lt;br /&gt;
For devs who want to use Git to develop C::B, here are some steps to follow, especially you need to correctly set the SVN and GIT properties so that you can make your local git commits back to the official SVN repo. See [https://forums.codeblocks.org/index.php/topic,16096.msg128152.html#msg128152 Re: Read-only Git, SVN Repo for Code::Blocks], also stahta01 has a nice instruction about how to use git, see [https://forums.codeblocks.org/index.php/topic,19533.msg133422.html#msg133422 Development How to use a Code::Blocks Git Repo].&lt;br /&gt;
&lt;br /&gt;
If you want to create a SVN style patch from git, see: [https://forums.codeblocks.org/index.php/topic,19391.msg132530.html#msg132530 This forum post].&lt;br /&gt;
&lt;br /&gt;
== Debugging C::B ==&lt;br /&gt;
&lt;br /&gt;
* When C::B crashes, it will generate a call-stack file &amp;quot;codeblocks.RPT&amp;quot;, at the crash point (see [[FAQ-Compiling_(general)#Q: How do I report a compilation problem on the forums?|this]] for more information). This is a text file that you can open; if your C::B contains the debug information, it will have file and line information about each call. If your C::B is a stripped version, but you have the debug version of C::B, you can try to run the [https://forums.codeblocks.org/index.php/topic,13129.msg88254.html#msg88254 Debugging made easier], this is an address2line UI interface that works under Windows.&lt;br /&gt;
* You can debug C::B under C::B (with the debugger plugin), also, you can link C::B to the debug version of wxWidgets library, so you can see whether a bug is located in C::B source code or wxWidgets' source code, see here: [https://forums.codeblocks.org/index.php/topic,17316.msg130972.html#msg130972 patch to build C::B against wx debug library]&lt;/div&gt;</summary>
		<author><name>Ollydbg</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=Configure_GDB_pretty_printer_for_Msys2&amp;diff=9760</id>
		<title>Configure GDB pretty printer for Msys2</title>
		<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php?title=Configure_GDB_pretty_printer_for_Msys2&amp;diff=9760"/>
		<updated>2023-07-03T06:30:56Z</updated>

		<summary type="html">&lt;p&gt;Ollydbg: How to add the wxWidgets' pretty printer&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This is my way to use gdb python pretty printer for the libstdcxx under msys2.&lt;br /&gt;
Suppose you use 64bit gcc compiler. My msys2 is installed under F:\msys64&lt;br /&gt;
&lt;br /&gt;
In the Menu-&amp;gt;Settings-&amp;gt;Debugger settings. Open the debugger plugin setting dialog.&lt;br /&gt;
&lt;br /&gt;
Then, in the &amp;quot;Executable path&amp;quot; field, select &amp;quot;F:\msys64\mingw64\bin\gdb.exe&amp;quot;&lt;br /&gt;
in the &amp;quot;Debugger initialization commands&amp;quot; field, put the following text in the edit control.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
source F:\msys64\mingw64\etc\gdbinit&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
I see that I have to modify the file &amp;quot;F:\msys64\mingw64\etc\gdbinit&amp;quot; file: below is the original code&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
python&lt;br /&gt;
import sys&lt;br /&gt;
sys.path.insert(0, sys.path[0] + '/../../gcc-9.2.0/python')&lt;br /&gt;
from libstdcxx.v6.printers import register_libstdcxx_printers&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
But you have to add one line before the &amp;quot;end&amp;quot; statement like below to let the register_libstdcxx_printers function get executed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
python&lt;br /&gt;
import sys&lt;br /&gt;
sys.path.insert(0, sys.path[0] + '/../../gcc-9.2.0/python')&lt;br /&gt;
from libstdcxx.v6.printers import register_libstdcxx_printers&lt;br /&gt;
register_libstdcxx_printers(None)&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
BTW: It is the same thing to add the python pretty printer for wxWidgets. You can use this file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;https://github.com/wxWidgets/wxWidgets/blob/master/misc/gdb/print.py&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Use predefined macros for the paths=&lt;br /&gt;
Under Code::Blocks, you can used some predefined path macros.&lt;br /&gt;
&lt;br /&gt;
For example, you don't need to write&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
source F:\msys64\mingw64\etc\gdbinit&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Instead, you can use this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
source $(TARGET_COMPILER_DIR)etc\gdbinit&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Since you have already defined the compiler master path in the &amp;quot;Menu-&amp;gt;Settings-&amp;gt;Compiler-&amp;gt;Toolchain executables&amp;quot; as &amp;quot;F:\msys2\mingw64&amp;quot;, so the second way is more portable. Also, to mention gdb.exe, you can use&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$(TARGET_COMPILER_DIR)bin\gdb.exe&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Add the pretty printer for wxWidgets=&lt;br /&gt;
Here is the full gdbinit content when using latest gcc under msys2/mingw64&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
python&lt;br /&gt;
import sys&lt;br /&gt;
sys.path.insert(0, sys.path[0] + '/../../gcc-12.2.0/python')&lt;br /&gt;
from libstdcxx.v6.printers import register_libstdcxx_printers&lt;br /&gt;
register_libstdcxx_printers (None)&lt;br /&gt;
&lt;br /&gt;
sys.path.insert(0, sys.path[0] + '/../../../etc')&lt;br /&gt;
import wxprint&lt;br /&gt;
&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that the two lines were added to the original gdbinit(note once you use pacman to upgrade you gcc, this gdbinit file will get overwritten)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sys.path.insert(0, sys.path[0] + '/../../../etc')&lt;br /&gt;
import wxprint&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here, the &amp;quot;wxprint&amp;quot; is a file named &amp;quot;wxprint.py&amp;quot;, which is just the same file as: https://github.com/wxWidgets/wxWidgets/blob/master/misc/gdb/print.py, I just put this &amp;quot;wxprint.py&amp;quot; in the same folder as the gdbinit file.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Useful Links=&lt;br /&gt;
[https://forums.codeblocks.org/index.php?topic=23590.0 Debugger: use gdb python pretty printer for the libstdcxx under msys2]&lt;/div&gt;</summary>
		<author><name>Ollydbg</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=Configure_GDB_pretty_printer_for_Msys2&amp;diff=9759</id>
		<title>Configure GDB pretty printer for Msys2</title>
		<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php?title=Configure_GDB_pretty_printer_for_Msys2&amp;diff=9759"/>
		<updated>2023-07-03T06:21:40Z</updated>

		<summary type="html">&lt;p&gt;Ollydbg: use TARGET_COMPILER_DIR macros&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This is my way to use gdb python pretty printer for the libstdcxx under msys2.&lt;br /&gt;
Suppose you use 64bit gcc compiler. My msys2 is installed under F:\msys64&lt;br /&gt;
&lt;br /&gt;
In the Menu-&amp;gt;Settings-&amp;gt;Debugger settings. Open the debugger plugin setting dialog.&lt;br /&gt;
&lt;br /&gt;
Then, in the &amp;quot;Executable path&amp;quot; field, select &amp;quot;F:\msys64\mingw64\bin\gdb.exe&amp;quot;&lt;br /&gt;
in the &amp;quot;Debugger initialization commands&amp;quot; field, put the following text in the edit control.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
source F:\msys64\mingw64\etc\gdbinit&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
I see that I have to modify the file &amp;quot;F:\msys64\mingw64\etc\gdbinit&amp;quot; file: below is the original code&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
python&lt;br /&gt;
import sys&lt;br /&gt;
sys.path.insert(0, sys.path[0] + '/../../gcc-9.2.0/python')&lt;br /&gt;
from libstdcxx.v6.printers import register_libstdcxx_printers&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
But you have to add one line before the &amp;quot;end&amp;quot; statement like below to let the register_libstdcxx_printers function get executed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
python&lt;br /&gt;
import sys&lt;br /&gt;
sys.path.insert(0, sys.path[0] + '/../../gcc-9.2.0/python')&lt;br /&gt;
from libstdcxx.v6.printers import register_libstdcxx_printers&lt;br /&gt;
register_libstdcxx_printers(None)&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
BTW: It is the same thing to add the python pretty printer for wxWidgets. You can use this file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;https://github.com/wxWidgets/wxWidgets/blob/master/misc/gdb/print.py&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Use predefined macros for the paths=&lt;br /&gt;
Under Code::Blocks, you can used some predefined path macros.&lt;br /&gt;
&lt;br /&gt;
For example, you don't need to write&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
source F:\msys64\mingw64\etc\gdbinit&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Instead, you can use this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
source $(TARGET_COMPILER_DIR)etc\gdbinit&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Since you have already defined the compiler master path in the &amp;quot;Menu-&amp;gt;Settings-&amp;gt;Compiler-&amp;gt;Toolchain executables&amp;quot; as &amp;quot;F:\msys2\mingw64&amp;quot;, so the second way is more portable. Also, to mention gdb.exe, you can use&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$(TARGET_COMPILER_DIR)bin\gdb.exe&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Useful Links=&lt;br /&gt;
[https://forums.codeblocks.org/index.php?topic=23590.0 Debugger: use gdb python pretty printer for the libstdcxx under msys2]&lt;/div&gt;</summary>
		<author><name>Ollydbg</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=Developer_documentation&amp;diff=9612</id>
		<title>Developer documentation</title>
		<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php?title=Developer_documentation&amp;diff=9612"/>
		<updated>2022-09-12T04:40:01Z</updated>

		<summary type="html">&lt;p&gt;Ollydbg: Some mirrors were dead&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Code::Blocks Documentation]]&lt;br /&gt;
[[Category:Developer Documentation]]&lt;br /&gt;
{{Layout_box2|1=&lt;br /&gt;
'''Official Code repository Subversion'''&amp;lt;br/&amp;gt;&lt;br /&gt;
* Web-interface by ViewVC: http://sourceforge.net/p/codeblocks/code/log/&lt;br /&gt;
* Subversion URL: &amp;lt;nowiki&amp;gt;svn://svn.code.sf.net/p/codeblocks/code/trunk&amp;lt;/nowiki&amp;gt; or &amp;lt;nowiki&amp;gt;http://svn.code.sf.net/p/codeblocks/code/trunk&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Mirror by biplab''' (Read-only; refreshed every 10 minutes. As 2022-09-12, it looks dead.)&lt;br /&gt;
* Subversion URL: &amp;lt;nowiki&amp;gt;svn://cb.biplab.in/codeblocks/trunk&amp;lt;/nowiki&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
* Web-interface: http://cb.biplab.in/websvn/&lt;br /&gt;
* Git URL: git://cb.biplab.in/codeblocks.git&lt;br /&gt;
* Web-interface:http://cb.biplab.in/cgit/&lt;br /&gt;
&lt;br /&gt;
'''Mirror by Jens''' (Read-only; refreshed every 10 minutes. As 2022-09-12, it looks dead.)&lt;br /&gt;
* Web-interface: http://cgit.jenslody.de/&lt;br /&gt;
* Git URL: git://jenslody.de/git/codeblocks&lt;br /&gt;
* the above Web-interface link contains many other mirrors such as wxWidgets trunk, git mirror, and git mirror of codeblocks.github&lt;br /&gt;
&lt;br /&gt;
'''Mirror by Obf''' (Read-only; refreshed manually. As 2022-09-12, it looks dead.)&lt;br /&gt;
* Web-interface: https://github.com/obfuscated/codeblocks_sf&lt;br /&gt;
* Git URL: see the above page.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Articles for Code::Blocks developers.'''&lt;br /&gt;
&lt;br /&gt;
* '''&amp;lt;u&amp;gt;Documentation&amp;lt;/u&amp;gt;'''&lt;br /&gt;
:[https://www.codeblocks.org/manual.shtml User's manual] in various formats and languages.&lt;br /&gt;
:Browse SDK documentation at http://alpha0010.github.io/cb-docs/ as html.&lt;br /&gt;
&lt;br /&gt;
* Compile the complete Code::Blocks from sources on '''[[Installing Code::Blocks from source on Windows|Windows]]''' and '''[[Installing Code::Blocks from source on Linux|Linux]]'''&lt;br /&gt;
&lt;br /&gt;
* '''[[Compile Code::Blocks plugins based on a nightly]]''' without the need to compile wxWidgets or the Code::Blocks core.&lt;br /&gt;
&lt;br /&gt;
:Code::Blocks uses Launchpad to coordinate translation efforts.&lt;br /&gt;
* '''[http://launchpad.net/products/codeblocks/ Old Translation page]'''&lt;br /&gt;
* '''[http://launchpad.net/products/codeblocks-gd/ New Translation page]'''&lt;br /&gt;
:See also [/index.php/topic,1022.msg159075.html#msg159075 Code::Blocks' translation]&lt;br /&gt;
&lt;br /&gt;
* '''[[Coding style]]'''&lt;br /&gt;
:The source code formatting style used in the Code::Blocks' source.&lt;br /&gt;
&lt;br /&gt;
* '''[[Creating a custom lexer for Code::Blocks editor]]'''&lt;br /&gt;
:How to add support for new syntax lighting schemes.&lt;br /&gt;
&lt;br /&gt;
* '''[[Creating a patch to submit (Patch Tracker)]]'''&lt;br /&gt;
:Creating a diff file and then submitting it to the patch tracker.&lt;br /&gt;
&lt;br /&gt;
* '''[[Unicode Standards]]'''&lt;br /&gt;
:Information about unicode standards and how unicode is handled in Code::Blocks' source code.&lt;br /&gt;
&lt;br /&gt;
* '''[[Various development tips]]'''&lt;br /&gt;
:List of various development tips for Code::Blocks.&lt;br /&gt;
&lt;br /&gt;
* '''[[Scripting Code::Blocks]]'''&lt;br /&gt;
:Information about scripting Code::Blocks with [http://www.squirrel-lang.org/ Squirrel].&lt;br /&gt;
&lt;br /&gt;
* '''[[A short overview about Code::Blocks architecture]]'''&lt;br /&gt;
:Information about the architecture of Code::Blocks.&lt;br /&gt;
&lt;br /&gt;
* '''[[Code::Blocks SDK events]]'''&lt;br /&gt;
:Information about the Code::Blocks SDK events and how to work with them.&lt;br /&gt;
&lt;br /&gt;
* '''[[File formats description]]'''&lt;br /&gt;
:Description of the format of each file Code::Blocks produces.&lt;br /&gt;
&lt;br /&gt;
* '''[[Version control]]'''&lt;br /&gt;
:Tips and trick for working with our version control system.&lt;br /&gt;
&lt;br /&gt;
== Plug-In development ==&lt;br /&gt;
&lt;br /&gt;
* [[Plugin structure of C::B]]&lt;br /&gt;
* [[Creating a simple &amp;quot;Hello World&amp;quot; plugin]]&lt;br /&gt;
* [[Creating a Plug-in which modifies CB's Menus]]&lt;br /&gt;
* [[Creating a plugin that actually does something]]&lt;br /&gt;
* [[Linking the plugin to a Nightly Build]]&lt;br /&gt;
* [[Managing Plug-in Resources]]&lt;br /&gt;
&lt;br /&gt;
* [[Research on doing a Plug-in for embedded help in CB]]&lt;br /&gt;
&lt;br /&gt;
* [[wxSmith extensions]]&lt;br /&gt;
* [[Code::Completion Rewrite]] and [[Code Completion plugin]] and [[Code Completion Design]]&lt;br /&gt;
&lt;br /&gt;
== Scripting ==&lt;br /&gt;
&lt;br /&gt;
Using scripting to extend Code::Blocks' functionality&lt;br /&gt;
&lt;br /&gt;
* [[Wizard scripts|Creating a new project wizard]]&lt;br /&gt;
&lt;br /&gt;
== Developing C::B with Git ==&lt;br /&gt;
For devs who want to use Git to develop C::B, here are some steps to follow, especially you need to correctly set the SVN and GIT properties so that you can make your local git commits back to the official SVN repo. See [https://forums.codeblocks.org/index.php/topic,16096.msg128152.html#msg128152 Re: Read-only Git, SVN Repo for Code::Blocks], also stahta01 has a nice instruction about how to use git, see [https://forums.codeblocks.org/index.php/topic,19533.msg133422.html#msg133422 Development How to use a Code::Blocks Git Repo].&lt;br /&gt;
&lt;br /&gt;
If you want to create a SVN style patch from git, see: [https://forums.codeblocks.org/index.php/topic,19391.msg132530.html#msg132530 This forum post].&lt;br /&gt;
&lt;br /&gt;
== Debugging C::B ==&lt;br /&gt;
&lt;br /&gt;
* When C::B crashes, it will generate a call-stack file &amp;quot;codeblocks.RPT&amp;quot;, at the crash point (see [[FAQ-Compiling_(general)#Q: How do I report a compilation problem on the forums?|this]] for more information). This is a text file that you can open; if your C::B contains the debug information, it will have file and line information about each call. If your C::B is a stripped version, but you have the debug version of C::B, you can try to run the [https://forums.codeblocks.org/index.php/topic,13129.msg88254.html#msg88254 Debugging made easier], this is an address2line UI interface that works under Windows.&lt;br /&gt;
* You can debug C::B under C::B (with the debugger plugin), also, you can link C::B to the debug version of wxWidgets library, so you can see whether a bug is located in C::B source code or wxWidgets' source code, see here: [https://forums.codeblocks.org/index.php/topic,17316.msg130972.html#msg130972 patch to build C::B against wx debug library]&lt;/div&gt;</summary>
		<author><name>Ollydbg</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=Configure_GDB_pretty_printer_for_Msys2&amp;diff=9597</id>
		<title>Configure GDB pretty printer for Msys2</title>
		<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php?title=Configure_GDB_pretty_printer_for_Msys2&amp;diff=9597"/>
		<updated>2022-04-17T04:04:10Z</updated>

		<summary type="html">&lt;p&gt;Ollydbg: fix link format&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This is my way to use gdb python pretty printer for the libstdcxx under msys2.&lt;br /&gt;
Suppose you use 64bit gcc compiler. My msys2 is installed under F:\msys64&lt;br /&gt;
&lt;br /&gt;
In the Menu-&amp;gt;Settings-&amp;gt;Debugger settings. Open the debugger plugin setting dialog.&lt;br /&gt;
&lt;br /&gt;
Then, in the &amp;quot;Executable path&amp;quot; field, select &amp;quot;F:\msys64\mingw64\bin\gdb.exe&amp;quot;&lt;br /&gt;
in the &amp;quot;Debugger initialization commands&amp;quot; field, put the following text in the edit control.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
source F:\msys64\mingw64\etc\gdbinit&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
I see that I have to modify the file &amp;quot;F:\msys64\mingw64\etc\gdbinit&amp;quot; file: below is the original code&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
python&lt;br /&gt;
import sys&lt;br /&gt;
sys.path.insert(0, sys.path[0] + '/../../gcc-9.2.0/python')&lt;br /&gt;
from libstdcxx.v6.printers import register_libstdcxx_printers&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
But you have to add one line before the &amp;quot;end&amp;quot; statement like below to let the register_libstdcxx_printers function get executed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
python&lt;br /&gt;
import sys&lt;br /&gt;
sys.path.insert(0, sys.path[0] + '/../../gcc-9.2.0/python')&lt;br /&gt;
from libstdcxx.v6.printers import register_libstdcxx_printers&lt;br /&gt;
register_libstdcxx_printers(None)&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
BTW: It is the same thing to add the python pretty printer for wxWidgets. You can use this file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;https://github.com/wxWidgets/wxWidgets/blob/master/misc/gdb/print.py&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Useful Links=&lt;br /&gt;
[https://forums.codeblocks.org/index.php?topic=23590.0 Debugger: use gdb python pretty printer for the libstdcxx under msys2]&lt;/div&gt;</summary>
		<author><name>Ollydbg</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=Main_Page&amp;diff=9555</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php?title=Main_Page&amp;diff=9555"/>
		<updated>2022-01-22T09:36:00Z</updated>

		<summary type="html">&lt;p&gt;Ollydbg: update compiler and links, thanks AndrewCot&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOEDITSECTION__ __NOTOC__&lt;br /&gt;
{{Layout_box1|1=&lt;br /&gt;
[[Image:cb_splash.png|left]]&lt;br /&gt;
'''Welcome to the official Wiki for Code::Blocks'''&amp;lt;br&amp;gt;&lt;br /&gt;
[https://www.codeblocks.org Code::Blocks] is a free, open-source, cross-platform [[wikipedia:Integrated Development Environment|IDE]]. Using a plugin architecture, its capabilities and features are defined by the provided plugins.&amp;lt;br&amp;gt;&lt;br /&gt;
Currently, [https://www.codeblocks.org Code::Blocks] is oriented towards C/C++/Fortran.&lt;br /&gt;
The Code::Blocks team does not take responsibility for the content nor accuracy of these pages.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;small&amp;gt;Wiki Editors: In order to login to edit pages, you must create an account on the [/ forums]. Use the same username and password for the wiki. Read the [[Help:Contents|Help]] for editing guidelines. Look in the [[CodeBlocks:Community_Portal|community portal]] for things to do.&lt;br /&gt;
&amp;lt;/small&amp;gt;&lt;br /&gt;
&amp;lt;br clear=&amp;quot;all&amp;quot; /&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{|width=&amp;quot;100%&amp;quot; background-color=&amp;quot;transparent&amp;quot; &lt;br /&gt;
|width=&amp;quot;60%&amp;quot; valign=&amp;quot;top&amp;quot;|&lt;br /&gt;
&amp;lt;!-- LEFT --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Did you know that using Layout_box2 here instead of &amp;lt;div&amp;gt; breaks the inner table? Strange... --&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;background-color: #dfeefb; border: 1px dotted #010101; margin: 5px; padding: 5px;&amp;quot;&amp;gt;&lt;br /&gt;
{|align=&amp;quot;center&amp;quot; style=&amp;quot;background:transparent&amp;quot; cellspacing=&amp;quot;5&amp;quot;&lt;br /&gt;
&lt;br /&gt;
|valign=&amp;quot;top&amp;quot; align=&amp;quot;center&amp;quot; colspan=&amp;quot;2&amp;quot;|&lt;br /&gt;
=== How do I... ===&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|&lt;br /&gt;
'''[[Installing_Code::Blocks|...install Code::Blocks?]]'''&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:.9em&amp;quot;&amp;gt;&lt;br /&gt;
[[Installing_the_latest_official_version_of_Code::Blocks_on_Windows|Windows]] &amp;amp;middot;&lt;br /&gt;
[[Installing_Code::Blocks#Ubuntu|Ubuntu]] &amp;amp;middot;&lt;br /&gt;
[[Installing_Code::Blocks#Mac_OS_X|Mac OS X]] &amp;amp;middot;&lt;br /&gt;
[[Installing_Code::Blocks#Fedora|Fedora]] &amp;amp;middot;&lt;br /&gt;
[[Installing_Code::Blocks|more...]]&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|&lt;br /&gt;
'''[[Installing_a_supported_compiler|...set up a compiler in Code::Blocks?]]'''&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:.9em&amp;quot;&amp;gt;&lt;br /&gt;
[[Installing_a_supported_compiler#MinGW.2FGCC|MinGW]] &amp;amp;middot;&lt;br /&gt;
[[Installing_a_supported_compiler#Microsoft_Visual_C.2B.2B|MS Visual C++]] &amp;amp;middot;&lt;br /&gt;
[[Installing_a_supported_compiler|more...]]&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|&lt;br /&gt;
'''[[Creating a new project|...create a new project?]]'''&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:.9em&amp;quot;&amp;gt;&lt;br /&gt;
[[Creating a new project#Changing file composition|Add files]] &amp;amp;middot;&lt;br /&gt;
[[Creating a new project#Modifying build options|Build options]] &amp;amp;middot;&lt;br /&gt;
[[Creating a new project#Virtual Targets|Virtual Targets]] &amp;amp;middot;&lt;br /&gt;
[[Creating a new project|more...]]&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|&lt;br /&gt;
'''[[Debugging_with_Code::Blocks|...debug my program?]]'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|&lt;br /&gt;
'''[[FAQ-Settings#Q: How do I make Code::Blocks portable?|...make Code::Blocks portable?]]'''&lt;br /&gt;
&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|&lt;br /&gt;
'''[[User_documentation#Third-party_libraries|...use a 3rd-party library?]]'''&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:.9em&amp;quot;&amp;gt;&lt;br /&gt;
[[Using_wxWidgets|wxWidgets]] &amp;amp;middot;&lt;br /&gt;
[[Using_Boost|Boost]] &amp;amp;middot;&lt;br /&gt;
[[Using_SDL_with_Code::Blocks|SDL]] &amp;amp;middot;&lt;br /&gt;
[[User_documentation#Third-party_libraries|more...]]&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{Layout_box3|1=&lt;br /&gt;
== Table of Contents ==&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:.9em&amp;quot;&amp;gt;''Main article: [[Code::Blocks Documentation]]''&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== [[User documentation]] ===&lt;br /&gt;
:Articles for Code::Blocks users&lt;br /&gt;
&lt;br /&gt;
=== [[FAQ]] ===&lt;br /&gt;
:Frequently Asked Questions&lt;br /&gt;
&lt;br /&gt;
=== [[Feature List]] ===&lt;br /&gt;
:An index of Code::Blocks' useful features&lt;br /&gt;
&lt;br /&gt;
=== [[Code::Blocks Plugins]] ===&lt;br /&gt;
:Plugins extend Code::Blocks' functionality&lt;br /&gt;
&lt;br /&gt;
=== [[Off-site documentation]] ===&lt;br /&gt;
:Links to external documentation&lt;br /&gt;
&lt;br /&gt;
=== [[Developer documentation]] ===&lt;br /&gt;
:Articles for developers of Code::Blocks itself&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
|width=&amp;quot;40%&amp;quot; valign=&amp;quot;top&amp;quot;|&lt;br /&gt;
&amp;lt;!-- RIGHT --&amp;gt;&lt;br /&gt;
{{Layout_box4|1=&lt;br /&gt;
=== Download Code::Blocks ===&lt;br /&gt;
* Latest official release: [https://www.codeblocks.org/downloads/binaries 20.03]&lt;br /&gt;
* Nightly builds: [https://forums.codeblocks.org/index.php/board,20.0.html Forum board]&lt;br /&gt;
* Source code: [https://www.codeblocks.org/downloads/source 20.03]&lt;br /&gt;
* Source code: [https://www.codeblocks.org/downloads/svn Current trunk]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{Layout_box2|1=&lt;br /&gt;
=== Other resources ===&lt;br /&gt;
* [https://www.codeblocks.org Main website]&lt;br /&gt;
* [https://forums.codeblocks.org/ Community forums]&lt;br /&gt;
* [irc://irc.freenode.net/codeblocks IRC channel] and [http://webchat.freenode.net/?channels=codeblocks IRC channel web access]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{Layout_box2|1=&lt;br /&gt;
=== Development ===&lt;br /&gt;
[[Image:Chk.png]][[Roadmap]] &lt;br /&gt;
* [[Developer documentation]]&lt;br /&gt;
* [http://sourceforge.net/projects/codeblocks/ Project page at Sourceforge]&lt;br /&gt;
* '''Bugs''': browse or submit [http://sourceforge.net/p/codeblocks/tickets/search/?q=_type%3ABug_Report+or+_type%3AUndefined bugs] or browse [http://alpha0010.github.io/cb-history/bugs.html old bugs]&lt;br /&gt;
* '''Features''': browse or submit [http://sourceforge.net/p/codeblocks/tickets/search/?q=_type%3AFeature_Request+or+_type%3AUndefined features] or browse [http://alpha0010.github.io/cb-history/features.html old features]&lt;br /&gt;
* '''Patches''': browse or submit [http://sourceforge.net/p/codeblocks/tickets/search/?q=_type%3APatch+or+_type%3AUndefined patches] or browse [http://alpha0010.github.io/cb-history/patches.html old patches]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{Layout_box3|1=&lt;br /&gt;
=== Supported compilers ===&lt;br /&gt;
* [http://gcc.gnu.org/ GNU GCC (incl. G77)] (Linux)* [https://www.mingw-w64.org/ MinGW-w64] (Win)&lt;br /&gt;
* [https://github.com/jmeubank/tdm-gcc/ TDM GCC] (Win)&lt;br /&gt;
* [https://www.msys2.org/ MSYS2] (Win)&lt;br /&gt;
* [https://www.cygwin.com/ Cygwin] (Win)&lt;br /&gt;
* [https://winlibs.com/ WinLibs GCC] (Win)&lt;br /&gt;
* [https://osdn.net/projects/mingw/ MinGW GCC (incl. G77)] (Win32)&lt;br /&gt;
* [http://mspgcc.sourceforge.net MSP430 GCC] (Win32)&lt;br /&gt;
* [http://www.hightec-rt.com TriCore and PowerPC GCC] (Win32, Linux)&lt;br /&gt;
* [https://developer.apple.com/xcode/ Apple XCode (GCC)] (Mac OS X)&lt;br /&gt;
&amp;lt;!-- Tested and working with Microsoft PSDK for Windows 2003 R2 and CodeBlocks b3577 --&amp;gt;&lt;br /&gt;
* [http://xona.com/2004/06/29.html Microsoft Visual C++ Toolkit 2003] (Win32)&lt;br /&gt;
* [https://visualstudio.microsoft.com/vs/community/ Microsoft Visual Community Edition] (Win)&lt;br /&gt;
* [http://edn.embarcadero.com/article/20633 Borland's C++ Compiler 5.5] (Win32)&lt;br /&gt;
* [http://www.digitalmars.com/ DigitalMars C/C++] (Win32)&lt;br /&gt;
* [https://github.com/open-watcom/open-watcom-v2 OpenWatcom V2] (Win32)&lt;br /&gt;
* [https://software.intel.com/en-us/c-compilers Intel C++ compiler] (Win32)&lt;br /&gt;
* [http://sdcc.sourceforge.net/ Small Device C Compiler (SDCC)]&lt;br /&gt;
* [http://dlang.org/ Digital Mars D] (Win32, Linux, Mac OS X)&lt;br /&gt;
* [https://gdcproject.org/ GDC D Compiler] (Linux)&lt;br /&gt;
* [https://github.com/ldc-developers/ldc/ LLVM D Compiler] (Win32, Linux, Mac OS X)&lt;br /&gt;
}}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;[https://www.codeblocks.org/about.shtml The Code::Blocks team]&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;[[Special:Allpages|Index]]&amp;lt;/center&amp;gt;&lt;/div&gt;</summary>
		<author><name>Ollydbg</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=CB_Clangd_Client&amp;diff=9554</id>
		<title>CB Clangd Client</title>
		<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php?title=CB_Clangd_Client&amp;diff=9554"/>
		<updated>2022-01-22T07:31:16Z</updated>

		<summary type="html">&lt;p&gt;Ollydbg: update format&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The home page of this plugin is: https://sourceforge.net/projects/cb-clangd-client/&lt;br /&gt;
&lt;br /&gt;
The main developer is Pecan.&lt;br /&gt;
&lt;br /&gt;
It uses [https://clangd.llvm.org/ clangd] through [https://en.wikipedia.org/wiki/Language_Server_Protocol Language Server Protocol].&lt;br /&gt;
&lt;br /&gt;
The related forum discussion is:  — [https://forums.codeblocks.org/index.php/topic,24357.msg166136.html Code completion using LSP and clangd]&lt;/div&gt;</summary>
		<author><name>Ollydbg</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=CB_Clangd_Client&amp;diff=9553</id>
		<title>CB Clangd Client</title>
		<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php?title=CB_Clangd_Client&amp;diff=9553"/>
		<updated>2022-01-22T07:28:16Z</updated>

		<summary type="html">&lt;p&gt;Ollydbg: create a new page for the clangd based code completion plugin&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The home page of this plugin is: https://sourceforge.net/projects/cb-clangd-client/&lt;br /&gt;
&lt;br /&gt;
The main developer is Pecan.&lt;br /&gt;
&lt;br /&gt;
It use the What is clangd? — &amp;lt;nowiki&amp;gt;https://clangd.llvm.org/&amp;lt;/nowiki&amp;gt; as a Language Server Protocol - Wikipedia — &amp;lt;nowiki&amp;gt;https://en.wikipedia.org/wiki/Language_Server_Protocol&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The related forum discussion is: Code completion using LSP and clangd — &amp;lt;nowiki&amp;gt;https://forums.codeblocks.org/index.php/topic,24357.msg166136.html#msg166136&amp;lt;/nowiki&amp;gt;&lt;/div&gt;</summary>
		<author><name>Ollydbg</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=Code::Blocks_Plugins&amp;diff=9552</id>
		<title>Code::Blocks Plugins</title>
		<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php?title=Code::Blocks_Plugins&amp;diff=9552"/>
		<updated>2022-01-22T07:24:02Z</updated>

		<summary type="html">&lt;p&gt;Ollydbg: /* Core Plugins */ add a new clangd based CC&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category: User Documentation]]&lt;br /&gt;
== General ==&lt;br /&gt;
&lt;br /&gt;
Code::Blocks' features can be extend by using '''plugins''', most of them listed on this page. There are generally three types of plugins:&lt;br /&gt;
# Core plugins - developed and maintained by the core C::B team.&lt;br /&gt;
# Contrib plugins - developed and maintained by the community and proven to be very valuable. So they are integrated into the C::B SVN.&lt;br /&gt;
# 3rd party plugins - developed and maintained by the community but not (yet?) in the C::B repository. Theses plugins often have their own repository or are being posted (including the source code) in the forums.&lt;br /&gt;
&lt;br /&gt;
'''If you are looking for plugins:'''&lt;br /&gt;
# Look in the official release. Notice that the installer / package manager might require you to enable some of the plugins specifically. So READ carefully.&lt;br /&gt;
# Search the forums for announcements, especially the forums at [/index.php/board,14.0.html].&lt;br /&gt;
# There might be information on the WiKi concerning other plugins on this page and '''[[Announcement_for_plugins/patches|here]]'''.&lt;br /&gt;
&lt;br /&gt;
For Windows users, the default behavior of the current installer (10.05) does '''not''' install contrib plugins. You need to manually check the &amp;quot;contrib plugin&amp;quot; checkbox when asked for selected components to install. There is no way to install them manually afterwards.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''If you are developing plugins:'''&lt;br /&gt;
&lt;br /&gt;
* Please read [https://wiki.codeblocks.org/index.php/Managing_Plug-in_Resources this page] for creating and producing a plugin.&lt;br /&gt;
* You will need to store the source code for the plugin for other developers to have access to it. You can do this on SourceForge or Github or your favorite source code repository web site.&lt;br /&gt;
* Setup your own webpage on a file sharing platform that can be used for documenting and distribution of the plugin. This will allow users to download the plugin to install on their Code::Blocks installation.&lt;br /&gt;
&lt;br /&gt;
Once you have a working and production ready plugin for other developers to use then you can do the following:&lt;br /&gt;
* Read [https://wiki.codeblocks.org/index.php/Announcement_for_plugins/patches this page] for information on how to announce you have a plugin on the Code::Blocks forum.&lt;br /&gt;
* In your announcement in the [https://forums.codeblocks.org/index.php/board,14.0.html forum] please also ask for your plugin to be added to the Code::Blocks wiki [https://wiki.codeblocks.org/index.php?title=Code::Blocks_Plugins plugin page] with the details you would like to see on the page.&lt;br /&gt;
&lt;br /&gt;
== Core Plugins ==&lt;br /&gt;
&lt;br /&gt;
The core plugins are installed by default and offer the basic functions of Code::Blocks. The core plugins are maintained / developed by the official development team.&lt;br /&gt;
&lt;br /&gt;
'''[[Abbreviations plugin|Abbreviations]]'''&lt;br /&gt;
:Code::Blocks AutoComplete plugin.&lt;br /&gt;
&lt;br /&gt;
'''[[Autosave plugin|Autosave]]'''&lt;br /&gt;
&lt;br /&gt;
:Saves project files between intervals.&lt;br /&gt;
&lt;br /&gt;
'''[[Class Wizard plugin|Class Wizard]]'''&lt;br /&gt;
&lt;br /&gt;
:Provides wizard for creating new classes.&lt;br /&gt;
&lt;br /&gt;
'''[[Code Completion plugin|Code Completion]]'''&lt;br /&gt;
&lt;br /&gt;
:Provides code completion functionality and class browser.&lt;br /&gt;
&lt;br /&gt;
'''[[CB Clangd Client|CB Clangd Client]]'''&lt;br /&gt;
&lt;br /&gt;
:Provides code completion functionality and class browser by Clangd through LSP.&lt;br /&gt;
&lt;br /&gt;
'''[[Compiler plugin|Compiler]]'''&lt;br /&gt;
&lt;br /&gt;
:Provides support for various compilers in one interface.&lt;br /&gt;
&lt;br /&gt;
'''[[Debugger plugin|Debugger]]'''&lt;br /&gt;
&lt;br /&gt;
:Provides support for various debuggers in one interface.&lt;br /&gt;
&lt;br /&gt;
'''[[File Extension Handler plugin|File Extensions Handler]]'''&lt;br /&gt;
&lt;br /&gt;
:Adds extra file extension handlers.&lt;br /&gt;
&lt;br /&gt;
'''[[Header Guard plugin|Header Guard]]''' ''(Disabled by default.)''&lt;br /&gt;
&lt;br /&gt;
:Create header guards (if needed) on file save.&lt;br /&gt;
&lt;br /&gt;
'''[[LogHacker plugin|LogHacker]]''' ''(Disabled by default.)''&lt;br /&gt;
&lt;br /&gt;
:Manipulate loggers.&lt;br /&gt;
&lt;br /&gt;
'''[[ModPoller plugin|ModPoller]]''' ''(Disabled by default.)''&lt;br /&gt;
&lt;br /&gt;
:Frequently check for external modification.&lt;br /&gt;
&lt;br /&gt;
'''[[Open Files List plugin|Open Files List]]'''&lt;br /&gt;
&lt;br /&gt;
:Manages a list of all opened files (editors).&lt;br /&gt;
&lt;br /&gt;
'''[[Projects Importer plugin|Projects Importer]]'''&lt;br /&gt;
&lt;br /&gt;
:Imports projects from other IDE's, e.g. MS Visual Studio and DevC++.&lt;br /&gt;
&lt;br /&gt;
'''[[Scripted Wizard plugin|Scripted Wizard]]'''&lt;br /&gt;
&lt;br /&gt;
:Provides scripted wizard functionality.&lt;br /&gt;
&lt;br /&gt;
'''[[Source Code Formatter plugin|Source Code Formatter]]''' (AStyle)&lt;br /&gt;
&lt;br /&gt;
:Formats source code files with specific style.&lt;br /&gt;
&lt;br /&gt;
'''[[Tidycmt plugin|Tidycmt]]''' ''(Disabled by default.)''&lt;br /&gt;
&lt;br /&gt;
:Formats comments on file save.&lt;br /&gt;
&lt;br /&gt;
'''[[To-Do List plugin|To-Do List]]'''&lt;br /&gt;
&lt;br /&gt;
:Adds to-do items to source code.&lt;br /&gt;
&lt;br /&gt;
'''[[WinXP Look'n'Feel plugin|WinXP Look'n'Feel]]'''&lt;br /&gt;
&lt;br /&gt;
:Creates manifest file which enables the version 6.0 of the Common Controls on Windows XP.&lt;br /&gt;
&lt;br /&gt;
== Contrib Plugins ==&lt;br /&gt;
&lt;br /&gt;
The user-''contrib''uted plugins are not installed by default and offer extended functionality for Code::Blocks. The contrib plugins are maintained / developed by third-party developers.&lt;br /&gt;
&lt;br /&gt;
'''[[Aligner plugin|Aligner]]'''&lt;br /&gt;
&lt;br /&gt;
:Code alignment.&lt;br /&gt;
&lt;br /&gt;
'''[[AutoVersioning plugin|Auto Versioning]]'''&lt;br /&gt;
&lt;br /&gt;
:Helps you keep track of your project version and status.&lt;br /&gt;
&lt;br /&gt;
'''[[Browse Tracker plugin|Browse Tracker]]'''&lt;br /&gt;
&lt;br /&gt;
:Browse to previous source positions.&lt;br /&gt;
&lt;br /&gt;
'''[[C::B Games plugin|C::B Games]]'''&lt;br /&gt;
&lt;br /&gt;
:Games in a integrated development environment? You bet.&lt;br /&gt;
&lt;br /&gt;
'''[[CCCC plugin|CCCC]]'''&lt;br /&gt;
&lt;br /&gt;
:Integrates CCCC tool for measurement of source code metrics (http://sourceforge.net/projects/cccc/) into Code::Blocks.&lt;br /&gt;
&lt;br /&gt;
'''[[Code Profiler plugin|Code Profiler]]'''&lt;br /&gt;
&lt;br /&gt;
:Provides graphical interface to GNU GProf profiler.&lt;br /&gt;
&lt;br /&gt;
'''[[Code Snippets plugin|Code Snippets]]'''&lt;br /&gt;
&lt;br /&gt;
:Manages small pieces of code (i.e. snippets).&lt;br /&gt;
&lt;br /&gt;
'''[[Code Statistics plugin|Code Statistics]]'''&lt;br /&gt;
&lt;br /&gt;
:Shows various statistics from source code files.&lt;br /&gt;
&lt;br /&gt;
'''[[Copy Strings to Clipboard plugin|Copy Strings to Clipboard]]'''&lt;br /&gt;
&lt;br /&gt;
:Copies literal strings from the current editor to clipboard.&lt;br /&gt;
&lt;br /&gt;
'''[[CppCheck plugin|CppCheck]]'''&lt;br /&gt;
&lt;br /&gt;
:Integrates the static code analyzer Cppcheck into Code::Blocks.&lt;br /&gt;
&lt;br /&gt;
'''[[Cscope plugin|Cscope]]'''&lt;br /&gt;
&lt;br /&gt;
:Integrates Cscope (http://cscope.sourceforge.net/) into Code::Blocks.&lt;br /&gt;
&lt;br /&gt;
'''[[DevPak Installer plugin|DevPak Installer]]'''&lt;br /&gt;
&lt;br /&gt;
:Installs and updates DevC++ DevPaks.&lt;br /&gt;
&lt;br /&gt;
'''[[DoxyBlocks plugin|DoxyBlocks]]'''&lt;br /&gt;
&lt;br /&gt;
:This plugin provides doxygen integration for Code::Blocks.&lt;br /&gt;
&lt;br /&gt;
'''[[DragScroll plugin|DragScroll]]'''&lt;br /&gt;
&lt;br /&gt;
:Enables dragging and scrolling with mouse.&lt;br /&gt;
&lt;br /&gt;
'''[[EditorConfig plugin|EditorConfig]]'''&lt;br /&gt;
&lt;br /&gt;
:This plugin implements the http://EditorConfig.org/ file format.&lt;br /&gt;
&lt;br /&gt;
'''[[Editor Tweaks plugin|Editor Tweaks]]'''&lt;br /&gt;
&lt;br /&gt;
:This plugin provides some additional tweaks for Code::Blocks editor.&lt;br /&gt;
&lt;br /&gt;
'''[[Environment Variables plugin|Environment Variables]]'''&lt;br /&gt;
&lt;br /&gt;
:Sets environment variables within the focus of Code::Blocks.&lt;br /&gt;
&lt;br /&gt;
'''[[File Manager plugin|File Manager]]'''&lt;br /&gt;
&lt;br /&gt;
:This plugin provides a simple file manager as a tab in the Code::Blocks management pane.&lt;br /&gt;
&lt;br /&gt;
'''[[Header Fixup plugin|Header Fixup]]'''&lt;br /&gt;
&lt;br /&gt;
:Adds missing includes/forward declarations to C++ source files.&lt;br /&gt;
&lt;br /&gt;
'''[[Help plugin|Help]]'''&lt;br /&gt;
&lt;br /&gt;
:Integrates third-party help files to the interface.&lt;br /&gt;
&lt;br /&gt;
'''[[HexEditor plugin|HexEditor]]'''&lt;br /&gt;
&lt;br /&gt;
:Opens files in a Code::Blocks integrated HexEditor.&lt;br /&gt;
&lt;br /&gt;
'''[[Incremental Search plugin|Incremental Search]]'''&lt;br /&gt;
&lt;br /&gt;
:Searches and highlights a marked text incrementally within the open editor.&lt;br /&gt;
&lt;br /&gt;
'''[[Keyboard Shortcuts plugin|Keyboard Shortcuts]]'''&lt;br /&gt;
&lt;br /&gt;
:Manages menu shortcuts.&lt;br /&gt;
&lt;br /&gt;
'''[[Koders plugin|Koders]]'''&lt;br /&gt;
&lt;br /&gt;
:Queries the Koders webpage for keywords.&lt;br /&gt;
&lt;br /&gt;
'''[[Library finder plugin|Library finder]]'''&lt;br /&gt;
&lt;br /&gt;
:Tool for automatically searching for installed libraries, and adding them to the project.&lt;br /&gt;
&lt;br /&gt;
'''[[NassiShneiderman plugin|NassiShneiderman]]'''&lt;br /&gt;
&lt;br /&gt;
:Allows the creation of Nassi Shneiderman diagrams within Code::Blocks.&lt;br /&gt;
&lt;br /&gt;
'''[[RegEx Testbed plugin|RegEx Testbed]]'''&lt;br /&gt;
&lt;br /&gt;
:Regular expressions testbed.&lt;br /&gt;
&lt;br /&gt;
'''[[ReopenEditor plugin|ReopenEditor]]'''&lt;br /&gt;
&lt;br /&gt;
:Reopen a closed editor via hotkey, menu-item, or from a list.&lt;br /&gt;
&lt;br /&gt;
'''[[Rndgen plugin|Rndgen]]'''&lt;br /&gt;
&lt;br /&gt;
:Generates random values (numbers or strings) when saving a file.&lt;br /&gt;
&lt;br /&gt;
'''[[SmartIndent plugin|SmartIndent]]'''&lt;br /&gt;
&lt;br /&gt;
:A suite of plugins that supply smart indenting for various languages.&lt;br /&gt;
&lt;br /&gt;
'''[[Source Exporter plugin|Source Exporter]]'''&lt;br /&gt;
&lt;br /&gt;
:Exports source code files to other formats such as HTML and PDF.&lt;br /&gt;
&lt;br /&gt;
'''[[SpellChecker plugin|SpellChecker]]'''&lt;br /&gt;
&lt;br /&gt;
:A plugin to check the spelling of strings and comments.&lt;br /&gt;
&lt;br /&gt;
'''[[Symbol Table plugin|Symbol Table]]'''&lt;br /&gt;
&lt;br /&gt;
:A simple graphical interface to the GNU symbol table displayer (nm).&lt;br /&gt;
&lt;br /&gt;
'''[[ThreadSearch plugin|ThreadSearch]]'''&lt;br /&gt;
&lt;br /&gt;
:Multi-threaded 'Search in files' with preview window.&lt;br /&gt;
&lt;br /&gt;
'''[[Tools+ plugin|Tools+]]'''&lt;br /&gt;
&lt;br /&gt;
:Creation and management of custom tools.&lt;br /&gt;
&lt;br /&gt;
'''[[Valgrind plugin|Valgrind]]'''&lt;br /&gt;
&lt;br /&gt;
:Valgrind analysis tools integration. (Valgrind does not run on Windows)&lt;br /&gt;
&lt;br /&gt;
'''[[wxSmith plugin|wxSmith]]'''&lt;br /&gt;
&lt;br /&gt;
:RAD tool for creating wxWidgets dialogs.&lt;br /&gt;
&lt;br /&gt;
== 3rd Party Plugins ==&lt;br /&gt;
&lt;br /&gt;
3rd party plugins - developed and maintained by the community but not (yet?) in the C::B repository. The contrib plugins are maintained / developed by third-party developers.&lt;br /&gt;
&lt;br /&gt;
'''[[DisplayEvents plugin|DisplayEvents]]'''&lt;br /&gt;
&lt;br /&gt;
:Display events that are registered with &amp;lt;tt&amp;gt;RegisterEventSink&amp;lt;/tt&amp;gt;, in the Code::Blocks Debug log.&lt;br /&gt;
&lt;br /&gt;
'''[[Fortran Project plugin|Fortran Project]]'''&lt;br /&gt;
&lt;br /&gt;
:This plugin provides symbol browser and code-completion for Fortran files.&lt;br /&gt;
&lt;br /&gt;
'''[[IPDefend Toolkit plugin|IPDefend Toolkit]]'''&lt;br /&gt;
&lt;br /&gt;
:This plugin enables creation of a licensed application in an easy way. Available at [http://www.comsytec.com/ipdefend.php]&lt;br /&gt;
&lt;br /&gt;
'''[[KeyMacs plugin|KeyMacs]]'''&lt;br /&gt;
&lt;br /&gt;
:KeyMacs (or Keyboard Macros) plugin enables Recording, Playback, and editing of keystroke macros.&lt;br /&gt;
&lt;br /&gt;
'''[[OccurrenceHighlighter plugin|OccurrenceHighlighter]]'''&lt;br /&gt;
&lt;br /&gt;
:This plugin highlights all occurrences of keywords on a list.&lt;br /&gt;
&lt;br /&gt;
'''[[Python plugins|Python]]'''&lt;br /&gt;
&lt;br /&gt;
:A set of plugins that provide a user interface for debugging python programs, completion hints for python code, and a python interpreter in a dockable window. &lt;br /&gt;
&lt;br /&gt;
'''[[Rss::Blocks plugin|Rss::Blocks]]'''&lt;br /&gt;
&lt;br /&gt;
:This plugin is an rss feeds reader. Available at [http://sourceforge.net/projects/rssblocks/ sourceforge/rssblocks]&lt;br /&gt;
&lt;br /&gt;
'''[[TRACE32 Debugger plugin|TRACE32 Debugger]]'''&lt;br /&gt;
&lt;br /&gt;
:Extends the Debugger plugin of Code::Blocks to work with the TRACE32 Debuggers. TRACE32 documentation &amp;quot;int_codeblock.pdf&amp;quot; and debuggert32.cbplugin are located on the enclosed SW CD on purchase of TRACE32&lt;br /&gt;
&lt;br /&gt;
'''[[EPS Debugger for STM32 plugin|EPS Debugger for STM32]]'''&lt;br /&gt;
&lt;br /&gt;
:Developing embedded applications for STM32 with ST Link 2. Available at [http://www.comsytec.eu/epsdebugger.php]&lt;br /&gt;
&lt;br /&gt;
'''[[Vim emulator plugin|Vim Plugin]]'''&lt;br /&gt;
&lt;br /&gt;
:Emulate the Vim's shortkeys in Code::Blocks editor. Available at [https://github.com/zmj64351508/cbvike cbvike on Github]&lt;br /&gt;
&lt;br /&gt;
If you have questions -&amp;gt; ask in the [/index.php/board,14.0.html forums].&lt;br /&gt;
&lt;br /&gt;
'''[[OpenFilesListPlus Plugin]]'''&lt;br /&gt;
&lt;br /&gt;
:Enhanced version of the OpenFilesList plugin. Available at [https://github.com/earlgrey-bis/cb-OpenFilesListPlus on Github]&lt;br /&gt;
&lt;br /&gt;
'''[[SourceTrail Plugin]]'''&lt;br /&gt;
&lt;br /&gt;
:Interface to [https://www.sourcetrail.com/ on SourceTrail]. Available at [https://github.com/martim01/sourcetrail on Github]&lt;br /&gt;
&lt;br /&gt;
If you have questions -&amp;gt; ask in the [/index.php/topic,23588.0.html forums].&lt;br /&gt;
&lt;br /&gt;
'''[[cbSystemView]]'''&lt;br /&gt;
&lt;br /&gt;
:A plugin to use SVD files for embedded development. Available at [https://github.com/bluehazzard/cbSystemView on Github]&lt;br /&gt;
&lt;br /&gt;
'''[[cbMemoryView]]'''&lt;br /&gt;
&lt;br /&gt;
:A plugin to view memory locations with multiple tabs. Available at [https://github.com/bluehazzard/cbMemoryView on Github]&lt;br /&gt;
&lt;br /&gt;
'''[[cbBuildTools ]]'''&lt;br /&gt;
&lt;br /&gt;
:A little plugin that displays the targets in a tree, for easy building. Available at [https://github.com/bluehazzard/cbBuildTools on Github]&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
* [[Announcement for plugins/patches|Announcement for plugins/patches]] These are not stable plugins in many cases&lt;/div&gt;</summary>
		<author><name>Ollydbg</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=Main_Page&amp;diff=9551</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php?title=Main_Page&amp;diff=9551"/>
		<updated>2022-01-22T07:04:14Z</updated>

		<summary type="html">&lt;p&gt;Ollydbg: update links&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOEDITSECTION__ __NOTOC__&lt;br /&gt;
{{Layout_box1|1=&lt;br /&gt;
[[Image:cb_splash.png|left]]&lt;br /&gt;
'''Welcome to the official Wiki for Code::Blocks'''&amp;lt;br&amp;gt;&lt;br /&gt;
[https://www.codeblocks.org Code::Blocks] is a free, open-source, cross-platform [[wikipedia:Integrated Development Environment|IDE]]. Using a plugin architecture, its capabilities and features are defined by the provided plugins.&amp;lt;br&amp;gt;&lt;br /&gt;
Currently, [https://www.codeblocks.org Code::Blocks] is oriented towards C/C++/Fortran.&lt;br /&gt;
The Code::Blocks team does not take responsibility for the content nor accuracy of these pages.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;small&amp;gt;Wiki Editors: In order to login to edit pages, you must create an account on the [/ forums]. Use the same username and password for the wiki. Read the [[Help:Contents|Help]] for editing guidelines. Look in the [[CodeBlocks:Community_Portal|community portal]] for things to do.&lt;br /&gt;
&amp;lt;/small&amp;gt;&lt;br /&gt;
&amp;lt;br clear=&amp;quot;all&amp;quot; /&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{|width=&amp;quot;100%&amp;quot; background-color=&amp;quot;transparent&amp;quot; &lt;br /&gt;
|width=&amp;quot;60%&amp;quot; valign=&amp;quot;top&amp;quot;|&lt;br /&gt;
&amp;lt;!-- LEFT --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Did you know that using Layout_box2 here instead of &amp;lt;div&amp;gt; breaks the inner table? Strange... --&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;background-color: #dfeefb; border: 1px dotted #010101; margin: 5px; padding: 5px;&amp;quot;&amp;gt;&lt;br /&gt;
{|align=&amp;quot;center&amp;quot; style=&amp;quot;background:transparent&amp;quot; cellspacing=&amp;quot;5&amp;quot;&lt;br /&gt;
&lt;br /&gt;
|valign=&amp;quot;top&amp;quot; align=&amp;quot;center&amp;quot; colspan=&amp;quot;2&amp;quot;|&lt;br /&gt;
=== How do I... ===&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|&lt;br /&gt;
'''[[Installing_Code::Blocks|...install Code::Blocks?]]'''&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:.9em&amp;quot;&amp;gt;&lt;br /&gt;
[[Installing_the_latest_official_version_of_Code::Blocks_on_Windows|Windows]] &amp;amp;middot;&lt;br /&gt;
[[Installing_Code::Blocks#Ubuntu|Ubuntu]] &amp;amp;middot;&lt;br /&gt;
[[Installing_Code::Blocks#Mac_OS_X|Mac OS X]] &amp;amp;middot;&lt;br /&gt;
[[Installing_Code::Blocks#Fedora|Fedora]] &amp;amp;middot;&lt;br /&gt;
[[Installing_Code::Blocks|more...]]&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|&lt;br /&gt;
'''[[Installing_a_supported_compiler|...set up a compiler in Code::Blocks?]]'''&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:.9em&amp;quot;&amp;gt;&lt;br /&gt;
[[Installing_a_supported_compiler#MinGW.2FGCC|MinGW]] &amp;amp;middot;&lt;br /&gt;
[[Installing_a_supported_compiler#Microsoft_Visual_C.2B.2B|MS Visual C++]] &amp;amp;middot;&lt;br /&gt;
[[Installing_a_supported_compiler|more...]]&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|&lt;br /&gt;
'''[[Creating a new project|...create a new project?]]'''&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:.9em&amp;quot;&amp;gt;&lt;br /&gt;
[[Creating a new project#Changing file composition|Add files]] &amp;amp;middot;&lt;br /&gt;
[[Creating a new project#Modifying build options|Build options]] &amp;amp;middot;&lt;br /&gt;
[[Creating a new project#Virtual Targets|Virtual Targets]] &amp;amp;middot;&lt;br /&gt;
[[Creating a new project|more...]]&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|&lt;br /&gt;
'''[[Debugging_with_Code::Blocks|...debug my program?]]'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|&lt;br /&gt;
'''[[FAQ-Settings#Q: How do I make Code::Blocks portable?|...make Code::Blocks portable?]]'''&lt;br /&gt;
&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|&lt;br /&gt;
'''[[User_documentation#Third-party_libraries|...use a 3rd-party library?]]'''&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:.9em&amp;quot;&amp;gt;&lt;br /&gt;
[[Using_wxWidgets|wxWidgets]] &amp;amp;middot;&lt;br /&gt;
[[Using_Boost|Boost]] &amp;amp;middot;&lt;br /&gt;
[[Using_SDL_with_Code::Blocks|SDL]] &amp;amp;middot;&lt;br /&gt;
[[User_documentation#Third-party_libraries|more...]]&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{Layout_box3|1=&lt;br /&gt;
== Table of Contents ==&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:.9em&amp;quot;&amp;gt;''Main article: [[Code::Blocks Documentation]]''&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== [[User documentation]] ===&lt;br /&gt;
:Articles for Code::Blocks users&lt;br /&gt;
&lt;br /&gt;
=== [[FAQ]] ===&lt;br /&gt;
:Frequently Asked Questions&lt;br /&gt;
&lt;br /&gt;
=== [[Feature List]] ===&lt;br /&gt;
:An index of Code::Blocks' useful features&lt;br /&gt;
&lt;br /&gt;
=== [[Code::Blocks Plugins]] ===&lt;br /&gt;
:Plugins extend Code::Blocks' functionality&lt;br /&gt;
&lt;br /&gt;
=== [[Off-site documentation]] ===&lt;br /&gt;
:Links to external documentation&lt;br /&gt;
&lt;br /&gt;
=== [[Developer documentation]] ===&lt;br /&gt;
:Articles for developers of Code::Blocks itself&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
|width=&amp;quot;40%&amp;quot; valign=&amp;quot;top&amp;quot;|&lt;br /&gt;
&amp;lt;!-- RIGHT --&amp;gt;&lt;br /&gt;
{{Layout_box4|1=&lt;br /&gt;
=== Download Code::Blocks ===&lt;br /&gt;
* Latest official release: [https://www.codeblocks.org/downloads/binaries 20.03]&lt;br /&gt;
* Nightly builds: [https://forums.codeblocks.org/index.php/board,20.0.html Forum board]&lt;br /&gt;
* Source code: [https://www.codeblocks.org/downloads/source 20.03]&lt;br /&gt;
* Source code: [https://www.codeblocks.org/downloads/svn Current trunk]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{Layout_box2|1=&lt;br /&gt;
=== Other resources ===&lt;br /&gt;
* [https://www.codeblocks.org Main website]&lt;br /&gt;
* [https://forums.codeblocks.org/ Community forums]&lt;br /&gt;
* [irc://irc.freenode.net/codeblocks IRC channel] and [http://webchat.freenode.net/?channels=codeblocks IRC channel web access]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{Layout_box2|1=&lt;br /&gt;
=== Development ===&lt;br /&gt;
[[Image:Chk.png]][[Roadmap]] &lt;br /&gt;
* [[Developer documentation]]&lt;br /&gt;
* [http://sourceforge.net/projects/codeblocks/ Project page at Sourceforge]&lt;br /&gt;
* '''Bugs''': browse or submit [http://sourceforge.net/p/codeblocks/tickets/search/?q=_type%3ABug_Report+or+_type%3AUndefined bugs] or browse [http://alpha0010.github.io/cb-history/bugs.html old bugs]&lt;br /&gt;
* '''Features''': browse or submit [http://sourceforge.net/p/codeblocks/tickets/search/?q=_type%3AFeature_Request+or+_type%3AUndefined features] or browse [http://alpha0010.github.io/cb-history/features.html old features]&lt;br /&gt;
* '''Patches''': browse or submit [http://sourceforge.net/p/codeblocks/tickets/search/?q=_type%3APatch+or+_type%3AUndefined patches] or browse [http://alpha0010.github.io/cb-history/patches.html old patches]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{Layout_box3|1=&lt;br /&gt;
=== Supported compilers ===&lt;br /&gt;
* [http://gcc.gnu.org/ GNU GCC (incl. G77)] (Linux)&lt;br /&gt;
* [https://osdn.net/projects/mingw/ MinGW GCC (incl. G77)] (Win32)&lt;br /&gt;
* [http://mspgcc.sourceforge.net MSP430 GCC] (Win32)&lt;br /&gt;
* [http://www.hightec-rt.com TriCore and PowerPC GCC] (Win32, Linux)&lt;br /&gt;
* [http://developer.apple.com/tools/ Apple GCC (Xcode)] (Mac OS X)&lt;br /&gt;
&amp;lt;!-- Tested and working with Microsoft PSDK for Windows 2003 R2 and CodeBlocks b3577 --&amp;gt;&lt;br /&gt;
* [http://xona.com/2004/06/29.html Microsoft Visual C++ Toolkit 2003] (Win32) &lt;br /&gt;
* [http://msdn.microsoft.com/vstudio/express/visualc/download/ Microsoft Visual C++ 2005] (Win32)&lt;br /&gt;
* [http://edn.embarcadero.com/article/20633 Borland's C++ Compiler 5.5] (Win32)&lt;br /&gt;
* [http://www.digitalmars.com/ DigitalMars C/C++] (Win32)&lt;br /&gt;
* [http://open-watcom.github.io/ OpenWatcom] (Win32)&lt;br /&gt;
* [https://software.intel.com/en-us/c-compilers Intel C++ compiler] (Win32)&lt;br /&gt;
* [http://sdcc.sourceforge.net/ Small Device C Compiler (SDCC)]&lt;br /&gt;
* [http://dlang.org/ Digital Mars D]&lt;br /&gt;
* [https://gdcproject.org/ GDC D Compiler]&lt;br /&gt;
* [https://github.com/ldc-developers/ldc/ LLVM D Compiler]&lt;br /&gt;
}}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;[https://www.codeblocks.org/about.shtml The Code::Blocks team]&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;[[Special:Allpages|Index]]&amp;lt;/center&amp;gt;&lt;/div&gt;</summary>
		<author><name>Ollydbg</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=Main_Page&amp;diff=9550</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php?title=Main_Page&amp;diff=9550"/>
		<updated>2022-01-22T06:59:50Z</updated>

		<summary type="html">&lt;p&gt;Ollydbg: update mingw site&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOEDITSECTION__ __NOTOC__&lt;br /&gt;
{{Layout_box1|1=&lt;br /&gt;
[[Image:cb_splash.png|left]]&lt;br /&gt;
'''Welcome to the official Wiki for Code::Blocks'''&amp;lt;br&amp;gt;&lt;br /&gt;
[https://www.codeblocks.org Code::Blocks] is a free, open-source, cross-platform [[wikipedia:Integrated Development Environment|IDE]]. Using a plugin architecture, its capabilities and features are defined by the provided plugins.&amp;lt;br&amp;gt;&lt;br /&gt;
Currently, [https://www.codeblocks.org Code::Blocks] is oriented towards C/C++/Fortran.&lt;br /&gt;
The Code::Blocks team does not take responsibility for the content nor accuracy of these pages.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;small&amp;gt;Wiki Editors: In order to login to edit pages, you must create an account on the [/ forums]. Use the same username and password for the wiki. Read the [[Help:Contents|Help]] for editing guidelines. Look in the [[CodeBlocks:Community_Portal|community portal]] for things to do.&lt;br /&gt;
&amp;lt;/small&amp;gt;&lt;br /&gt;
&amp;lt;br clear=&amp;quot;all&amp;quot; /&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{|width=&amp;quot;100%&amp;quot; background-color=&amp;quot;transparent&amp;quot; &lt;br /&gt;
|width=&amp;quot;60%&amp;quot; valign=&amp;quot;top&amp;quot;|&lt;br /&gt;
&amp;lt;!-- LEFT --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Did you know that using Layout_box2 here instead of &amp;lt;div&amp;gt; breaks the inner table? Strange... --&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;background-color: #dfeefb; border: 1px dotted #010101; margin: 5px; padding: 5px;&amp;quot;&amp;gt;&lt;br /&gt;
{|align=&amp;quot;center&amp;quot; style=&amp;quot;background:transparent&amp;quot; cellspacing=&amp;quot;5&amp;quot;&lt;br /&gt;
&lt;br /&gt;
|valign=&amp;quot;top&amp;quot; align=&amp;quot;center&amp;quot; colspan=&amp;quot;2&amp;quot;|&lt;br /&gt;
=== How do I... ===&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|&lt;br /&gt;
'''[[Installing_Code::Blocks|...install Code::Blocks?]]'''&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:.9em&amp;quot;&amp;gt;&lt;br /&gt;
[[Installing_the_latest_official_version_of_Code::Blocks_on_Windows|Windows]] &amp;amp;middot;&lt;br /&gt;
[[Installing_Code::Blocks#Ubuntu|Ubuntu]] &amp;amp;middot;&lt;br /&gt;
[[Installing_Code::Blocks#Mac_OS_X|Mac OS X]] &amp;amp;middot;&lt;br /&gt;
[[Installing_Code::Blocks#Fedora|Fedora]] &amp;amp;middot;&lt;br /&gt;
[[Installing_Code::Blocks|more...]]&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|&lt;br /&gt;
'''[[Installing_a_supported_compiler|...set up a compiler in Code::Blocks?]]'''&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:.9em&amp;quot;&amp;gt;&lt;br /&gt;
[[Installing_a_supported_compiler#MinGW.2FGCC|MinGW]] &amp;amp;middot;&lt;br /&gt;
[[Installing_a_supported_compiler#Microsoft_Visual_C.2B.2B|MS Visual C++]] &amp;amp;middot;&lt;br /&gt;
[[Installing_a_supported_compiler|more...]]&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|&lt;br /&gt;
'''[[Creating a new project|...create a new project?]]'''&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:.9em&amp;quot;&amp;gt;&lt;br /&gt;
[[Creating a new project#Changing file composition|Add files]] &amp;amp;middot;&lt;br /&gt;
[[Creating a new project#Modifying build options|Build options]] &amp;amp;middot;&lt;br /&gt;
[[Creating a new project#Virtual Targets|Virtual Targets]] &amp;amp;middot;&lt;br /&gt;
[[Creating a new project|more...]]&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|&lt;br /&gt;
'''[[Debugging_with_Code::Blocks|...debug my program?]]'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|&lt;br /&gt;
'''[[FAQ-Settings#Q: How do I make Code::Blocks portable?|...make Code::Blocks portable?]]'''&lt;br /&gt;
&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|&lt;br /&gt;
'''[[User_documentation#Third-party_libraries|...use a 3rd-party library?]]'''&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:.9em&amp;quot;&amp;gt;&lt;br /&gt;
[[Using_wxWidgets|wxWidgets]] &amp;amp;middot;&lt;br /&gt;
[[Using_Boost|Boost]] &amp;amp;middot;&lt;br /&gt;
[[Using_SDL_with_Code::Blocks|SDL]] &amp;amp;middot;&lt;br /&gt;
[[User_documentation#Third-party_libraries|more...]]&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{Layout_box3|1=&lt;br /&gt;
== Table of Contents ==&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:.9em&amp;quot;&amp;gt;''Main article: [[Code::Blocks Documentation]]''&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== [[User documentation]] ===&lt;br /&gt;
:Articles for Code::Blocks users&lt;br /&gt;
&lt;br /&gt;
=== [[FAQ]] ===&lt;br /&gt;
:Frequently Asked Questions&lt;br /&gt;
&lt;br /&gt;
=== [[Feature List]] ===&lt;br /&gt;
:An index of Code::Blocks' useful features&lt;br /&gt;
&lt;br /&gt;
=== [[Code::Blocks Plugins]] ===&lt;br /&gt;
:Plugins extend Code::Blocks' functionality&lt;br /&gt;
&lt;br /&gt;
=== [[Off-site documentation]] ===&lt;br /&gt;
:Links to external documentation&lt;br /&gt;
&lt;br /&gt;
=== [[Developer documentation]] ===&lt;br /&gt;
:Articles for developers of Code::Blocks itself&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
|width=&amp;quot;40%&amp;quot; valign=&amp;quot;top&amp;quot;|&lt;br /&gt;
&amp;lt;!-- RIGHT --&amp;gt;&lt;br /&gt;
{{Layout_box4|1=&lt;br /&gt;
=== Download Code::Blocks ===&lt;br /&gt;
* Latest official release: [https://www.codeblocks.org/downloads/binaries 20.03]&lt;br /&gt;
* Nightly builds: [https://forums.codeblocks.org/index.php/board,20.0.html Forum board]&lt;br /&gt;
* Source code: [https://www.codeblocks.org/downloads/source 20.03]&lt;br /&gt;
* Source code: [https://www.codeblocks.org/downloads/svn Current trunk]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{Layout_box2|1=&lt;br /&gt;
=== Other resources ===&lt;br /&gt;
* [https://www.codeblocks.org Main website]&lt;br /&gt;
* [https://forums.codeblocks.org/ Community forums]&lt;br /&gt;
* [irc://irc.freenode.net/codeblocks IRC channel] and [http://webchat.freenode.net/?channels=codeblocks IRC channel web access]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{Layout_box2|1=&lt;br /&gt;
=== Development ===&lt;br /&gt;
[[Image:Chk.png]][[Roadmap]] &lt;br /&gt;
* [[Developer documentation]]&lt;br /&gt;
* [http://sourceforge.net/projects/codeblocks/ Project page at Sourceforge]&lt;br /&gt;
* '''Bugs''': browse or submit [http://sourceforge.net/p/codeblocks/tickets/search/?q=_type%3ABug_Report+or+_type%3AUndefined bugs] or browse [http://alpha0010.github.io/cb-history/bugs.html old bugs]&lt;br /&gt;
* '''Features''': browse or submit [http://sourceforge.net/p/codeblocks/tickets/search/?q=_type%3AFeature_Request+or+_type%3AUndefined features] or browse [http://alpha0010.github.io/cb-history/features.html old features]&lt;br /&gt;
* '''Patches''': browse or submit [http://sourceforge.net/p/codeblocks/tickets/search/?q=_type%3APatch+or+_type%3AUndefined patches] or browse [http://alpha0010.github.io/cb-history/patches.html old patches]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{Layout_box3|1=&lt;br /&gt;
=== Supported compilers ===&lt;br /&gt;
* [http://gcc.gnu.org/ GNU GCC (incl. G77)] (Linux)&lt;br /&gt;
* [https://osdn.net/projects/mingw/ MinGW GCC (incl. G77)] (Win32)&lt;br /&gt;
* [http://mspgcc.sourceforge.net MSP430 GCC] (Win32)&lt;br /&gt;
* [http://www.hightec-rt.com TriCore and PowerPC GCC] (Win32, Linux)&lt;br /&gt;
* [http://developer.apple.com/tools/ Apple GCC (Xcode)] (Mac OS X)&lt;br /&gt;
&amp;lt;!-- Tested and working with Microsoft PSDK for Windows 2003 R2 and CodeBlocks b3577 --&amp;gt;&lt;br /&gt;
* [http://xona.com/2004/06/29.html Microsoft Visual C++ Toolkit 2003] (Win32) &lt;br /&gt;
* [http://msdn.microsoft.com/vstudio/express/visualc/download/ Microsoft Visual C++ 2005] (Win32)&lt;br /&gt;
* [http://edn.embarcadero.com/article/20633 Borland's C++ Compiler 5.5] (Win32)&lt;br /&gt;
* [http://www.digitalmars.com/ DigitalMars C/C++] (Win32)&lt;br /&gt;
* [http://openwatcom.org/index.php/Main_Page OpenWatcom] (Win32)&lt;br /&gt;
* [https://software.intel.com/en-us/c-compilers Intel C++ compiler] (Win32)&lt;br /&gt;
* [http://sdcc.sourceforge.net/ Small Device C Compiler (SDCC)]&lt;br /&gt;
* [http://dlang.org/ Digital Mars D]&lt;br /&gt;
* [http://dgcc.sourceforge.net/ GDC D Compiler]&lt;br /&gt;
* [https://github.com/ldc-developers/ldc/ LLVM D Compiler]&lt;br /&gt;
}}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;[https://www.codeblocks.org/about.shtml The Code::Blocks team]&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;[[Special:Allpages|Index]]&amp;lt;/center&amp;gt;&lt;/div&gt;</summary>
		<author><name>Ollydbg</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=Main_Page&amp;diff=9527</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php?title=Main_Page&amp;diff=9527"/>
		<updated>2021-10-28T07:40:25Z</updated>

		<summary type="html">&lt;p&gt;Ollydbg: add the forum link&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOEDITSECTION__ __NOTOC__&lt;br /&gt;
{{Layout_box1|1=&lt;br /&gt;
[[Image:cb_splash.png|left]]&lt;br /&gt;
'''Welcome to the official Wiki for Code::Blocks'''&amp;lt;br&amp;gt;&lt;br /&gt;
[https://www.codeblocks.org Code::Blocks] is a free, open-source, cross-platform [[wikipedia:Integrated Development Environment|IDE]]. Using a plugin architecture, its capabilities and features are defined by the provided plugins.&amp;lt;br&amp;gt;&lt;br /&gt;
Currently, [https://www.codeblocks.org Code::Blocks] is oriented towards C/C++/Fortran.&lt;br /&gt;
The Code::Blocks team does not take responsibility for the content nor accuracy of these pages.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;small&amp;gt;Wiki Editors: In order to login to edit pages, you must create an account on the [/ forums]. Use the same username and password for the wiki. Read the [[Help:Contents|Help]] for editing guidelines. Look in the [[CodeBlocks:Community_Portal|community portal]] for things to do.&lt;br /&gt;
&amp;lt;/small&amp;gt;&lt;br /&gt;
&amp;lt;br clear=&amp;quot;all&amp;quot; /&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{|width=&amp;quot;100%&amp;quot; background-color=&amp;quot;transparent&amp;quot; &lt;br /&gt;
|width=&amp;quot;60%&amp;quot; valign=&amp;quot;top&amp;quot;|&lt;br /&gt;
&amp;lt;!-- LEFT --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Did you know that using Layout_box2 here instead of &amp;lt;div&amp;gt; breaks the inner table? Strange... --&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;background-color: #dfeefb; border: 1px dotted #010101; margin: 5px; padding: 5px;&amp;quot;&amp;gt;&lt;br /&gt;
{|align=&amp;quot;center&amp;quot; style=&amp;quot;background:transparent&amp;quot; cellspacing=&amp;quot;5&amp;quot;&lt;br /&gt;
&lt;br /&gt;
|valign=&amp;quot;top&amp;quot; align=&amp;quot;center&amp;quot; colspan=&amp;quot;2&amp;quot;|&lt;br /&gt;
=== How do I... ===&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|&lt;br /&gt;
'''[[Installing_Code::Blocks|...install Code::Blocks?]]'''&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:.9em&amp;quot;&amp;gt;&lt;br /&gt;
[[Installing_the_latest_official_version_of_Code::Blocks_on_Windows|Windows]] &amp;amp;middot;&lt;br /&gt;
[[Installing_Code::Blocks#Ubuntu|Ubuntu]] &amp;amp;middot;&lt;br /&gt;
[[Installing_Code::Blocks#Mac_OS_X|Mac OS X]] &amp;amp;middot;&lt;br /&gt;
[[Installing_Code::Blocks#Fedora|Fedora]] &amp;amp;middot;&lt;br /&gt;
[[Installing_Code::Blocks|more...]]&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|&lt;br /&gt;
'''[[Installing_a_supported_compiler|...set up a compiler in Code::Blocks?]]'''&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:.9em&amp;quot;&amp;gt;&lt;br /&gt;
[[Installing_a_supported_compiler#MinGW.2FGCC|MinGW]] &amp;amp;middot;&lt;br /&gt;
[[Installing_a_supported_compiler#Microsoft_Visual_C.2B.2B|MS Visual C++]] &amp;amp;middot;&lt;br /&gt;
[[Installing_a_supported_compiler|more...]]&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|&lt;br /&gt;
'''[[Creating a new project|...create a new project?]]'''&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:.9em&amp;quot;&amp;gt;&lt;br /&gt;
[[Creating a new project#Changing file composition|Add files]] &amp;amp;middot;&lt;br /&gt;
[[Creating a new project#Modifying build options|Build options]] &amp;amp;middot;&lt;br /&gt;
[[Creating a new project#Virtual Targets|Virtual Targets]] &amp;amp;middot;&lt;br /&gt;
[[Creating a new project|more...]]&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|&lt;br /&gt;
'''[[Debugging_with_Code::Blocks|...debug my program?]]'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|&lt;br /&gt;
'''[[FAQ-Settings#Q: How do I make Code::Blocks portable?|...make Code::Blocks portable?]]'''&lt;br /&gt;
&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|&lt;br /&gt;
'''[[User_documentation#Third-party_libraries|...use a 3rd-party library?]]'''&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:.9em&amp;quot;&amp;gt;&lt;br /&gt;
[[Using_wxWidgets|wxWidgets]] &amp;amp;middot;&lt;br /&gt;
[[Using_Boost|Boost]] &amp;amp;middot;&lt;br /&gt;
[[Using_SDL_with_Code::Blocks|SDL]] &amp;amp;middot;&lt;br /&gt;
[[User_documentation#Third-party_libraries|more...]]&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{Layout_box3|1=&lt;br /&gt;
== Table of Contents ==&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:.9em&amp;quot;&amp;gt;''Main article: [[Code::Blocks Documentation]]''&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== [[User documentation]] ===&lt;br /&gt;
:Articles for Code::Blocks users&lt;br /&gt;
&lt;br /&gt;
=== [[FAQ]] ===&lt;br /&gt;
:Frequently Asked Questions&lt;br /&gt;
&lt;br /&gt;
=== [[Feature List]] ===&lt;br /&gt;
:An index of Code::Blocks' useful features&lt;br /&gt;
&lt;br /&gt;
=== [[Code::Blocks Plugins]] ===&lt;br /&gt;
:Plugins extend Code::Blocks' functionality&lt;br /&gt;
&lt;br /&gt;
=== [[Off-site documentation]] ===&lt;br /&gt;
:Links to external documentation&lt;br /&gt;
&lt;br /&gt;
=== [[Developer documentation]] ===&lt;br /&gt;
:Articles for developers of Code::Blocks itself&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
|width=&amp;quot;40%&amp;quot; valign=&amp;quot;top&amp;quot;|&lt;br /&gt;
&amp;lt;!-- RIGHT --&amp;gt;&lt;br /&gt;
{{Layout_box4|1=&lt;br /&gt;
=== Download Code::Blocks ===&lt;br /&gt;
* Latest official release: [https://www.codeblocks.org/downloads/binaries 20.03]&lt;br /&gt;
* [/index.php?board=20.0 Nightly builds] (updated each night)&lt;br /&gt;
* [[Compiled_packages_of_Code::Blocks|Official and third-party binaries]] (for various distributions)&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{Layout_box2|1=&lt;br /&gt;
=== Other resources ===&lt;br /&gt;
* [https://www.codeblocks.org Main website]&lt;br /&gt;
* [https://forums.codeblocks.org/ Community forums]&lt;br /&gt;
* [irc://irc.freenode.net/codeblocks IRC channel] and [http://webchat.freenode.net/?channels=codeblocks IRC channel web access]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{Layout_box2|1=&lt;br /&gt;
=== Development ===&lt;br /&gt;
[[Image:Chk.png]][[Roadmap]] &lt;br /&gt;
* [[Developer documentation]]&lt;br /&gt;
* [http://sourceforge.net/projects/codeblocks/ Project page at Sourceforge]&lt;br /&gt;
* '''Bugs''': browse or submit [http://sourceforge.net/p/codeblocks/tickets/search/?q=_type%3ABug_Report+or+_type%3AUndefined bugs] or browse [http://alpha0010.github.io/cb-history/bugs.html old bugs]&lt;br /&gt;
* '''Features''': browse or submit [http://sourceforge.net/p/codeblocks/tickets/search/?q=_type%3AFeature_Request+or+_type%3AUndefined features] or browse [http://alpha0010.github.io/cb-history/features.html old features]&lt;br /&gt;
* '''Patches''': browse or submit [http://sourceforge.net/p/codeblocks/tickets/search/?q=_type%3APatch+or+_type%3AUndefined patches] or browse [http://alpha0010.github.io/cb-history/patches.html old patches]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{Layout_box3|1=&lt;br /&gt;
=== Supported compilers ===&lt;br /&gt;
* [http://gcc.gnu.org/ GNU GCC (incl. G77)] (Linux)&lt;br /&gt;
* [http://www.mingw.org MinGW GCC (incl. G77)] (Win32)&lt;br /&gt;
* [http://mspgcc.sourceforge.net MSP430 GCC] (Win32)&lt;br /&gt;
* [http://www.hightec-rt.com TriCore and PowerPC GCC] (Win32, Linux)&lt;br /&gt;
* [http://developer.apple.com/tools/ Apple GCC (Xcode)] (Mac OS X)&lt;br /&gt;
&amp;lt;!-- Tested and working with Microsoft PSDK for Windows 2003 R2 and CodeBlocks b3577 --&amp;gt;&lt;br /&gt;
* [http://xona.com/2004/06/29.html Microsoft Visual C++ Toolkit 2003] (Win32) &lt;br /&gt;
* [http://msdn.microsoft.com/vstudio/express/visualc/download/ Microsoft Visual C++ 2005] (Win32)&lt;br /&gt;
* [http://edn.embarcadero.com/article/20633 Borland's C++ Compiler 5.5] (Win32)&lt;br /&gt;
* [http://www.digitalmars.com/ DigitalMars C/C++] (Win32)&lt;br /&gt;
* [http://openwatcom.org/index.php/Main_Page OpenWatcom] (Win32)&lt;br /&gt;
* [https://software.intel.com/en-us/c-compilers Intel C++ compiler] (Win32)&lt;br /&gt;
* [http://sdcc.sourceforge.net/ Small Device C Compiler (SDCC)]&lt;br /&gt;
* [http://dlang.org/ Digital Mars D]&lt;br /&gt;
* [http://dgcc.sourceforge.net/ GDC D Compiler]&lt;br /&gt;
* [https://github.com/ldc-developers/ldc/ LLVM D Compiler]&lt;br /&gt;
}}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;[https://www.codeblocks.org/about.shtml The Code::Blocks team]&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;[[Special:Allpages|Index]]&amp;lt;/center&amp;gt;&lt;/div&gt;</summary>
		<author><name>Ollydbg</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=Configure_GDB_pretty_printer_for_Msys2&amp;diff=9521</id>
		<title>Configure GDB pretty printer for Msys2</title>
		<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php?title=Configure_GDB_pretty_printer_for_Msys2&amp;diff=9521"/>
		<updated>2021-03-20T12:01:33Z</updated>

		<summary type="html">&lt;p&gt;Ollydbg: a new page for configure the pretty printer for msys2&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This is my way to use gdb python pretty printer for the libstdcxx under msys2.&lt;br /&gt;
Suppose you use 64bit gcc compiler. My msys2 is installed under F:\msys64&lt;br /&gt;
&lt;br /&gt;
In the Menu-&amp;gt;Settings-&amp;gt;Debugger settings. Open the debugger plugin setting dialog.&lt;br /&gt;
&lt;br /&gt;
Then, in the &amp;quot;Executable path&amp;quot; field, select &amp;quot;F:\msys64\mingw64\bin\gdb.exe&amp;quot;&lt;br /&gt;
in the &amp;quot;Debugger initialization commands&amp;quot; field, put the following text in the edit control.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
source F:\msys64\mingw64\etc\gdbinit&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
I see that I have to modify the file &amp;quot;F:\msys64\mingw64\etc\gdbinit&amp;quot; file: below is the original code&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
python&lt;br /&gt;
import sys&lt;br /&gt;
sys.path.insert(0, sys.path[0] + '/../../gcc-9.2.0/python')&lt;br /&gt;
from libstdcxx.v6.printers import register_libstdcxx_printers&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
But you have to add one line before the &amp;quot;end&amp;quot; statement like below to let the register_libstdcxx_printers function get executed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
python&lt;br /&gt;
import sys&lt;br /&gt;
sys.path.insert(0, sys.path[0] + '/../../gcc-9.2.0/python')&lt;br /&gt;
from libstdcxx.v6.printers import register_libstdcxx_printers&lt;br /&gt;
register_libstdcxx_printers(None)&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
BTW: It is the same thing to add the python pretty printer for wxWidgets. You can use this file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;https://github.com/wxWidgets/wxWidgets/blob/master/misc/gdb/print.py&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Useful Links=&lt;br /&gt;
[/index.php/topic,23590.msg160735.html#msg160735 forum links]&lt;/div&gt;</summary>
		<author><name>Ollydbg</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=Pretty_Printers&amp;diff=9520</id>
		<title>Pretty Printers</title>
		<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php?title=Pretty_Printers&amp;diff=9520"/>
		<updated>2021-03-20T11:36:43Z</updated>

		<summary type="html">&lt;p&gt;Ollydbg: add a new stub for pretty printer for msys2&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category: User Documentation]]&lt;br /&gt;
GDB Pretty Printers for STL display nicely formatted variables in the hover pop-up and watch window, for all STL containers (vectors, maps, etc).&lt;br /&gt;
----&lt;br /&gt;
[[File:Pprint1.png|border|Popup example]]&amp;lt;br&amp;gt;&lt;br /&gt;
==Test with GDB==&lt;br /&gt;
&lt;br /&gt;
*Ensure GDB is python-enabled. For Linux (tested with recent Ubuntu), it is enabled by default. For Windows, MinGW's GDB is not python enabled. One option is to install [http://sourceforge.net/projects/mingwbuilds/ MinGW-Builds] over MinGW (consider backing up MinGW first). This updates GCC to 4.7.2 and includes a Python enabled GDB.&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
To test, launch GDB from console:&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size: 10pt&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
(gdb) python print sys.version&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
If python is enabled, the version will be printed (probably 2.7.x), otherwise, a message will indicate python scripting is not supported.&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
*Download printers.py (if necessary)&lt;br /&gt;
:Windows users with MinGW should already have this file in /MinGW/share/gcc-4.7.2/python/libstdcxx/v6.&lt;br /&gt;
:Linux users can download printers.py [http://gcc.gnu.org/svn/gcc/trunk/libstdc++-v3/python/libstdcxx/v6/printers.py here]. Save as &amp;lt;tt&amp;gt;&amp;lt;span style=&amp;quot;font-size: 10pt&amp;quot;&amp;gt;/home/username/gdb_printers/printers.py&amp;lt;/span&amp;gt;&amp;lt;/tt&amp;gt;.&lt;br /&gt;
*Create a GDB [http://sourceware.org/gdb/onlinedocs/gdb/Command-Files.html Command File] to enable the printer. Store in &amp;lt;tt&amp;gt;&amp;lt;span style=&amp;quot;font-size: 10pt&amp;quot;&amp;gt;c:\mingw\bin\pp.gdb&amp;lt;/span&amp;gt;&amp;lt;/tt&amp;gt; (windows) or &amp;lt;tt&amp;gt;&amp;lt;span style=&amp;quot;font-size: 10pt&amp;quot;&amp;gt;/home/username/gdb_printers/pp.gdb&amp;lt;/span&amp;gt;&amp;lt;/tt&amp;gt; (linux). Below is a sample command file. Replace the path c:/MinGW/share... with your path to printers.py.&lt;br /&gt;
&amp;lt;blockquote&amp;gt;&amp;lt;span style=&amp;quot;font-size: 10pt&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
python&lt;br /&gt;
import sys&lt;br /&gt;
sys.path.insert(0, 'c:/MinGW/share/gcc-4.7.2/python/libstdcxx/v6')&lt;br /&gt;
from printers import register_libstdcxx_printers&lt;br /&gt;
register_libstdcxx_printers (None)&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
*Test&lt;br /&gt;
#Set a breakpoint in a program and debug&lt;br /&gt;
#Run the command file from GDB (can use Codeblocks-&amp;gt;debugger tab-&amp;gt;command, or in GDB from the console) (substitute your path if necessary)&lt;br /&gt;
&amp;lt;ol&amp;gt;&amp;lt;span style=&amp;quot;font-size: 10pt&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;(gdb) source c:\MinGW\bin\pp.gdb&amp;lt;/pre&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;/ol&amp;gt;&lt;br /&gt;
&amp;lt;ol start=&amp;quot;3&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Test the printer - example:&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&amp;lt;span style=&amp;quot;font-size: 10pt&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;(gdb) print words2&lt;br /&gt;
$1 = std::vector of length 3, capacity 4 = {&amp;quot;one&amp;quot;, &amp;quot;two&amp;quot;, &amp;quot;three&amp;quot;}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Add to Codeblocks==&lt;br /&gt;
Once the command file is working correctly, there are two steps to activate in Codeblocks:&lt;br /&gt;
#Set debugger initialization command (substitute your path as necessary):&amp;lt;br/&amp;gt;&amp;lt;span style=&amp;quot;font-size: 10pt&amp;quot;&amp;gt;&amp;lt;tt&amp;gt;Codeblocks-&amp;gt;Settings-&amp;gt;Debugger-&amp;gt;Default-&amp;gt;Debugger initialization commands&amp;lt;/tt&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&amp;lt;span style=&amp;quot;font-size: 10pt&amp;quot;&amp;gt;&amp;lt;pre&amp;gt;source c:\MinGW\bin\pp.gdb&amp;lt;/pre&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
NOTE: A bug in the Linux version of Codeblocks may prevent entering anything in the Debugger Initialization Commands field. A work-around is to open a CBP project file via a file manager, which in turn launches Codeblocks and seems to resolve the issue.&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&amp;lt;ol start=&amp;quot;2&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Disable Codeblocks handling of watch values (needed only for versions older than 17.12):&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&amp;lt;ol&amp;gt;&amp;lt;span style=&amp;quot;font-size: 10pt&amp;quot;&amp;gt;&amp;lt;tt&amp;gt;Codeblocks-&amp;gt;Settings-&amp;gt;Debugger-&amp;gt;Default-&amp;gt;Enable Watch Scripts = Unchecked&amp;lt;/tt&amp;gt;&amp;lt;/span&amp;gt;&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Other Info===&lt;br /&gt;
Links:&lt;br /&gt;
&lt;br /&gt;
[http://sourceware.org/gdb/onlinedocs/gdb/Python-API.html GDB Python API]&lt;br /&gt;
&lt;br /&gt;
[http://sourceware.org/gdb/onlinedocs/gdb/Pretty-Printing.html GDB Pretty Printing]&lt;br /&gt;
&lt;br /&gt;
===To Do===&lt;br /&gt;
The third column in the Codeblocks popup and watch window displays a long unformatted string. Codeblocks is calling the GDB whatis command. Can this command be Pretty-Printed?&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
* [[Debugging with Code::Blocks]]&lt;br /&gt;
* [[Debugger scripts]]&lt;br /&gt;
* [[Configure GDB pretty printer for Msys2]]&lt;/div&gt;</summary>
		<author><name>Ollydbg</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=Plugin_structure_of_C::B&amp;diff=8856</id>
		<title>Plugin structure of C::B</title>
		<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php?title=Plugin_structure_of_C::B&amp;diff=8856"/>
		<updated>2015-10-06T08:57:26Z</updated>

		<summary type="html">&lt;p&gt;Ollydbg: /* Overview */ add a dependency graph&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Plugin development]]&lt;br /&gt;
==Overview==&lt;br /&gt;
C::B can have many plugins working together, this page will describe how they get communication with each other.&lt;br /&gt;
Normally, the src target(codeblock.exe) is the main executable, and the sdk target(codeblocks.dll) is the main dll, and all the plguins(such as compiler.dll, codecompletion.dll) are directly communicated with the main dll.&lt;br /&gt;
The method we used here is described as the &amp;quot;The sub-DLL solution&amp;quot; in the following links.&lt;br /&gt;
==plugin dependency==&lt;br /&gt;
As described above, the dependency are as shown in the image below.&lt;br /&gt;
The arrow means the dependency graph means all the plugin dlls have dependency on the SDK(codeblocks.dll), as well as the main executable(codeblocks.exe).&lt;br /&gt;
&lt;br /&gt;
[[File:Plugin-dependency.png]]&lt;br /&gt;
&lt;br /&gt;
==Links==&lt;br /&gt;
[http://edll.sourceforge.net/ Enhanced Dynamic Linking for MS-Windows]&lt;/div&gt;</summary>
		<author><name>Ollydbg</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=File:Plugin-dependency.png&amp;diff=8855</id>
		<title>File:Plugin-dependency.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php?title=File:Plugin-dependency.png&amp;diff=8855"/>
		<updated>2015-10-06T08:52:36Z</updated>

		<summary type="html">&lt;p&gt;Ollydbg: C::B plugin dependency&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;C::B plugin dependency&lt;/div&gt;</summary>
		<author><name>Ollydbg</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=Plugin_structure_of_C::B&amp;diff=8854</id>
		<title>Plugin structure of C::B</title>
		<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php?title=Plugin_structure_of_C::B&amp;diff=8854"/>
		<updated>2015-10-05T15:09:59Z</updated>

		<summary type="html">&lt;p&gt;Ollydbg: new content about the plugin structure&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Plugin development]]&lt;br /&gt;
==Overview==&lt;br /&gt;
C::B can have many plugins working together, this page will describe how they get communication with each other.&lt;br /&gt;
Normally, the src target(codeblock.exe) is the main executable, and the sdk target(codeblocks.dll) is the main dll, and all the plguins(such as compiler.dll, codecompletion.dll) are directly communicated with the main dll.&lt;br /&gt;
The method we used here is described as the &amp;quot;The sub-DLL solution&amp;quot; in the following links.&lt;br /&gt;
&lt;br /&gt;
==Links==&lt;br /&gt;
[http://edll.sourceforge.net/ Enhanced Dynamic Linking for MS-Windows]&lt;/div&gt;</summary>
		<author><name>Ollydbg</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=Developer_documentation&amp;diff=8853</id>
		<title>Developer documentation</title>
		<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php?title=Developer_documentation&amp;diff=8853"/>
		<updated>2015-10-05T15:02:55Z</updated>

		<summary type="html">&lt;p&gt;Ollydbg: /* Plug-In development */ add a new page about the plugin structure&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Code::Blocks Documentation]]&lt;br /&gt;
[[Category:Developer Documentation]]&lt;br /&gt;
{{Layout_box2|1=&lt;br /&gt;
'''Official Code repository Subversion'''&amp;lt;br/&amp;gt;&lt;br /&gt;
* Web-interface by ViewVC: http://sourceforge.net/p/codeblocks/code/log/&lt;br /&gt;
* Subversion URL: &amp;lt;nowiki&amp;gt;svn://svn.code.sf.net/p/codeblocks/code/trunk&amp;lt;/nowiki&amp;gt; or &amp;lt;nowiki&amp;gt;http://svn.code.sf.net/p/codeblocks/code/trunk&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Mirror by biplab''' (Read-only; refreshed every 10 minutes.)&lt;br /&gt;
* Subversion URL: &amp;lt;nowiki&amp;gt;svn://cb.biplab.in/codeblocks/trunk&amp;lt;/nowiki&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
* Web-interface: http://cb.biplab.in/websvn/&lt;br /&gt;
* Git URL: git://cb.biplab.in/codeblocks.git&lt;br /&gt;
* Web-interface:http://cb.biplab.in/cgit/&lt;br /&gt;
&lt;br /&gt;
'''Mirror by Jens''' (Read-only; refreshed every 10 minutes.)&lt;br /&gt;
* Web-interface: http://cgit.jenslody.de/&lt;br /&gt;
* Git URL: git://jenslody.de/git/codeblocks&lt;br /&gt;
* the above Web-interface link contains many other mirrors such as wxWidgets trunk, git mirror, and git mirror of codeblocks.github&lt;br /&gt;
&lt;br /&gt;
'''Mirror by Obf''' (Read-only; refreshed manually.)&lt;br /&gt;
* Web-interface: https://github.com/obfuscated/codeblocks_sf&lt;br /&gt;
* Git URL: see the above page.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Articles for Code::Blocks developers.'''&lt;br /&gt;
&lt;br /&gt;
* '''&amp;lt;u&amp;gt;Documentation&amp;lt;/u&amp;gt;'''&lt;br /&gt;
:[https://www.codeblocks.org/manual.shtml User's manual] in various formats and languages.&lt;br /&gt;
:Browse SDK documentation at http://alpha0010.github.io/cb-docs/ as html.&lt;br /&gt;
&lt;br /&gt;
* Compile the complete Code::Blocks from sources on '''[[Installing Code::Blocks from source on Windows|Windows]]''' and '''[[Installing Code::Blocks from source on Linux|Linux]]'''&lt;br /&gt;
&lt;br /&gt;
* '''[[Compile Code::Blocks plugins based on a nightly]]''' without the need to compile wxWidgets or the Code::Blocks core.&lt;br /&gt;
&lt;br /&gt;
* '''[http://launchpad.net/products/codeblocks/ Translation]'''&lt;br /&gt;
:Code::Blocks uses Launchpad to coordinate translation efforts.&lt;br /&gt;
:See also [/index.php/topic,1022.msg132499.html#msg132499 Code::Blocks' translation]&lt;br /&gt;
&lt;br /&gt;
* '''[[Coding style]]'''&lt;br /&gt;
:The source code formatting style used in the Code::Blocks' source.&lt;br /&gt;
&lt;br /&gt;
* '''[[Creating a custom lexer for Code::Blocks editor]]'''&lt;br /&gt;
:How to add support for new syntax lighting schemes.&lt;br /&gt;
&lt;br /&gt;
* '''[[Creating a patch to submit (Patch Tracker)]]'''&lt;br /&gt;
:Creating a diff file and then submitting it to the patch tracker.&lt;br /&gt;
&lt;br /&gt;
* '''[[Unicode Standards]]'''&lt;br /&gt;
:Information about unicode standards and how unicode is handled in Code::Blocks' source code.&lt;br /&gt;
&lt;br /&gt;
* '''[[Various development tips]]'''&lt;br /&gt;
:List of various development tips for Code::Blocks.&lt;br /&gt;
&lt;br /&gt;
* '''[[Scripting Code::Blocks]]'''&lt;br /&gt;
:Information about scripting Code::Blocks with [http://www.squirrel-lang.org/ Squirrel].&lt;br /&gt;
&lt;br /&gt;
* '''[[A short overview about Code::Blocks architecture]]'''&lt;br /&gt;
:Information about the architecture of Code::Blocks.&lt;br /&gt;
&lt;br /&gt;
* '''[[Code::Blocks SDK events]]'''&lt;br /&gt;
:Information about the Code::Blocks SDK events and how to work with them.&lt;br /&gt;
&lt;br /&gt;
* '''[[File formats description]]'''&lt;br /&gt;
:Description of the format of each file Code::Blocks produces.&lt;br /&gt;
&lt;br /&gt;
* '''[[Version control]]'''&lt;br /&gt;
:Tips and trick for working with our version control system.&lt;br /&gt;
&lt;br /&gt;
== Plug-In development ==&lt;br /&gt;
&lt;br /&gt;
* [[Plugin structure of C::B]]&lt;br /&gt;
* [[Creating a simple &amp;quot;Hello World&amp;quot; plugin]]&lt;br /&gt;
* [[Creating a Plug-in which modifies CB's Menus]]&lt;br /&gt;
* [[Creating a plugin that actually does something]]&lt;br /&gt;
* [[Linking the plugin to a Nightly Build]]&lt;br /&gt;
* [[Managing Plug-in Resources]]&lt;br /&gt;
&lt;br /&gt;
* [[Research on doing a Plug-in for embedded help in CB]]&lt;br /&gt;
&lt;br /&gt;
* [[wxSmith extensions]]&lt;br /&gt;
* [[Code::Completion Rewrite]] and [[Code Completion plugin]] and [[Code Completion Design]]&lt;br /&gt;
&lt;br /&gt;
== Scripting ==&lt;br /&gt;
&lt;br /&gt;
Using scripting to extend Code::Blocks' functionality&lt;br /&gt;
&lt;br /&gt;
* [[Wizard scripts|Creating a new project wizard]]&lt;br /&gt;
&lt;br /&gt;
== Developing C::B with Git ==&lt;br /&gt;
For devs who want to use Git to develop C::B, here are some steps to follow, especially you need to correctly set the SVN and GIT properties so that you can make your local git commits back to the official SVN repo. See [/index.php/topic,16096.msg128152.html#msg128152 Re: Read-only Git, SVN Repo for Code::Blocks], also stahta01 has a nice instruction about how to use git, see [/index.php/topic,19533.msg133422.html#msg133422 Development How to use a Code::Blocks Git Repo].&lt;br /&gt;
&lt;br /&gt;
If you want to create a SVN style patch from git, see: [/index.php/topic,19391.msg132530.html#msg132530 This forum post].&lt;br /&gt;
&lt;br /&gt;
== Debugging C::B ==&lt;br /&gt;
&lt;br /&gt;
* When C::B crashed, it will generate a call-stack file &amp;quot;codeblocks.RPT&amp;quot;, at the crash point, this is a text file, you can open it, if your C::B contains the debug information, it will have file and line information about each call. If it is a stripped version, but you have the debug version of C::B, you can try to run the [/index.php/topic,13129.msg88254.html#msg88254 Debugging made easier], this is a address2line UI interface works under Windows.&lt;br /&gt;
* You can debug C::B under C::B (with the debugger plugin), also, you can link C::B to the debug version of wxWidgets library, so you can see whether a bug is located in C::B source code or wxWidgets' source code, see here: [/index.php/topic,17316.msg130972.html#msg130972 patch to build C::B against wx debug library]&lt;/div&gt;</summary>
		<author><name>Ollydbg</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=Developer_documentation&amp;diff=8852</id>
		<title>Developer documentation</title>
		<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php?title=Developer_documentation&amp;diff=8852"/>
		<updated>2015-09-29T14:56:28Z</updated>

		<summary type="html">&lt;p&gt;Ollydbg: remove the strike lines&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Code::Blocks Documentation]]&lt;br /&gt;
[[Category:Developer Documentation]]&lt;br /&gt;
{{Layout_box2|1=&lt;br /&gt;
'''Official Code repository Subversion'''&amp;lt;br/&amp;gt;&lt;br /&gt;
* Web-interface by ViewVC: http://sourceforge.net/p/codeblocks/code/log/&lt;br /&gt;
* Subversion URL: &amp;lt;nowiki&amp;gt;svn://svn.code.sf.net/p/codeblocks/code/trunk&amp;lt;/nowiki&amp;gt; or &amp;lt;nowiki&amp;gt;http://svn.code.sf.net/p/codeblocks/code/trunk&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Mirror by biplab''' (Read-only; refreshed every 10 minutes.)&lt;br /&gt;
* Subversion URL: &amp;lt;nowiki&amp;gt;svn://cb.biplab.in/codeblocks/trunk&amp;lt;/nowiki&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
* Web-interface: http://cb.biplab.in/websvn/&lt;br /&gt;
* Git URL: git://cb.biplab.in/codeblocks.git&lt;br /&gt;
* Web-interface:http://cb.biplab.in/cgit/&lt;br /&gt;
&lt;br /&gt;
'''Mirror by Jens''' (Read-only; refreshed every 10 minutes.)&lt;br /&gt;
* Web-interface: http://cgit.jenslody.de/&lt;br /&gt;
* Git URL: git://jenslody.de/git/codeblocks&lt;br /&gt;
* the above Web-interface link contains many other mirrors such as wxWidgets trunk, git mirror, and git mirror of codeblocks.github&lt;br /&gt;
&lt;br /&gt;
'''Mirror by Obf''' (Read-only; refreshed manually.)&lt;br /&gt;
* Web-interface: https://github.com/obfuscated/codeblocks_sf&lt;br /&gt;
* Git URL: see the above page.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Articles for Code::Blocks developers.'''&lt;br /&gt;
&lt;br /&gt;
* '''&amp;lt;u&amp;gt;Documentation&amp;lt;/u&amp;gt;'''&lt;br /&gt;
:[https://www.codeblocks.org/manual.shtml User's manual] in various formats and languages.&lt;br /&gt;
:Browse SDK documentation at http://alpha0010.github.io/cb-docs/ as html.&lt;br /&gt;
&lt;br /&gt;
* Compile the complete Code::Blocks from sources on '''[[Installing Code::Blocks from source on Windows|Windows]]''' and '''[[Installing Code::Blocks from source on Linux|Linux]]'''&lt;br /&gt;
&lt;br /&gt;
* '''[[Compile Code::Blocks plugins based on a nightly]]''' without the need to compile wxWidgets or the Code::Blocks core.&lt;br /&gt;
&lt;br /&gt;
* '''[http://launchpad.net/products/codeblocks/ Translation]'''&lt;br /&gt;
:Code::Blocks uses Launchpad to coordinate translation efforts.&lt;br /&gt;
:See also [/index.php/topic,1022.msg132499.html#msg132499 Code::Blocks' translation]&lt;br /&gt;
&lt;br /&gt;
* '''[[Coding style]]'''&lt;br /&gt;
:The source code formatting style used in the Code::Blocks' source.&lt;br /&gt;
&lt;br /&gt;
* '''[[Creating a custom lexer for Code::Blocks editor]]'''&lt;br /&gt;
:How to add support for new syntax lighting schemes.&lt;br /&gt;
&lt;br /&gt;
* '''[[Creating a patch to submit (Patch Tracker)]]'''&lt;br /&gt;
:Creating a diff file and then submitting it to the patch tracker.&lt;br /&gt;
&lt;br /&gt;
* '''[[Unicode Standards]]'''&lt;br /&gt;
:Information about unicode standards and how unicode is handled in Code::Blocks' source code.&lt;br /&gt;
&lt;br /&gt;
* '''[[Various development tips]]'''&lt;br /&gt;
:List of various development tips for Code::Blocks.&lt;br /&gt;
&lt;br /&gt;
* '''[[Scripting Code::Blocks]]'''&lt;br /&gt;
:Information about scripting Code::Blocks with [http://www.squirrel-lang.org/ Squirrel].&lt;br /&gt;
&lt;br /&gt;
* '''[[A short overview about Code::Blocks architecture]]'''&lt;br /&gt;
:Information about the architecture of Code::Blocks.&lt;br /&gt;
&lt;br /&gt;
* '''[[Code::Blocks SDK events]]'''&lt;br /&gt;
:Information about the Code::Blocks SDK events and how to work with them.&lt;br /&gt;
&lt;br /&gt;
* '''[[File formats description]]'''&lt;br /&gt;
:Description of the format of each file Code::Blocks produces.&lt;br /&gt;
&lt;br /&gt;
* '''[[Version control]]'''&lt;br /&gt;
:Tips and trick for working with our version control system.&lt;br /&gt;
&lt;br /&gt;
== Plug-In development ==&lt;br /&gt;
&lt;br /&gt;
* [[Creating a simple &amp;quot;Hello World&amp;quot; plugin]]&lt;br /&gt;
* [[Creating a Plug-in which modifies CB's Menus]]&lt;br /&gt;
* [[Creating a plugin that actually does something]]&lt;br /&gt;
* [[Linking the plugin to a Nightly Build]]&lt;br /&gt;
* [[Managing Plug-in Resources]]&lt;br /&gt;
&lt;br /&gt;
* [[Research on doing a Plug-in for embedded help in CB]]&lt;br /&gt;
&lt;br /&gt;
* [[wxSmith extensions]]&lt;br /&gt;
* [[Code::Completion Rewrite]] and [[Code Completion plugin]] and [[Code Completion Design]]&lt;br /&gt;
&lt;br /&gt;
== Scripting ==&lt;br /&gt;
&lt;br /&gt;
Using scripting to extend Code::Blocks' functionality&lt;br /&gt;
&lt;br /&gt;
* [[Wizard scripts|Creating a new project wizard]]&lt;br /&gt;
&lt;br /&gt;
== Developing C::B with Git ==&lt;br /&gt;
For devs who want to use Git to develop C::B, here are some steps to follow, especially you need to correctly set the SVN and GIT properties so that you can make your local git commits back to the official SVN repo. See [/index.php/topic,16096.msg128152.html#msg128152 Re: Read-only Git, SVN Repo for Code::Blocks], also stahta01 has a nice instruction about how to use git, see [/index.php/topic,19533.msg133422.html#msg133422 Development How to use a Code::Blocks Git Repo].&lt;br /&gt;
&lt;br /&gt;
If you want to create a SVN style patch from git, see: [/index.php/topic,19391.msg132530.html#msg132530 This forum post].&lt;br /&gt;
&lt;br /&gt;
== Debugging C::B ==&lt;br /&gt;
&lt;br /&gt;
* When C::B crashed, it will generate a call-stack file &amp;quot;codeblocks.RPT&amp;quot;, at the crash point, this is a text file, you can open it, if your C::B contains the debug information, it will have file and line information about each call. If it is a stripped version, but you have the debug version of C::B, you can try to run the [/index.php/topic,13129.msg88254.html#msg88254 Debugging made easier], this is a address2line UI interface works under Windows.&lt;br /&gt;
* You can debug C::B under C::B (with the debugger plugin), also, you can link C::B to the debug version of wxWidgets library, so you can see whether a bug is located in C::B source code or wxWidgets' source code, see here: [/index.php/topic,17316.msg130972.html#msg130972 patch to build C::B against wx debug library]&lt;/div&gt;</summary>
		<author><name>Ollydbg</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=Developer_documentation&amp;diff=8851</id>
		<title>Developer documentation</title>
		<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php?title=Developer_documentation&amp;diff=8851"/>
		<updated>2015-09-29T14:54:25Z</updated>

		<summary type="html">&lt;p&gt;Ollydbg: correct the link title&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Code::Blocks Documentation]]&lt;br /&gt;
[[Category:Developer Documentation]]&lt;br /&gt;
{{Layout_box2|1=&lt;br /&gt;
'''Official Code repository Subversion'''&amp;lt;br/&amp;gt;&lt;br /&gt;
* Web-interface by ViewVC: http://sourceforge.net/p/codeblocks/code/log/&lt;br /&gt;
* Subversion URL: &amp;lt;nowiki&amp;gt;svn://svn.code.sf.net/p/codeblocks/code/trunk&amp;lt;/nowiki&amp;gt; or &amp;lt;nowiki&amp;gt;http://svn.code.sf.net/p/codeblocks/code/trunk&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Mirror by biplab''' (Read-only; refreshed every 10 minutes.)&lt;br /&gt;
* Subversion URL: &amp;lt;nowiki&amp;gt;svn://cb.biplab.in/codeblocks/trunk&amp;lt;/nowiki&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
* Web-interface: http://cb.biplab.in/websvn/&lt;br /&gt;
* Git URL: git://cb.biplab.in/codeblocks.git&lt;br /&gt;
* Web-interface:http://cb.biplab.in/cgit/&lt;br /&gt;
&lt;br /&gt;
'''Mirror by Jens''' (Read-only; refreshed every 10 minutes.)&lt;br /&gt;
* Web-interface: http://cgit.jenslody.de/&lt;br /&gt;
* Git URL: git://jenslody.de/git/codeblocks&lt;br /&gt;
* the above Web-interface link contains many other mirrors such as wxWidgets trunk, git mirror, and git mirror of codeblocks.github&lt;br /&gt;
&lt;br /&gt;
'''Mirror by Obf''' (Read-only; refreshed manually.)&lt;br /&gt;
* Web-interface: https://github.com/obfuscated/codeblocks_sf&lt;br /&gt;
* Git URL: see the above page.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Articles for Code::Blocks developers.'''&lt;br /&gt;
&lt;br /&gt;
* '''&amp;lt;u&amp;gt;Documentation&amp;lt;/u&amp;gt;'''&lt;br /&gt;
:[https://www.codeblocks.org/manual.shtml User's manual] in various formats and languages.&lt;br /&gt;
&amp;lt;strike&amp;gt;&lt;br /&gt;
:Also see http://developer.berlios.de/projects/codeblocks/ (under the downloads section).&lt;br /&gt;
:Checkout the SDK documentation at http://developer.berlios.de/project/showfiles.php?group_id=5358 as CHM file(s).&lt;br /&gt;
&amp;lt;/strike&amp;gt;&lt;br /&gt;
:Browse SDK documentation at http://alpha0010.github.io/cb-docs/ as html.&lt;br /&gt;
&lt;br /&gt;
* Compile the complete Code::Blocks from sources on '''[[Installing Code::Blocks from source on Windows|Windows]]''' and '''[[Installing Code::Blocks from source on Linux|Linux]]'''&lt;br /&gt;
&lt;br /&gt;
* '''[[Compile Code::Blocks plugins based on a nightly]]''' without the need to compile wxWidgets or the Code::Blocks core.&lt;br /&gt;
&lt;br /&gt;
* '''[http://launchpad.net/products/codeblocks/ Translation]'''&lt;br /&gt;
:Code::Blocks uses Launchpad to coordinate translation efforts.&lt;br /&gt;
:See also [/index.php/topic,1022.msg132499.html#msg132499 Code::Blocks' translation]&lt;br /&gt;
&lt;br /&gt;
* '''[[Coding style]]'''&lt;br /&gt;
:The source code formatting style used in the Code::Blocks' source.&lt;br /&gt;
&lt;br /&gt;
* '''[[Creating a custom lexer for Code::Blocks editor]]'''&lt;br /&gt;
:How to add support for new syntax lighting schemes.&lt;br /&gt;
&lt;br /&gt;
* '''[[Creating a patch to submit (Patch Tracker)]]'''&lt;br /&gt;
:Creating a diff file and then submitting it to the patch tracker.&lt;br /&gt;
&lt;br /&gt;
* '''[[Unicode Standards]]'''&lt;br /&gt;
:Information about unicode standards and how unicode is handled in Code::Blocks' source code.&lt;br /&gt;
&lt;br /&gt;
* '''[[Various development tips]]'''&lt;br /&gt;
:List of various development tips for Code::Blocks.&lt;br /&gt;
&lt;br /&gt;
* '''[[Scripting Code::Blocks]]'''&lt;br /&gt;
:Information about scripting Code::Blocks with [http://www.squirrel-lang.org/ Squirrel].&lt;br /&gt;
&lt;br /&gt;
* '''[[A short overview about Code::Blocks architecture]]'''&lt;br /&gt;
:Information about the architecture of Code::Blocks.&lt;br /&gt;
&lt;br /&gt;
* '''[[Code::Blocks SDK events]]'''&lt;br /&gt;
:Information about the Code::Blocks SDK events and how to work with them.&lt;br /&gt;
&lt;br /&gt;
* '''[[File formats description]]'''&lt;br /&gt;
:Description of the format of each file Code::Blocks produces.&lt;br /&gt;
&lt;br /&gt;
* '''[[Version control]]'''&lt;br /&gt;
:Tips and trick for working with our version control system.&lt;br /&gt;
&lt;br /&gt;
== Plug-In development ==&lt;br /&gt;
&lt;br /&gt;
* [[Creating a simple &amp;quot;Hello World&amp;quot; plugin]]&lt;br /&gt;
* [[Creating a Plug-in which modifies CB's Menus]]&lt;br /&gt;
* [[Creating a plugin that actually does something]]&lt;br /&gt;
* [[Linking the plugin to a Nightly Build]]&lt;br /&gt;
* [[Managing Plug-in Resources]]&lt;br /&gt;
&lt;br /&gt;
* [[Research on doing a Plug-in for embedded help in CB]]&lt;br /&gt;
&lt;br /&gt;
* [[wxSmith extensions]]&lt;br /&gt;
* [[Code::Completion Rewrite]] and [[Code Completion plugin]] and [[Code Completion Design]]&lt;br /&gt;
&lt;br /&gt;
== Scripting ==&lt;br /&gt;
&lt;br /&gt;
Using scripting to extend Code::Blocks' functionality&lt;br /&gt;
&lt;br /&gt;
* [[Wizard scripts|Creating a new project wizard]]&lt;br /&gt;
&lt;br /&gt;
== Developing C::B with Git ==&lt;br /&gt;
For devs who want to use Git to develop C::B, here are some steps to follow, especially you need to correctly set the SVN and GIT properties so that you can make your local git commits back to the official SVN repo. See [/index.php/topic,16096.msg128152.html#msg128152 Re: Read-only Git, SVN Repo for Code::Blocks], also stahta01 has a nice instruction about how to use git, see [/index.php/topic,19533.msg133422.html#msg133422 Development How to use a Code::Blocks Git Repo].&lt;br /&gt;
&lt;br /&gt;
If you want to create a SVN style patch from git, see: [/index.php/topic,19391.msg132530.html#msg132530 This forum post].&lt;br /&gt;
&lt;br /&gt;
== Debugging C::B ==&lt;br /&gt;
&lt;br /&gt;
* When C::B crashed, it will generate a call-stack file &amp;quot;codeblocks.RPT&amp;quot;, at the crash point, this is a text file, you can open it, if your C::B contains the debug information, it will have file and line information about each call. If it is a stripped version, but you have the debug version of C::B, you can try to run the [/index.php/topic,13129.msg88254.html#msg88254 Debugging made easier], this is a address2line UI interface works under Windows.&lt;br /&gt;
* You can debug C::B under C::B (with the debugger plugin), also, you can link C::B to the debug version of wxWidgets library, so you can see whether a bug is located in C::B source code or wxWidgets' source code, see here: [/index.php/topic,17316.msg130972.html#msg130972 patch to build C::B against wx debug library]&lt;/div&gt;</summary>
		<author><name>Ollydbg</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=Compiling_wxWidgets_3.0.0_to_develop_Code::Blocks_(MSW)&amp;diff=8846</id>
		<title>Compiling wxWidgets 3.0.0 to develop Code::Blocks (MSW)</title>
		<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php?title=Compiling_wxWidgets_3.0.0_to_develop_Code::Blocks_(MSW)&amp;diff=8846"/>
		<updated>2015-09-27T06:20:43Z</updated>

		<summary type="html">&lt;p&gt;Ollydbg: /* Building wxWidgets Code */ mention a patch and a compiler option to build wx3&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Note, compiling Code::Blocks linked against the wxWidgets 3.0.0 is NOT ready for stable use; CodeBlocks developers are working hard to stabilize it, also patches are welcome to accelerate the migration'''&lt;br /&gt;
&lt;br /&gt;
These are the instructions for compiling wxWidgets for use with Code::Blocks. They are primarily intended in preparation for compiling Code::Blocks itself but (hopefully) may also help installing wxWidgets for general development using that framework.&lt;br /&gt;
&lt;br /&gt;
Although these instructions are targeted at the Windows operating system, it should be possible to apply them with slight adjustments to other platforms, since we make use of MinGW.&lt;br /&gt;
&lt;br /&gt;
== Installing MinGW ==&lt;br /&gt;
Directions to install MinGW for Code::Blocks can be found here.&lt;br /&gt;
[[MinGW installation]]&lt;br /&gt;
&lt;br /&gt;
== Installing the wxWidgets Source Code ==&lt;br /&gt;
The wxWidgets 3.0.0 distribution can be found at the [http://www.wxwidgets.org/downloads/#latest_stable wxWidgets download site]. (Note that there is also a winhelp file available.) You can choose between an installer and a zip file. You can just get the zip file because the installer is also a zipped version.&lt;br /&gt;
&lt;br /&gt;
If you use the plain zip version, make sure to unzip using the full path. Otherwise the directories won't be created correctly.&lt;br /&gt;
&lt;br /&gt;
'''NOTE:''' For the remainder of these instructions we call the wxWidgets directory ''&amp;lt;WXWIN&amp;gt;''. You have to change it to your corresponding directory (e.g. &amp;quot;c:\wxMSW-3.0.0\wxWidgets-3.0.0&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
'''NOTE:''' You do not need MSYS. Furthermore, you cannot have MSYS in your path, or the wxWidgets compilation will fail. Thus, if you have MSYS installed, ensure that ''&amp;lt;MSYS&amp;gt;\bin'' '''is not''' in your path before compiling wxWidgets. wxWidgets must be compiled from a &amp;quot;regular&amp;quot; command line (like cmd.exe), not from a Unix-like shell. The same problem could arise if Cygwin is in the path.&lt;br /&gt;
&lt;br /&gt;
'''NOTE:''' For the remainder of these instructions we call the MinGW directory ''&amp;lt;MINGW&amp;gt;''. You have to change it to your corresponding directory (e.g. &amp;quot;C:\MinGW&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
== Checking make Version ==&lt;br /&gt;
If you didn't install MinGW yourself you have to ensure you are using a recent enough version of the make utility. Open a command prompt and type:&lt;br /&gt;
 &amp;lt;tt&amp;gt;cd &amp;lt;MINGW&amp;gt;\bin&lt;br /&gt;
 mingw32-make -v&amp;lt;/tt&amp;gt;&lt;br /&gt;
The version should read 3.80 or higher.&lt;br /&gt;
&lt;br /&gt;
== Building wxWidgets ==&lt;br /&gt;
=== Changing Directory and Setting Path ===&lt;br /&gt;
To compile wxWidgets, open the command prompt window and change to the wxWidgets directory:&lt;br /&gt;
 &amp;lt;tt&amp;gt;cd /d &amp;lt;WXWIN&amp;gt;\build\msw&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;tt&amp;gt;SET PATH=&amp;lt;MINGW&amp;gt;\bin&amp;lt;/tt&amp;gt;&lt;br /&gt;
'''NOTE:''' This is normally SET PATH=C:\MingGW\bin&lt;br /&gt;
&lt;br /&gt;
=== Cleaning wxWidgets Code ===&lt;br /&gt;
Now clean up the source:&lt;br /&gt;
 &amp;lt;tt&amp;gt;mingw32-make -f makefile.gcc USE_XRC=1 SHARED=1 MONOLITHIC=1 BUILD=release UNICODE=1 USE_OPENGL=1 VENDOR=cb CXXFLAGS=&amp;quot;-fno-keep-inline-dllexport&amp;quot; clean&amp;lt;/tt&amp;gt;&lt;br /&gt;
'''NOTE:''' Make sure you use exactly the same options for this step and for the build step below. The clean target uses these variables and only cleans the specified version of the generated object and library files. (It will not clean the intended files if these variables are not identical.)&lt;br /&gt;
&lt;br /&gt;
'''NOTE:''' If you still have problems with compiling after cleaning, you could try to manually remove the gcc_dll directory under the build\msw directory. This directory is the place where the object files are stored.&lt;br /&gt;
&lt;br /&gt;
=== Building wxWidgets Code ===&lt;br /&gt;
When everything is clean you can start compiling wxWidgets:&lt;br /&gt;
 &amp;lt;tt&amp;gt;mingw32-make -f makefile.gcc USE_XRC=1 SHARED=1 MONOLITHIC=1 BUILD=release UNICODE=1 USE_OPENGL=1 VENDOR=cb CXXFLAGS=&amp;quot;-fno-keep-inline-dllexport&amp;quot; &amp;gt;log.txt 2&amp;gt;&amp;amp;1&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''NOTE:''' If you want another version of wxWidgets (debug or non-Unicode) you still have to make sure you build a MONOLITHIC version (one big DLL) for linking Code::Blocks.&lt;br /&gt;
&lt;br /&gt;
'''NOTE:''' If you are building wx3.0.2 with GCC 4.9.x or GCC 5.x, you will get compiler error, thus a patch is need, see discussion here: [/index.php/topic,20607.msg140163/topicseen.html#msg140163 Build C::B against wx3.02 with gcc 5.2 under Windows]&lt;br /&gt;
&lt;br /&gt;
'''NOTE:''' There is an compiler option needed if you want to suppress the compiler warnings, see: [/index.php/topic,20382.msg140167.html#msg140167 Re: TDM-GCC 5 series (Latest: 5.1.0 - 2015-06-28)]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Patience. This step takes time. Make sure there was no compilation error before you continue.&lt;br /&gt;
&lt;br /&gt;
== Compiling Code::Blocks ==&lt;br /&gt;
=== Code::Blocks project to use===&lt;br /&gt;
No patches are needed to compile Code::Blocks with wxWidgets 3.0, just use the project/workspace-files with the ''_wx30'' in the name and call ''update30.bat'' to update the resources.&lt;br /&gt;
&lt;br /&gt;
That does not mean, that everything runs absolutely bug-free, but we are working on it.&lt;br /&gt;
&lt;br /&gt;
As always patches are welcome.&lt;br /&gt;
&lt;br /&gt;
=== Setting up paths ===&lt;br /&gt;
Before finally compiling Code::Blocks itself, you need to setup the paths:&lt;br /&gt;
*Open the Code::Blocks project (CodeBlocks_wx30.cbp).&lt;br /&gt;
*It will ask you to define a [[Global compiler variables|Global variable]] named &amp;quot;wx30&amp;quot;&lt;br /&gt;
*Set the path to where you have wxWidgets installed (e.g. &amp;quot;c:\wxMSW-3.0.0\wxWidgets-3.0.0&amp;quot;).&lt;br /&gt;
*Set the global variable cb_release_type to &amp;quot;-g&amp;quot;. (no quote is needed when your enter the text)&lt;br /&gt;
*Compile Code::Blocks.&lt;br /&gt;
&lt;br /&gt;
'''NOTE:''' A zip.exe file should be in your PATH, so they can run post steps correctly, see [https://wiki.codeblocks.org/index.php?title=Installing_Code::Blocks_from_source_on_Windows#zip.exe 1.6 zip.exe] for some details about zip.exe&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Post compilation steps ===&lt;br /&gt;
When the compilation process is finished, simply run the update30.bat script. It will ensure that all resource files Code::Blocks uses are in the right place and up to date.&lt;br /&gt;
&lt;br /&gt;
=== Reference ===&lt;br /&gt;
* Forum discussion:[/index.php/topic,18412.msg125957.html#msg125957 Re: wxWidgets 3.0 and Code::Blocks files question?]&lt;br /&gt;
* [[Installing Code::Blocks from source on Windows]]&lt;br /&gt;
* Note that PCH is disabled in Codeblocks_wx30.cbp, because it cause GCC build error (a bug in GCC 4.8.x [http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56926 Bug 56926 – Crash (without ICE) while compiling Boost.Math]), see discussions here: [/index.php/topic,18412.msg126028.html#msg126028 Re: wxWidgets 3.0 and Code::Blocks files question?] and [/index.php/topic,18568.msg127102.html#msg127102 Patches for Compiling Code::Blocks against wxWidgets 3.0 using MinGW GCC 4.8.1]. As of 2015-09-27, there is a gcc suite which have PCH crash issue fixed, see forum post [/index.php/topic,18568.msg140107.html#msg140107 Re: Patches for Compiling Code::Blocks against wxWidgets 3.0 using MinGW GCC 4.8.1]&lt;/div&gt;</summary>
		<author><name>Ollydbg</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=Compiling_wxWidgets_3.0.0_to_develop_Code::Blocks_(MSW)&amp;diff=8845</id>
		<title>Compiling wxWidgets 3.0.0 to develop Code::Blocks (MSW)</title>
		<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php?title=Compiling_wxWidgets_3.0.0_to_develop_Code::Blocks_(MSW)&amp;diff=8845"/>
		<updated>2015-09-27T06:16:16Z</updated>

		<summary type="html">&lt;p&gt;Ollydbg: /* Reference */ mention a gcc compiler suite which fix the PCH issue&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Note, compiling Code::Blocks linked against the wxWidgets 3.0.0 is NOT ready for stable use; CodeBlocks developers are working hard to stabilize it, also patches are welcome to accelerate the migration'''&lt;br /&gt;
&lt;br /&gt;
These are the instructions for compiling wxWidgets for use with Code::Blocks. They are primarily intended in preparation for compiling Code::Blocks itself but (hopefully) may also help installing wxWidgets for general development using that framework.&lt;br /&gt;
&lt;br /&gt;
Although these instructions are targeted at the Windows operating system, it should be possible to apply them with slight adjustments to other platforms, since we make use of MinGW.&lt;br /&gt;
&lt;br /&gt;
== Installing MinGW ==&lt;br /&gt;
Directions to install MinGW for Code::Blocks can be found here.&lt;br /&gt;
[[MinGW installation]]&lt;br /&gt;
&lt;br /&gt;
== Installing the wxWidgets Source Code ==&lt;br /&gt;
The wxWidgets 3.0.0 distribution can be found at the [http://www.wxwidgets.org/downloads/#latest_stable wxWidgets download site]. (Note that there is also a winhelp file available.) You can choose between an installer and a zip file. You can just get the zip file because the installer is also a zipped version.&lt;br /&gt;
&lt;br /&gt;
If you use the plain zip version, make sure to unzip using the full path. Otherwise the directories won't be created correctly.&lt;br /&gt;
&lt;br /&gt;
'''NOTE:''' For the remainder of these instructions we call the wxWidgets directory ''&amp;lt;WXWIN&amp;gt;''. You have to change it to your corresponding directory (e.g. &amp;quot;c:\wxMSW-3.0.0\wxWidgets-3.0.0&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
'''NOTE:''' You do not need MSYS. Furthermore, you cannot have MSYS in your path, or the wxWidgets compilation will fail. Thus, if you have MSYS installed, ensure that ''&amp;lt;MSYS&amp;gt;\bin'' '''is not''' in your path before compiling wxWidgets. wxWidgets must be compiled from a &amp;quot;regular&amp;quot; command line (like cmd.exe), not from a Unix-like shell. The same problem could arise if Cygwin is in the path.&lt;br /&gt;
&lt;br /&gt;
'''NOTE:''' For the remainder of these instructions we call the MinGW directory ''&amp;lt;MINGW&amp;gt;''. You have to change it to your corresponding directory (e.g. &amp;quot;C:\MinGW&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
== Checking make Version ==&lt;br /&gt;
If you didn't install MinGW yourself you have to ensure you are using a recent enough version of the make utility. Open a command prompt and type:&lt;br /&gt;
 &amp;lt;tt&amp;gt;cd &amp;lt;MINGW&amp;gt;\bin&lt;br /&gt;
 mingw32-make -v&amp;lt;/tt&amp;gt;&lt;br /&gt;
The version should read 3.80 or higher.&lt;br /&gt;
&lt;br /&gt;
== Building wxWidgets ==&lt;br /&gt;
=== Changing Directory and Setting Path ===&lt;br /&gt;
To compile wxWidgets, open the command prompt window and change to the wxWidgets directory:&lt;br /&gt;
 &amp;lt;tt&amp;gt;cd /d &amp;lt;WXWIN&amp;gt;\build\msw&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;tt&amp;gt;SET PATH=&amp;lt;MINGW&amp;gt;\bin&amp;lt;/tt&amp;gt;&lt;br /&gt;
'''NOTE:''' This is normally SET PATH=C:\MingGW\bin&lt;br /&gt;
&lt;br /&gt;
=== Cleaning wxWidgets Code ===&lt;br /&gt;
Now clean up the source:&lt;br /&gt;
 &amp;lt;tt&amp;gt;mingw32-make -f makefile.gcc USE_XRC=1 SHARED=1 MONOLITHIC=1 BUILD=release UNICODE=1 USE_OPENGL=1 VENDOR=cb CXXFLAGS=&amp;quot;-fno-keep-inline-dllexport&amp;quot; clean&amp;lt;/tt&amp;gt;&lt;br /&gt;
'''NOTE:''' Make sure you use exactly the same options for this step and for the build step below. The clean target uses these variables and only cleans the specified version of the generated object and library files. (It will not clean the intended files if these variables are not identical.)&lt;br /&gt;
&lt;br /&gt;
'''NOTE:''' If you still have problems with compiling after cleaning, you could try to manually remove the gcc_dll directory under the build\msw directory. This directory is the place where the object files are stored.&lt;br /&gt;
&lt;br /&gt;
=== Building wxWidgets Code ===&lt;br /&gt;
When everything is clean you can start compiling wxWidgets:&lt;br /&gt;
 &amp;lt;tt&amp;gt;mingw32-make -f makefile.gcc USE_XRC=1 SHARED=1 MONOLITHIC=1 BUILD=release UNICODE=1 USE_OPENGL=1 VENDOR=cb CXXFLAGS=&amp;quot;-fno-keep-inline-dllexport&amp;quot; &amp;gt;log.txt 2&amp;gt;&amp;amp;1&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''NOTE:''' If you want another version of wxWidgets (debug or non-Unicode) you still have to make sure you build a MONOLITHIC version (one big DLL) for linking Code::Blocks.&lt;br /&gt;
&lt;br /&gt;
Patience. This step takes time. Make sure there was no compilation error before you continue.&lt;br /&gt;
&lt;br /&gt;
== Compiling Code::Blocks ==&lt;br /&gt;
=== Code::Blocks project to use===&lt;br /&gt;
No patches are needed to compile Code::Blocks with wxWidgets 3.0, just use the project/workspace-files with the ''_wx30'' in the name and call ''update30.bat'' to update the resources.&lt;br /&gt;
&lt;br /&gt;
That does not mean, that everything runs absolutely bug-free, but we are working on it.&lt;br /&gt;
&lt;br /&gt;
As always patches are welcome.&lt;br /&gt;
&lt;br /&gt;
=== Setting up paths ===&lt;br /&gt;
Before finally compiling Code::Blocks itself, you need to setup the paths:&lt;br /&gt;
*Open the Code::Blocks project (CodeBlocks_wx30.cbp).&lt;br /&gt;
*It will ask you to define a [[Global compiler variables|Global variable]] named &amp;quot;wx30&amp;quot;&lt;br /&gt;
*Set the path to where you have wxWidgets installed (e.g. &amp;quot;c:\wxMSW-3.0.0\wxWidgets-3.0.0&amp;quot;).&lt;br /&gt;
*Set the global variable cb_release_type to &amp;quot;-g&amp;quot;. (no quote is needed when your enter the text)&lt;br /&gt;
*Compile Code::Blocks.&lt;br /&gt;
&lt;br /&gt;
'''NOTE:''' A zip.exe file should be in your PATH, so they can run post steps correctly, see [https://wiki.codeblocks.org/index.php?title=Installing_Code::Blocks_from_source_on_Windows#zip.exe 1.6 zip.exe] for some details about zip.exe&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Post compilation steps ===&lt;br /&gt;
When the compilation process is finished, simply run the update30.bat script. It will ensure that all resource files Code::Blocks uses are in the right place and up to date.&lt;br /&gt;
&lt;br /&gt;
=== Reference ===&lt;br /&gt;
* Forum discussion:[/index.php/topic,18412.msg125957.html#msg125957 Re: wxWidgets 3.0 and Code::Blocks files question?]&lt;br /&gt;
* [[Installing Code::Blocks from source on Windows]]&lt;br /&gt;
* Note that PCH is disabled in Codeblocks_wx30.cbp, because it cause GCC build error (a bug in GCC 4.8.x [http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56926 Bug 56926 – Crash (without ICE) while compiling Boost.Math]), see discussions here: [/index.php/topic,18412.msg126028.html#msg126028 Re: wxWidgets 3.0 and Code::Blocks files question?] and [/index.php/topic,18568.msg127102.html#msg127102 Patches for Compiling Code::Blocks against wxWidgets 3.0 using MinGW GCC 4.8.1]. As of 2015-09-27, there is a gcc suite which have PCH crash issue fixed, see forum post [/index.php/topic,18568.msg140107.html#msg140107 Re: Patches for Compiling Code::Blocks against wxWidgets 3.0 using MinGW GCC 4.8.1]&lt;/div&gt;</summary>
		<author><name>Ollydbg</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=Developer_documentation&amp;diff=7766</id>
		<title>Developer documentation</title>
		<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php?title=Developer_documentation&amp;diff=7766"/>
		<updated>2014-10-01T15:08:48Z</updated>

		<summary type="html">&lt;p&gt;Ollydbg: add git urls.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Code::Blocks Documentation]]&lt;br /&gt;
[[Category:Developer Documentation]]&lt;br /&gt;
{{Layout_box2|1=&lt;br /&gt;
'''Official Code repository Subversion'''&amp;lt;br/&amp;gt;&lt;br /&gt;
* Web-interface by ViewVC: http://sourceforge.net/p/codeblocks/code/log/&lt;br /&gt;
* Subversion URL: &amp;lt;nowiki&amp;gt;svn://svn.code.sf.net/p/codeblocks/code/trunk&amp;lt;/nowiki&amp;gt; or &amp;lt;nowiki&amp;gt;http://svn.code.sf.net/p/codeblocks/code/trunk&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Mirror by biplab''' (Read-only; refreshed every 10 minutes.)&lt;br /&gt;
* Subversion URL: &amp;lt;nowiki&amp;gt;svn://cb.biplab.in/codeblocks/trunk&amp;lt;/nowiki&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
* Web-interface: http://cb.biplab.in/websvn/&lt;br /&gt;
* Git URL: git://cb.biplab.in/codeblocks.git&lt;br /&gt;
* Web-interface:http://cb.biplab.in/cgit/&lt;br /&gt;
&lt;br /&gt;
'''Mirror by Jens''' (Read-only; refreshed every 10 minutes.)&lt;br /&gt;
* Web-interface: http://cgit.jenslody.de/&lt;br /&gt;
* Git URL: git://jenslody.de/git/codeblocks&lt;br /&gt;
* the above Web-interface link contains many other mirrors such as wxWidgets trunk, git mirror, and git mirror of codeblocks.github&lt;br /&gt;
&lt;br /&gt;
'''Mirror by Obf''' (Read-only; refreshed manually.)&lt;br /&gt;
* Web-interface: https://github.com/obfuscated/codeblocks_sf&lt;br /&gt;
* Git URL: see the above page.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Articles for Code::Blocks developers.'''&lt;br /&gt;
&lt;br /&gt;
* '''&amp;lt;u&amp;gt;Documentation&amp;lt;/u&amp;gt;'''&lt;br /&gt;
:[https://www.codeblocks.org/manual.shtml User's manual] in various formats and languages.&lt;br /&gt;
:Also see http://developer.berlios.de/projects/codeblocks/ (under the downloads section).&lt;br /&gt;
:Checkout the SDK documentation at http://developer.berlios.de/project/showfiles.php?group_id=5358 as CHM file(s).&lt;br /&gt;
&lt;br /&gt;
* Compile the complete Code::Blocks from sources on '''[[Installing Code::Blocks from source on Windows|Windows]]''' and '''[[Installing Code::Blocks from source on Linux|Linux]]'''&lt;br /&gt;
&lt;br /&gt;
* '''[[Compile Code::Blocks plugins based on a nightly]]''' without the need to compile wxWidgets or the Code::Blocks core.&lt;br /&gt;
&lt;br /&gt;
* '''[http://launchpad.net/products/codeblocks/ Translation]'''&lt;br /&gt;
:Code::Blocks uses Launchpad to coordinate translation efforts.&lt;br /&gt;
&lt;br /&gt;
* '''[[Coding style]]'''&lt;br /&gt;
:The source code formatting style used in the Code::Blocks' source.&lt;br /&gt;
&lt;br /&gt;
* '''[[Creating a custom lexer for Code::Blocks editor]]'''&lt;br /&gt;
:How to add support for new syntax lighting schemes.&lt;br /&gt;
&lt;br /&gt;
* '''[[Creating a patch to submit to BerliOS (Patch Tracker)]]'''&lt;br /&gt;
:Creating a diff file and then submitting it to the patch tracker.&lt;br /&gt;
&lt;br /&gt;
* '''[[Unicode Standards]]'''&lt;br /&gt;
:Information about unicode standards and how unicode is handled in Code::Blocks' source code.&lt;br /&gt;
&lt;br /&gt;
* '''[[Various development tips]]'''&lt;br /&gt;
:List of various development tips for Code::Blocks.&lt;br /&gt;
&lt;br /&gt;
* '''[[Scripting Code::Blocks]]'''&lt;br /&gt;
:Information about scripting Code::Blocks with [http://www.squirrel-lang.org/ Squirrel].&lt;br /&gt;
&lt;br /&gt;
* '''[[A short overview about Code::Blocks architecture]]'''&lt;br /&gt;
:Information about the architecture of Code::Blocks.&lt;br /&gt;
&lt;br /&gt;
* '''[[Code::Blocks SDK events]]'''&lt;br /&gt;
:Information about the Code::Blocks SDK events and how to work with them.&lt;br /&gt;
&lt;br /&gt;
* '''[[File formats description]]'''&lt;br /&gt;
:Description of the format of each file Code::Blocks produces.&lt;br /&gt;
&lt;br /&gt;
* '''[[Version control]]'''&lt;br /&gt;
:Tips and trick for working with our version control system.&lt;br /&gt;
&lt;br /&gt;
== Plug-In development ==&lt;br /&gt;
&lt;br /&gt;
* [[Creating a simple &amp;quot;Hello World&amp;quot; plugin]]&lt;br /&gt;
* [[Creating a Plug-in which modifies CB's Menus]]&lt;br /&gt;
* [[Creating a plugin that actually does something]]&lt;br /&gt;
* [[Linking the plugin to a Nightly Build]]&lt;br /&gt;
* [[Managing Plug-in Resources]]&lt;br /&gt;
&lt;br /&gt;
* [[Research on doing a Plug-in for embedded help in CB]]&lt;br /&gt;
&lt;br /&gt;
* [[wxSmith extensions]]&lt;br /&gt;
* [[Code::Completion Rewrite]] and [[Code Completion plugin]] and [[Code Completion Design]]&lt;br /&gt;
&lt;br /&gt;
== Scripting ==&lt;br /&gt;
&lt;br /&gt;
Using scripting to extend Code::Blocks' functionality&lt;br /&gt;
&lt;br /&gt;
* [[Wizard scripts|Creating a new project wizard]]&lt;br /&gt;
&lt;br /&gt;
== Developing C::B with Git ==&lt;br /&gt;
For devs who want to use Git to develop C::B, here are some steps to follow, especially you need to correctly set the SVN and GIT properties so that you can make your local git commits back to the official SVN repo. See [/index.php/topic,16096.msg128152.html#msg128152 Re: Read-only Git, SVN Repo for Code::Blocks], also stahta01 has a nice instruction about how to use git, see [/index.php/topic,19533.msg133422.html#msg133422 Development How to use a Code::Blocks Git Repo].&lt;br /&gt;
&lt;br /&gt;
If you want to create a SVN style patch from git, see: [/index.php/topic,19391.msg132530.html#msg132530 This forum post].&lt;br /&gt;
&lt;br /&gt;
== Debugging C::B ==&lt;br /&gt;
&lt;br /&gt;
* When C::B crashed, it will generate a call-stack file &amp;quot;codeblocks.RPT&amp;quot;, at the crash point, this is a text file, you can open it, if your C::B contains the debug information, it will have file and line information about each call. If it is a stripped version, but you have the debug version of C::B, you can try to run the [/index.php/topic,13129.msg88254.html#msg88254 Debugging made easier], this is a address2line UI interface works under Windows.&lt;br /&gt;
* You can debug C::B under C::B (with the debugger plugin), also, you can link C::B to the debug version of wxWidgets library, so you can see whether a bug is located in C::B source code or wxWidgets' source code, see here: [/index.php/topic,17316.msg130972.html#msg130972 patch to build C::B against wx debug library]&lt;/div&gt;</summary>
		<author><name>Ollydbg</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=Developer_documentation&amp;diff=7764</id>
		<title>Developer documentation</title>
		<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php?title=Developer_documentation&amp;diff=7764"/>
		<updated>2014-09-17T05:20:50Z</updated>

		<summary type="html">&lt;p&gt;Ollydbg: /* Developing C::B with Git */add stahta01's nice article&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Code::Blocks Documentation]]&lt;br /&gt;
[[Category:Developer Documentation]]&lt;br /&gt;
{{Layout_box2|1=&lt;br /&gt;
'''Official Code repository Subversion'''&amp;lt;br/&amp;gt;&lt;br /&gt;
* Web-interface by ViewVC: http://sourceforge.net/p/codeblocks/code/log/&lt;br /&gt;
* Subversion URL: &amp;lt;nowiki&amp;gt;svn://svn.code.sf.net/p/codeblocks/code/trunk&amp;lt;/nowiki&amp;gt; or &amp;lt;nowiki&amp;gt;http://svn.code.sf.net/p/codeblocks/code/trunk&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Mirror by biplab''' (Read-only; refreshed every 10 minutes.)&lt;br /&gt;
* Subversion URL: &amp;lt;nowiki&amp;gt;svn://cb.biplab.in/codeblocks/trunk&amp;lt;/nowiki&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
* Web-interface: http://cb.biplab.in/websvn/&lt;br /&gt;
* Git URL: git://cb.biplab.in/codeblocks.git&lt;br /&gt;
* Web-interface:http://cb.biplab.in/cgit/&lt;br /&gt;
&lt;br /&gt;
'''Mirror by Jens''' (Read-only; refreshed every 10 minutes.)&lt;br /&gt;
* Web-interface: http://cgit.jenslody.de/&lt;br /&gt;
* the above link contains many mirrors such as wxWidgets trunk, git mirror, and git mirror of codeblocks.github&lt;br /&gt;
&lt;br /&gt;
'''Mirror by Obf''' (Read-only; refreshed manually.)&lt;br /&gt;
* Web-interface: https://github.com/obfuscated/codeblocks_sf&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Articles for Code::Blocks developers.'''&lt;br /&gt;
&lt;br /&gt;
* '''&amp;lt;u&amp;gt;Documentation&amp;lt;/u&amp;gt;'''&lt;br /&gt;
:[https://www.codeblocks.org/manual.shtml User's manual] in various formats and languages.&lt;br /&gt;
:Also see http://developer.berlios.de/projects/codeblocks/ (under the downloads section).&lt;br /&gt;
:Checkout the SDK documentation at http://developer.berlios.de/project/showfiles.php?group_id=5358 as CHM file(s).&lt;br /&gt;
&lt;br /&gt;
* Compile the complete Code::Blocks from sources on '''[[Installing Code::Blocks from source on Windows|Windows]]''' and '''[[Installing Code::Blocks from source on Linux|Linux]]'''&lt;br /&gt;
&lt;br /&gt;
* '''[[Compile Code::Blocks plugins based on a nightly]]''' without the need to compile wxWidgets or the Code::Blocks core.&lt;br /&gt;
&lt;br /&gt;
* '''[http://launchpad.net/products/codeblocks/ Translation]'''&lt;br /&gt;
:Code::Blocks uses Launchpad to coordinate translation efforts.&lt;br /&gt;
&lt;br /&gt;
* '''[[Coding style]]'''&lt;br /&gt;
:The source code formatting style used in the Code::Blocks' source.&lt;br /&gt;
&lt;br /&gt;
* '''[[Creating a custom lexer for Code::Blocks editor]]'''&lt;br /&gt;
:How to add support for new syntax lighting schemes.&lt;br /&gt;
&lt;br /&gt;
* '''[[Creating a patch to submit to BerliOS (Patch Tracker)]]'''&lt;br /&gt;
:Creating a diff file and then submitting it to the patch tracker.&lt;br /&gt;
&lt;br /&gt;
* '''[[Unicode Standards]]'''&lt;br /&gt;
:Information about unicode standards and how unicode is handled in Code::Blocks' source code.&lt;br /&gt;
&lt;br /&gt;
* '''[[Various development tips]]'''&lt;br /&gt;
:List of various development tips for Code::Blocks.&lt;br /&gt;
&lt;br /&gt;
* '''[[Scripting Code::Blocks]]'''&lt;br /&gt;
:Information about scripting Code::Blocks with [http://www.squirrel-lang.org/ Squirrel].&lt;br /&gt;
&lt;br /&gt;
* '''[[A short overview about Code::Blocks architecture]]'''&lt;br /&gt;
:Information about the architecture of Code::Blocks.&lt;br /&gt;
&lt;br /&gt;
* '''[[Code::Blocks SDK events]]'''&lt;br /&gt;
:Information about the Code::Blocks SDK events and how to work with them.&lt;br /&gt;
&lt;br /&gt;
* '''[[File formats description]]'''&lt;br /&gt;
:Description of the format of each file Code::Blocks produces.&lt;br /&gt;
&lt;br /&gt;
* '''[[Version control]]'''&lt;br /&gt;
:Tips and trick for working with our version control system.&lt;br /&gt;
&lt;br /&gt;
== Plug-In development ==&lt;br /&gt;
&lt;br /&gt;
* [[Creating a simple &amp;quot;Hello World&amp;quot; plugin]]&lt;br /&gt;
* [[Creating a Plug-in which modifies CB's Menus]]&lt;br /&gt;
* [[Creating a plugin that actually does something]]&lt;br /&gt;
* [[Linking the plugin to a Nightly Build]]&lt;br /&gt;
* [[Managing Plug-in Resources]]&lt;br /&gt;
&lt;br /&gt;
* [[Research on doing a Plug-in for embedded help in CB]]&lt;br /&gt;
&lt;br /&gt;
* [[wxSmith extensions]]&lt;br /&gt;
* [[Code::Completion Rewrite]] and [[Code Completion plugin]] and [[Code Completion Design]]&lt;br /&gt;
&lt;br /&gt;
== Scripting ==&lt;br /&gt;
&lt;br /&gt;
Using scripting to extend Code::Blocks' functionality&lt;br /&gt;
&lt;br /&gt;
* [[Wizard scripts|Creating a new project wizard]]&lt;br /&gt;
&lt;br /&gt;
== Developing C::B with Git ==&lt;br /&gt;
For devs who want to use Git to develop C::B, here are some steps to follow, especially you need to correctly set the SVN and GIT properties so that you can make your local git commits back to the official SVN repo. See [/index.php/topic,16096.msg128152.html#msg128152 Re: Read-only Git, SVN Repo for Code::Blocks], also stahta01 has a nice instruction about how to use git, see [/index.php/topic,19533.msg133422.html#msg133422 Development How to use a Code::Blocks Git Repo].&lt;br /&gt;
&lt;br /&gt;
If you want to create a SVN style patch from git, see: [/index.php/topic,19391.msg132530.html#msg132530 This forum post].&lt;br /&gt;
&lt;br /&gt;
== Debugging C::B ==&lt;br /&gt;
&lt;br /&gt;
* When C::B crashed, it will generate a call-stack file &amp;quot;codeblocks.RPT&amp;quot;, at the crash point, this is a text file, you can open it, if your C::B contains the debug information, it will have file and line information about each call. If it is a stripped version, but you have the debug version of C::B, you can try to run the [/index.php/topic,13129.msg88254.html#msg88254 Debugging made easier], this is a address2line UI interface works under Windows.&lt;br /&gt;
* You can debug C::B under C::B (with the debugger plugin), also, you can link C::B to the debug version of wxWidgets library, so you can see whether a bug is located in C::B source code or wxWidgets' source code, see here: [/index.php/topic,17316.msg130972.html#msg130972 patch to build C::B against wx debug library]&lt;/div&gt;</summary>
		<author><name>Ollydbg</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=Creating_a_patch_to_submit_(Patch_Tracker)&amp;diff=7763</id>
		<title>Creating a patch to submit (Patch Tracker)</title>
		<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php?title=Creating_a_patch_to_submit_(Patch_Tracker)&amp;diff=7763"/>
		<updated>2014-09-17T05:16:41Z</updated>

		<summary type="html">&lt;p&gt;Ollydbg: the tickets system is now in SF, so update all the address.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Developer Documentation]]&lt;br /&gt;
== Introduction ==&lt;br /&gt;
You want to contribute to Code::Blocks? - Thank you! That is really appreciated. Hence you can help us even more if you read the following paragraphs carefully.&lt;br /&gt;
&lt;br /&gt;
First of all please make sure the feature you are implementing is not already implemented in the &amp;quot;nightly builds&amp;quot; of Code::Blocks ([/index.php/board,20.0.html /index.php/board,20.0.html]). Furthermore browse through the list of available patches at the Code::Blocks project page at SourceForge (see section &amp;quot;Patch submission&amp;quot; below on how to gain access). If you are unsure, don't hesitate to ask in the forum ([ ]) for advise.&lt;br /&gt;
&lt;br /&gt;
You can make it easier for the developers to integrate your patches if you follow the advices of this page. Patches can be created in different formats. The format that is used by Code::Blocks is called a &amp;quot;unified diff&amp;quot;. Hence 3rd party tools may still create a different patch format although it may be labelled as &amp;quot;unified diff&amp;quot;. To avoid unnecessary incompatibilities the best way to provide a patch is to '''use the Subversion (SVN) diff''' (using the command line tool or a SVN GUI application).&lt;br /&gt;
&lt;br /&gt;
== What is required? ==&lt;br /&gt;
Not too much, you might already have the required tools installed.&lt;br /&gt;
You'll need a subversion client software. You can download a current version for your OS at the Subversion project webpage here: [http://subversion.tigris.org http://subversion.tigris.org]. If you want to apply or test your patches you'll also need either '''svn''' version ≥ 1.7.0 or the '''patch''' program; you can download patch and find more information about it at the [http://www.gnu.org/software/patch/ GNU patch website]. &lt;br /&gt;
&lt;br /&gt;
It is a good idea to apply your code to the most up-to-date sources of Code::Blocks as they are available at the SVN repository. You'll find the instructions how to obtain the sources here: [https://www.codeblocks.org/downloads/7 https://www.codeblocks.org/downloads/7]. Once you've created your local sandbox you can start integrating your changes into it. Thus you may modify existing files or add new ones. When you have finished please make sure you've verified your implementation (feature(s)) work properly. Now it's time to create the patch.&lt;br /&gt;
&lt;br /&gt;
== Patch creation ==&lt;br /&gt;
If you have added new files you first have to register them with your sandbox. Thus go into the directory you've added new files and type at the command line:&lt;br /&gt;
: &amp;lt;tt&amp;gt;svn add filename(s)&amp;lt;/tt&amp;gt;&lt;br /&gt;
...whereas &amp;quot;filename(s)&amp;quot; needs to be replaced with the files you've added. Of course if you are not using the command line version of SVN you can easily use the &amp;quot;Add&amp;quot; feature of your prefered SVN GUI. If you've completed adding all your new files to your sandbox you are ready to create the patch.&lt;br /&gt;
&lt;br /&gt;
First of all go to the top-level directory of your sandbox (the first directory that has a hidden &amp;quot;.svn&amp;quot; folder with content). This is done because the patch file generated by the following command is relative to the directory where it's performed. This is the command to create the patch file:&lt;br /&gt;
: &amp;lt;tt&amp;gt;svn diff &amp;gt; my.patch&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can change the name of the patch (''my.patch'' in the example) with a more descriptive name but make sure you leave the file extension &amp;quot;.patch&amp;quot; as this avoids conflicts while submitting the patch. The creation of the ''difference file'' (the patch file) may take some time, please be patient.&lt;br /&gt;
&lt;br /&gt;
Once the patch file is created please make sure it contains content! Otherwise make sure you followed the steps above or ask in the forum ([ ]) for support.&lt;br /&gt;
&lt;br /&gt;
''Note: if the created patch is much larger than expected (it should be similar in size to the amount of code you changed/added) it is likely that extraneous white space changes are being picked up. In this case, please use the following command to create the patch file:''&lt;br /&gt;
: &amp;lt;tt&amp;gt;svn diff -x -w &amp;gt; my.patch&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Patch application and testing ===&lt;br /&gt;
In order to apply a patch you need the patch program ([http://gnuwin32.sourceforge.net/packages/patch.htm Windows] [http://savannah.gnu.org/projects/patch/ Linux]). Make sure you are in the same directory the patch was created and then type the following command:&lt;br /&gt;
: &amp;lt;tt&amp;gt;patch --unified --strip=0 --forward --input=my.patch&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Or, if you are using svn version ≥ 1.7.0, the command:&lt;br /&gt;
: &amp;lt;tt&amp;gt;svn patch my.patch&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will perform some checks and then will patch your files using the difference information saved in the patch file (''my.patch'' in the example).&lt;br /&gt;
&lt;br /&gt;
'''Important note:''' If you are working under Windows you may have to convert the patch file to dos line-ending format. You can do that using &amp;quot;unix2dos my.patch&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== Patch submission ==&lt;br /&gt;
By now you are ready to submit your work to the Patch Tracker at [https://sourceforge.net/p/codeblocks/tickets/?source=navbar Tickets] - the developer platform for Code::Blocks. If you haven't done so already, you need to register with Sourceforge to gain the right to submit patches to projects. The membership is free and appreciated. Select the &amp;quot;Tickests&amp;quot; section ([https://sourceforge.net/p/codeblocks/tickets/?source=navbar Tickets]) of the Code::Blocks project page. Click on &amp;quot;Submit A Patch&amp;quot; and fill out the form that appears. For now you only need to select a category for your patch, a '''descriptive''' summary and the patch itself. Make sure you enable the checkbox &amp;quot;Upload Patch&amp;quot; and provide the patch file you've just created. Then you are ready for submission - click on the &amp;quot;Submit patch&amp;quot; button on the bottom of the page.&lt;br /&gt;
&lt;br /&gt;
You should now see the current list of patches with your patch at the top. Please note you can add additional comments or updates to your patch by simply clicking on the patch in the list and fill out the form that appears.&lt;br /&gt;
&lt;br /&gt;
'''Thank you very much for your submission!'''&lt;/div&gt;</summary>
		<author><name>Ollydbg</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=Creating_a_patch_to_submit_to_BerliOS_(Patch_Tracker)&amp;diff=7762</id>
		<title>Creating a patch to submit to BerliOS (Patch Tracker)</title>
		<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php?title=Creating_a_patch_to_submit_to_BerliOS_(Patch_Tracker)&amp;diff=7762"/>
		<updated>2014-09-17T05:10:21Z</updated>

		<summary type="html">&lt;p&gt;Ollydbg: moved Creating a patch to submit to BerliOS (Patch Tracker) to Creating a patch to submit (Patch Tracker): BerliOS is closed, we now use Sourceforce as patch tracker&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#REDIRECT [[Creating a patch to submit (Patch Tracker)]]&lt;/div&gt;</summary>
		<author><name>Ollydbg</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=Creating_a_patch_to_submit_(Patch_Tracker)&amp;diff=7761</id>
		<title>Creating a patch to submit (Patch Tracker)</title>
		<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php?title=Creating_a_patch_to_submit_(Patch_Tracker)&amp;diff=7761"/>
		<updated>2014-09-17T05:10:21Z</updated>

		<summary type="html">&lt;p&gt;Ollydbg: moved Creating a patch to submit to BerliOS (Patch Tracker) to Creating a patch to submit (Patch Tracker): BerliOS is closed, we now use Sourceforce as patch tracker&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Developer Documentation]]&lt;br /&gt;
== Introduction ==&lt;br /&gt;
You want to contribute to Code::Blocks? - Thank you! That is really appreciated. Hence you can help us even more if you read the following paragraphs carefully.&lt;br /&gt;
&lt;br /&gt;
First of all please make sure the feature you are implementing is not already implemented in the &amp;quot;nightly builds&amp;quot; of Code::Blocks ([/index.php/board,20.0.html /index.php/board,20.0.html]). Furthermore browse through the list of available patches at the Code::Blocks project page at BerliOS (see section &amp;quot;Patch submission&amp;quot; below on how to gain access). If you are unsure, don't hesitate to ask in the forum ([ ]) for advise.&lt;br /&gt;
&lt;br /&gt;
You can make it easier for the developers to integrate your patches if you follow the advices of this page. Patches can be created in different formats. The format that is used by Code::Blocks is called a &amp;quot;unified diff&amp;quot;. Hence 3rd party tools may still create a different patch format although it may be labelled as &amp;quot;unified diff&amp;quot;. To avoid unnecessary incompatibilities the best way to provide a patch is to '''use the Subversion (SVN) diff''' (using the command line tool or a SVN GUI application).&lt;br /&gt;
&lt;br /&gt;
== What is required? ==&lt;br /&gt;
Not too much, you might already have the required tools installed.&lt;br /&gt;
You'll need a subversion client software. You can download a current version for your OS at the Subversion project webpage here: [http://subversion.tigris.org http://subversion.tigris.org]. If you want to apply or test your patches you'll also need either '''svn''' version ≥ 1.7.0 or the '''patch''' program; you can download patch and find more information about it at the [http://www.gnu.org/software/patch/ GNU patch website]. &lt;br /&gt;
&lt;br /&gt;
It is a good idea to apply your code to the most up-to-date sources of Code::Blocks as they are available at the SVN repository. You'll find the instructions how to obtain the sources here: [https://www.codeblocks.org/downloads/7 https://www.codeblocks.org/downloads/7]. Once you've created your local sandbox you can start integrating your changes into it. Thus you may modify existing files or add new ones. When you have finished please make sure you've verified your implementation (feature(s)) work properly. Now it's time to create the patch.&lt;br /&gt;
&lt;br /&gt;
== Patch creation ==&lt;br /&gt;
If you have added new files you first have to register them with your sandbox. Thus go into the directory you've added new files and type at the command line:&lt;br /&gt;
: &amp;lt;tt&amp;gt;svn add filename(s)&amp;lt;/tt&amp;gt;&lt;br /&gt;
...whereas &amp;quot;filename(s)&amp;quot; needs to be replaced with the files you've added. Of course if you are not using the command line version of SVN you can easily use the &amp;quot;Add&amp;quot; feature of your prefered SVN GUI. If you've completed adding all your new files to your sandbox you are ready to create the patch.&lt;br /&gt;
&lt;br /&gt;
First of all go to the top-level directory of your sandbox (the first directory that has a hidden &amp;quot;.svn&amp;quot; folder with content). This is done because the patch file generated by the following command is relative to the directory where it's performed. This is the command to create the patch file:&lt;br /&gt;
: &amp;lt;tt&amp;gt;svn diff &amp;gt; my.patch&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can change the name of the patch (''my.patch'' in the example) with a more descriptive name but make sure you leave the file extension &amp;quot;.patch&amp;quot; as this avoids conflicts while submitting the patch. The creation of the ''difference file'' (the patch file) may take some time, please be patient.&lt;br /&gt;
&lt;br /&gt;
Once the patch file is created please make sure it contains content! Otherwise make sure you followed the steps above or ask in the forum ([ ]) for support.&lt;br /&gt;
&lt;br /&gt;
''Note: if the created patch is much larger than expected (it should be similar in size to the amount of code you changed/added) it is likely that extraneous white space changes are being picked up. In this case, please use the following command to create the patch file:''&lt;br /&gt;
: &amp;lt;tt&amp;gt;svn diff -x -w &amp;gt; my.patch&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Patch application and testing ===&lt;br /&gt;
In order to apply a patch you need the patch program ([http://gnuwin32.sourceforge.net/packages/patch.htm Windows] [http://savannah.gnu.org/projects/patch/ Linux]). Make sure you are in the same directory the patch was created and then type the following command:&lt;br /&gt;
: &amp;lt;tt&amp;gt;patch --unified --strip=0 --forward --input=my.patch&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Or, if you are using svn version ≥ 1.7.0, the command:&lt;br /&gt;
: &amp;lt;tt&amp;gt;svn patch my.patch&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will perform some checks and then will patch your files using the difference information saved in the patch file (''my.patch'' in the example).&lt;br /&gt;
&lt;br /&gt;
'''Important note:''' If you are working under Windows you may have to convert the patch file to dos line-ending format. You can do that using &amp;quot;unix2dos my.patch&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
== Patch submission ==&lt;br /&gt;
By now you are ready to submit your work to the Patch Tracker at BerliOS ([http://developer.berlios.de/projects/codeblocks http://developer.berlios.de/projects/codeblocks/]) - the developer platform for Code::Blocks. If you haven't done so already, you need to register with BerliOS to gain the right to submit patches to projects. The membership is free and appreciated. Select the &amp;quot;Patches&amp;quot; section ([http://developer.berlios.de/patch/?group_id=5358 http://developer.berlios.de/patch/?group_id=5358]) of the Code::Blocks project page. Click on &amp;quot;Submit A Patch&amp;quot; and fill out the form that appears. For now you only need to select a category for your patch, a '''descriptive''' summary and the patch itself. Make sure you enable the checkbox &amp;quot;Upload Patch&amp;quot; and provide the patch file you've just created. Then you are ready for submission - click on the &amp;quot;Submit patch&amp;quot; button on the bottom of the page.&lt;br /&gt;
&lt;br /&gt;
You should now see the current list of patches with your patch at the top. Please note you can add additional comments or updates to your patch by simply clicking on the patch in the list and fill out the form that appears.&lt;br /&gt;
&lt;br /&gt;
'''Thank you very much for your submission!'''&lt;/div&gt;</summary>
		<author><name>Ollydbg</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=Code_Completion_Design&amp;diff=7760</id>
		<title>Code Completion Design</title>
		<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php?title=Code_Completion_Design&amp;diff=7760"/>
		<updated>2014-09-08T15:22:31Z</updated>

		<summary type="html">&lt;p&gt;Ollydbg: add a new section&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Developer Documentation]]&lt;br /&gt;
==How to build==&lt;br /&gt;
===Get the source code===&lt;br /&gt;
When you download the  svn source code of code::blocks,(see here [[Installing_Code::Blocks_from_source_on_Windows#Code::Blocks_sources]] the source code of CodeCompletion plugin was already included. &lt;br /&gt;
&lt;br /&gt;
Here is the screen shot when I opened the codecompletion source code in C::B's source navigator view.&lt;br /&gt;
&lt;br /&gt;
[[Image:Devcc1.png|300x300px| Code completion source tree opened in code::blocks]]&lt;br /&gt;
&lt;br /&gt;
===Build the code completion plug-in===&lt;br /&gt;
If you only want to build the Code Completion plug-in, you can select it in the &amp;quot;build target list&amp;quot; (Note: by default, the Build target option was &amp;quot;ALL&amp;quot;, which means all the targets in the current workspace will be build), see the screen shot below:&lt;br /&gt;
&lt;br /&gt;
[[Image:Buildcc.PNG|frame|none| Code completion build target option in code::blocks]]&lt;br /&gt;
&lt;br /&gt;
Don't forget to run the batch script file &amp;quot;update.bat&amp;quot; after you build the target, this procedure will update your output folder package and strip the debug information. See the wiki page [[Installing_Code::Blocks_from_source_on_Windows]] for more information.&lt;br /&gt;
&lt;br /&gt;
===A brief description of every project files===&lt;br /&gt;
From now on, we use '''CC''' as an abbreviation for '''code completion plug-in'''.&lt;br /&gt;
{|border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; style=&amp;quot;font-size: 100%; border: gray solid 1px; border-collapse: collapse; text-align: left; width: 100% table-layout: unfixed;&amp;quot; &lt;br /&gt;
|-&lt;br /&gt;
| ccdebuginfo.cpp || a dialog for debugging CC, can be opened by double click on the code browser tree entry with shift and ctrl key pressed &lt;br /&gt;
|- &lt;br /&gt;
| ccoptionsdlg.cpp|| code completion options dialog, can be opened by menu-&amp;gt;setting-&amp;gt;editor-&amp;gt;code completion and symbols browser&lt;br /&gt;
|-&lt;br /&gt;
| ccoptionsprjdlg.cpp|| setting the additional parser search path&lt;br /&gt;
|-&lt;br /&gt;
| classbrowser.cpp||viewing the symbols tree ctrl(token tree).&lt;br /&gt;
|-&lt;br /&gt;
| classbrowserbuilderthread.cpp|| a thread to build the class browser tree above&lt;br /&gt;
|-&lt;br /&gt;
| codecompletion.cpp ||The Main file need by code completion plug-in, maintain all the CC's GUI and native parser&lt;br /&gt;
|-&lt;br /&gt;
| insertclassmethoddlg.cpp|| a dialog to insert class method, can be open by context menu in editor&lt;br /&gt;
|-&lt;br /&gt;
| nativeparser.cpp||a class derived from wxEvtHandler, NativeParser class has a member variable &amp;quot;Parser m_Parser&amp;quot;;&lt;br /&gt;
|-&lt;br /&gt;
| selectincludefile.cpp|| select multiply matched token names before any jump to declaration or jump to implementation.&lt;br /&gt;
|-&lt;br /&gt;
|parser/parser.cpp|| Parser class was also derived from wxEvtHandler, can start batch parse... this class has member variables like :cbThreadPool m_Pool(which will create a thread from thread pool for each file need passed);TokenTree* m_pTokens(contains all the Token database);&lt;br /&gt;
|-&lt;br /&gt;
|parser/parserthread.cpp||will do the syntax analysis for every file in a project, it has a Tokenizer as member variable&lt;br /&gt;
|-&lt;br /&gt;
|parser/token.cpp|| definition of the &amp;quot;Token&amp;quot; class, and TokenTree(which means the Token dababase)&lt;br /&gt;
|-&lt;br /&gt;
|parser/tokenizer.cpp|| tokenizer will return every wxString it regard as a symbol by GetToken(), also do a replacement before return&lt;br /&gt;
|-&lt;br /&gt;
|parser/searchtree.cpp|| implement the patricia search tree using by TokenTree&lt;br /&gt;
|-&lt;br /&gt;
|Header files|| no description needed&lt;br /&gt;
|}&lt;br /&gt;
==Structure of CodeCompletion plugin==&lt;br /&gt;
[[Image:CodeCompletionPluginStructure.png| Code completion plugin Structure]]&lt;br /&gt;
&lt;br /&gt;
The above image show the main structure of our CodeCompletion plugins. The main class are:&lt;br /&gt;
* CodeCompletion: this is the class for main plugin), it handle event sent from the C::B core. Toolbar handling was done in this class.&lt;br /&gt;
* NativeParser: as a main member variable of the CodeCompletion class, this class is like the Parser manager class, it create/delete Parser instances when a project load/closed.&lt;br /&gt;
* Parser: this class is mainly for handling Tokens. Parser class hold a TokenTree which record all the Tokens. Parser class also hold a thread pool, it can either run the parsing task in the pool(this means the parsing task will be done in a separate thread), or directly by a function call.&lt;br /&gt;
* Parserthread: The class derived from the worker thread(cbThreadedTask class), it member function DoParse() is the function for parsing.&lt;br /&gt;
&lt;br /&gt;
Besides that, when trying to show the suggestion list(auto completion list, or code completion list), the NativeParser need to analyze the current the current statement structure, and query the symbol(token) information from the Tokentree, this is mostly done in ResolveExpression() member function.&lt;br /&gt;
&lt;br /&gt;
Some important note: when all Parserthread instances finish parsing job in the pool, the thread pool will send an event to its parent(in this case, it is the Parser class), so the Parser know that the parsing is done, or the Parser can assign another parsing jobs to the thread pool.&lt;br /&gt;
&lt;br /&gt;
==Low level parser(Lexical analysis, Tokenize)==&lt;br /&gt;
For someone haven't heard what does &amp;quot;Token&amp;quot; and &amp;quot;Tokenize&amp;quot; mean, you should read the wikibooks article [http://en.wikibooks.org/wiki/C%2B%2B_Programming/Compiler#Compilation A brief explain of what does a parser do] and [http://en.wikipedia.org/wiki/Lexical_analysis Tokenize on wikipedia]. Shortly, a Tokenizer regards your C++ or C source code as a large array of characters (sometimes, we call it a string), then this big string can be divided to small atomic strings----a '''token''' (Each token has a unique meanings and can't be divided into sub-strings. A token can be a symbol, an identifier, a keyword, a digital number, etc), meanwhile &amp;quot;white spaces&amp;quot; and &amp;quot;comments&amp;quot; were ignored by the Tokenizer.&lt;br /&gt;
&lt;br /&gt;
for a simple c++ program like below&lt;br /&gt;
&amp;lt;source lang = &amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
int main()&lt;br /&gt;
{&lt;br /&gt;
    std::cout &amp;lt;&amp;lt; &amp;quot;hello world&amp;quot; &amp;lt;&amp;lt; std::endl;&lt;br /&gt;
    return 0;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
After tokenizing, it should give these 15 tokens&lt;br /&gt;
&amp;lt;source lang = &amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
1 = string &amp;quot;int&amp;quot;&lt;br /&gt;
2 = string &amp;quot;main&amp;quot;&lt;br /&gt;
3 = opening parenthesis&lt;br /&gt;
4 = closing parenthesis&lt;br /&gt;
5 = opening brace&lt;br /&gt;
6 = string &amp;quot;std&amp;quot;&lt;br /&gt;
7 = namespace operator&lt;br /&gt;
8 = string &amp;quot;cout&amp;quot;&lt;br /&gt;
9 = &amp;lt;&amp;lt; operator&lt;br /&gt;
10 = string &amp;quot;&amp;quot;hello world&amp;quot;&amp;quot;&lt;br /&gt;
11 = string &amp;quot;endl&amp;quot;&lt;br /&gt;
12 = semicolon&lt;br /&gt;
13 = string &amp;quot;return&amp;quot;&lt;br /&gt;
14 = number 0&lt;br /&gt;
15 = closing brace&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Tokenizer class===&lt;br /&gt;
A class named '''Tokenizer''' was implemented in &amp;quot;tokenizer.h&amp;quot; and &amp;quot;tokenizer.cpp&amp;quot;. Seen from the Tokenizer's level, a token is just a [http://docs.wxwidgets.org/stable/wx_unicode.html unicode] wxString. There are several steps to run an instance of Tokenizer. &lt;br /&gt;
===preparing the big string===&lt;br /&gt;
From the previous section, you know the Tokenizer is just a string cutter. So, the first step is preparing the big string. The string can either be loaded from a source file or a memory buffer. Currently, the Unicode wxString is used.(since we are all using Unicode build of code::blocks, and ANSI mode is outdated and deprecated).&lt;br /&gt;
===Get or Peek a token===&lt;br /&gt;
'''Tokenizer''' contains a '''file position indicator'''----m_TokenIndex(see [http://en.wikipedia.org/wiki/Fopen File Open In C language]) pointing to the current position of string. So, you can '''Get''' a token or '''Peek''' a token. Here is the function prototype&lt;br /&gt;
&amp;lt;source lang = &amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
    //Get the current token string started from m_TokenIndex, &lt;br /&gt;
    //After that, increase the m_Tokenindex&lt;br /&gt;
    wxString GetToken();&lt;br /&gt;
&lt;br /&gt;
    //Peak the current token string and but do *NOT* increase the m_TokenIndex&lt;br /&gt;
    wxString PeekToken();&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For example, if the Tokenizer parses the example code above, you can see how these two methods work.&lt;br /&gt;
&lt;br /&gt;
*After initializing the Tokenizer(preparing the big string), You firstly call the GetToken() function, which will return the first token &amp;quot;int&amp;quot; and increase the m_TokenIndex one step to &amp;quot;int&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
*Then, if you call the PeekToken(), which will return a token &amp;quot;main&amp;quot;, but the tokenindex was still remaining point to &amp;quot;int&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
*If you call the GetToken() again, it will return a &amp;quot;main&amp;quot; immediately and increase the file pointer to &amp;quot;main&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
Note: Internally, the Tokenizer class use a '''undo and peek cache''' to do the trick. Once a token is peeked, it is saved in '''m_Peek''' member, so, next time you call GetToken(), it just immediately return the cached value without calling the &amp;quot;DoGetToken()&amp;quot; procedure again. &lt;br /&gt;
&lt;br /&gt;
[[Image:Cb token cache.png]]&lt;br /&gt;
&lt;br /&gt;
===Nested Value of braces===&lt;br /&gt;
As you know, braces are exist in pairs, such as &amp;quot;{&amp;quot; and &amp;quot;}&amp;quot;, or &amp;quot;[&amp;quot; and &amp;quot;]&amp;quot;, Also, these braces can be embeded. So the Tokenizer keep a value '''m_NestLevel''' to indicate how deep you stays. If the Tokenizer meets a '''{''', it will increase the nestValue, and if it meets a '''}''', it will decrease the m_NestLevel. See the pseudo code in Tokenizer.cpp below:&lt;br /&gt;
&amp;lt;source lang = &amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
        if (CurrentChar() == '{')&lt;br /&gt;
            ++m_NestLevel;&lt;br /&gt;
        else if (CurrentChar() == '}')&lt;br /&gt;
            --m_NestLevel;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SkipUnwanted tokens===&lt;br /&gt;
A '''bool''' member variable '''m_SkipUnwantedTokens''' determines whether a regular assignments statement will be omitted or not. For example, a piece of code below:&lt;br /&gt;
&amp;lt;source lang = &amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
a = b + c;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If m_SkipUnwantedTokens == true, then once SkipUnwanted() meets the &amp;quot;=&amp;quot; symbol, it will go on skipping every characters until it meets ''',''' or ''';''' or '''}''', so this statement will be omitted by the Tokenizer. &lt;br /&gt;
&lt;br /&gt;
Sometimes, this behavior becomes a nightmare when parsing the statement like default argument in template. Or the default arguments in function.&lt;br /&gt;
&amp;lt;source lang = &amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
// assignment statement in template arguments&lt;br /&gt;
template&amp;lt;class T = int&amp;gt; &lt;br /&gt;
class abc {&lt;br /&gt;
 T m_a;&lt;br /&gt;
 ......&lt;br /&gt;
 ......&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// assignment statement in function arguments&lt;br /&gt;
&lt;br /&gt;
void foo( int arg1 = 60 )&lt;br /&gt;
{&lt;br /&gt;
    bla bla;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
If the Tokenizer finds that an equation sign '''=''', it will skip any character until it meets a '''}''', so, the class declaration or function body will be totally skipped in the unexpected way. In this case, we should manually '''disable''' this functionality by setting m_SkipUnwantedTokens = false to let the Tokenizer parse these statements correctly.&lt;br /&gt;
&lt;br /&gt;
That's why you will see many situations when you enter a function, you should save the m_SkipUnwantedTokens statues and disabled it, when you leave a function, you should manually restore it.(See function implementation in ParseThread.cpp)&lt;br /&gt;
&lt;br /&gt;
===Return a correct token, Macro replacement===&lt;br /&gt;
Special token should be replaced for parsing correctly. For example, in the standard c++ header (mingw), there are a string named &amp;quot;_GLIBCXX_STD&amp;quot;, this should be replaced to &amp;quot;std&amp;quot;. See the dialog below.&lt;br /&gt;
&lt;br /&gt;
[[Image:Cc std replacement.png|400x400px|]]&lt;br /&gt;
&lt;br /&gt;
The inline function in the Tokenizer class will check whether a token should be replaced before return. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang = &amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
wxString Tokenizer::MacroReplace(const wxString str)&lt;br /&gt;
{&lt;br /&gt;
    wxStringHashMap::const_iterator it = s_Replacements.find(str);&lt;br /&gt;
&lt;br /&gt;
    if (it != s_Replacements.end())&lt;br /&gt;
    {&lt;br /&gt;
        // match one!&lt;br /&gt;
        wxString key   = it-&amp;gt;first;&lt;br /&gt;
        wxString value = it-&amp;gt;second;&lt;br /&gt;
        TRACE(_T(&amp;quot;MacroReplace() : Replacing '%s' with '%s' (file='%s').&amp;quot;), key.wx_str(), value.wx_str(), m_Filename.wx_str());&lt;br /&gt;
        if (value[0]=='+' &amp;amp;&amp;amp; CurrentChar()=='(')&lt;br /&gt;
        {&lt;br /&gt;
            unsigned int start = m_TokenIndex;&lt;br /&gt;
            m_Buffer[start] = ' ';&lt;br /&gt;
            bool fillSpace = false;&lt;br /&gt;
            while (m_Buffer[start]!=')')&lt;br /&gt;
            {&lt;br /&gt;
                if (m_Buffer[start]==',')&lt;br /&gt;
                    fillSpace = true;&lt;br /&gt;
&lt;br /&gt;
                if (fillSpace==true)&lt;br /&gt;
                    m_Buffer[start]=' ';&lt;br /&gt;
&lt;br /&gt;
                start++;&lt;br /&gt;
            }&lt;br /&gt;
            m_Buffer[start] = '{';&lt;br /&gt;
            return value.Remove(0,1);&lt;br /&gt;
        }&lt;br /&gt;
        else if (value[0] == '-')&lt;br /&gt;
        {&lt;br /&gt;
            unsigned int lenKey = key.Len();&lt;br /&gt;
            value = value.Remove(0,1);&lt;br /&gt;
            unsigned int lenValue = value.Len();&lt;br /&gt;
&lt;br /&gt;
            for (unsigned int i=1; i&amp;lt;=lenKey; i++)&lt;br /&gt;
            {&lt;br /&gt;
                if (i &amp;lt; lenValue)&lt;br /&gt;
                    m_Buffer[m_TokenIndex-i] = value[lenValue-i];&lt;br /&gt;
                else&lt;br /&gt;
                    m_Buffer[m_TokenIndex-i] = ' ';&lt;br /&gt;
            }&lt;br /&gt;
&lt;br /&gt;
            int firstSpace = value.First(' ');&lt;br /&gt;
            // adjust m_TokenIndex&lt;br /&gt;
            m_TokenIndex = m_TokenIndex - lenValue + firstSpace;&lt;br /&gt;
&lt;br /&gt;
            return value.Mid(0,firstSpace);&lt;br /&gt;
        }&lt;br /&gt;
        else&lt;br /&gt;
            return value;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    return str;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:Cc replace dialog.png|400x400px|none| Code completion build target option in code::blocks]]&lt;br /&gt;
&lt;br /&gt;
Setting the replacement mapping. Note that before return a token, a replacement map was searched to check if it matches any entry in the map, so, the bigger this map goes, the slower it will do parsing.&lt;br /&gt;
&lt;br /&gt;
Note: Code Completion plug-in is not a preprocessor, so it is difficult to deal with the source mixed with many macro, or some strange macros. This is something like Ctags' replacement options &amp;quot;?I identifier?list&amp;quot; in [http://ctags.sourceforge.net/ctags.html#OPERATIONAL%20DETAILS ctags option detial] or [http://codelite.org/LiteEditor/FAQ Code Completion macro FAQ]&lt;br /&gt;
&lt;br /&gt;
For discussion of Ctags, the related thread is [/index.php/topic,10564.msg72424.html#msg72424 Re: namespaces and code completion] and [/index.php/topic,11187.msg77135.html#msg77135 Re: New code completion remarks/issues]&lt;br /&gt;
&lt;br /&gt;
===replacement rules===&lt;br /&gt;
====directly replacement AAAAA -&amp;gt; BBBBB====&lt;br /&gt;
You can define a rule:&lt;br /&gt;
AAAAA -&amp;gt; BBBBB&lt;br /&gt;
&lt;br /&gt;
Which means, if the tokenizer meet a string &amp;quot;AAAAA&amp;quot;, then it will returned a string &amp;quot;BBBBB&amp;quot;&lt;br /&gt;
====directly replacement AAAAA -&amp;gt; Empty String====&lt;br /&gt;
You can define a rule:&lt;br /&gt;
AAAAA -&amp;gt; Empty String&lt;br /&gt;
&lt;br /&gt;
The token &amp;quot;AAAAA&amp;quot; is skipped when parsing.&lt;br /&gt;
&lt;br /&gt;
==== AAAAA -&amp;gt; +BBBBB====&lt;br /&gt;
For example, when &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang = &amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
_GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D)&lt;br /&gt;
&lt;br /&gt;
  /// See bits/stl_deque.h's _Deque_base for an explanation.&lt;br /&gt;
  template&amp;lt;typename _Tp, typename _Alloc&amp;gt;&lt;br /&gt;
    struct _Vector_base&lt;br /&gt;
    {&lt;br /&gt;
      typedef typename _Alloc::template rebind&amp;lt;_Tp&amp;gt;::other _Tp_alloc_type;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    ......&lt;br /&gt;
&lt;br /&gt;
_GLIBCXX_END_NESTED_NAMESPACE&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We should replace the string &amp;quot;_GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D)&amp;quot; &lt;br /&gt;
to &amp;quot;namespace std {&amp;quot;, here, we introduce two replacement rules:&lt;br /&gt;
{|border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; style=&amp;quot;font-size: 100%; border: gray solid 1px; border-collapse: collapse; text-align: left; width: 100% table-layout: unfixed;&amp;quot; &lt;br /&gt;
|-&lt;br /&gt;
| _GLIBCXX_BEGIN_NESTED_NAMESPACE || +namespace&lt;br /&gt;
|-&lt;br /&gt;
| _GLIBCXX_END_NESTED_NAMESPACE  || }&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
In this rule, we firstly replace the &amp;quot;_GLIBCXX_BEGIN_NESTED_NAMESPACE&amp;quot; with the &amp;quot;namespace&amp;quot;, then, we reserve the &amp;quot;std&amp;quot;, and change the closing parenthesis to an opening brace. (See the image above), also, every token string &amp;quot;_GLIBCXX_END_NESTED_NAMESPACE&amp;quot; will be replaced by &amp;quot;}&amp;quot;. &lt;br /&gt;
[[File:CCreplacement_rule.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
So, the code becomes to like below:&lt;br /&gt;
&amp;lt;source lang = &amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
namespace     std   {&lt;br /&gt;
&lt;br /&gt;
  /// See bits/stl_deque.h's _Deque_base for an explanation.&lt;br /&gt;
  template&amp;lt;typename _Tp, typename _Alloc&amp;gt;&lt;br /&gt;
    struct _Vector_base&lt;br /&gt;
    {&lt;br /&gt;
      typedef typename _Alloc::template rebind&amp;lt;_Tp&amp;gt;::other _Tp_alloc_type;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    ......&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
==== AAAAA -&amp;gt; -BBBBB====&lt;br /&gt;
&lt;br /&gt;
For example, when &lt;br /&gt;
&amp;lt;source lang = &amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
_GLIBCXX_BEGIN_NAMESPACE_TR1&lt;br /&gt;
...&lt;br /&gt;
...&lt;br /&gt;
_GLIBCXX_END_NAMESPACE_TR1&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We should replace the string &amp;quot;_GLIBCXX_BEGIN_NAMESPACE_TR1&amp;quot; &lt;br /&gt;
to &amp;quot;namespace tr1 {&amp;quot;, here, we introduce two replacement rules:&lt;br /&gt;
{|border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; style=&amp;quot;font-size: 100%; border: gray solid 1px; border-collapse: collapse; text-align: left; width: 100% table-layout: unfixed;&amp;quot; &lt;br /&gt;
|-&lt;br /&gt;
| _GLIBCXX_BEGIN_NAMESPACE_TR1 || -namespace tr1 {&lt;br /&gt;
|-&lt;br /&gt;
| _GLIBCXX_END_NAMESPACE_TR1  || }&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
In this rule, we firstly replace the &amp;quot;_GLIBCXX_BEGIN_NAMESPACE_TR1&amp;quot; with the &amp;quot;namespace&amp;quot;, then, add aditional string &amp;quot;tr1 {&amp;quot;&lt;br /&gt;
&lt;br /&gt;
So, the code becomes:&lt;br /&gt;
&amp;lt;source lang = &amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
namespace tr1 {&lt;br /&gt;
...&lt;br /&gt;
...&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== AAAAA -&amp;gt; *====&lt;br /&gt;
In this case, we call it a &amp;quot;strip the next &amp;quot;(&amp;quot; and &amp;quot;)&amp;quot; rule. for example:&lt;br /&gt;
&lt;br /&gt;
The rule syntax is:&lt;br /&gt;
&lt;br /&gt;
XXXXXX  -&amp;gt; *&lt;br /&gt;
&lt;br /&gt;
For example, In the source code below:&lt;br /&gt;
&amp;lt;source lang = &amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
CVAPI(void) cvFxxxx();&lt;br /&gt;
CVAPI(cvMat *) cvFyyy();&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
will become to (if I add a replacement rule  CVAPI -&amp;gt; *)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang = &amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
void cvFxxxx();&lt;br /&gt;
cvMat * cvFyyy();&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== AAAAA -&amp;gt; @====&lt;br /&gt;
With this rule, you can trigger the tokenizer to work in macro replacement mode, so if you have the code&lt;br /&gt;
&amp;lt;source lang = &amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
#define	_EXFUN(name, proto)		name proto&lt;br /&gt;
&lt;br /&gt;
FILE *	_EXFUN(fopen, (const char *__restrict _name, const char *__restrict _type));&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
You can add a rule _EXFUN -&amp;gt; @, so that the tokenizer will go to macro replacement mode if he see a _EXFUN. See details in [/index.php/topic,19278.msg131810.html#msg131810 Is it possible for the parser to support newlib prototypes?]&lt;br /&gt;
&lt;br /&gt;
==High level parser(Syntax Analysis)==&lt;br /&gt;
This is the main flow of a parser.&lt;br /&gt;
&lt;br /&gt;
[[Image:Parser_Flow.gif]]&lt;br /&gt;
===parser thread===&lt;br /&gt;
Basically, we can say, the low level parser(Tokenizer) moves its pointer character by character, and return a wxString(token) to feed the high level parser(Syntax analyzer).All the syntax analysis was done in ParserThread. A thread must be created to parse a source file. see parserthread.cpp and parserthread.h, a thread will be allocated from thread pool. For example, a file contains these statement:&lt;br /&gt;
&amp;lt;source lang = &amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
    void  f1();&lt;br /&gt;
    int   f2(char c);&lt;br /&gt;
    float f3(void * p);&lt;br /&gt;
    int   f1;&lt;br /&gt;
    double f2;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
After the ParserThread finished its parsing, it will recognize five tokens, which has the keyword &amp;quot;f1&amp;quot;,&amp;quot;f2&amp;quot; and &amp;quot;f3&amp;quot;, note, tokens can have the same names, but they differ from different types( variables, functions...).&lt;br /&gt;
&lt;br /&gt;
===Token class===&lt;br /&gt;
How can a large number of tokens be recorded? A '''Token'''(note: it as a capital means it's class type) class was introduced to recorded every token. For boosting the speed of allocating Tokens, the &amp;quot;new&amp;quot; and &amp;quot;delete&amp;quot; operator were overloaded in its base class BlockAllocated. See the [http://en.wikipedia.org/wiki/Memory_pool memory pool] page on wikipedia as a reference.&lt;br /&gt;
&amp;lt;source lang = &amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
class Token  : public BlockAllocated&amp;lt;Token, 10000&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
        ......&lt;br /&gt;
        wxString m_Type; // this is the return value (if any): e.g. const wxString&amp;amp;&lt;br /&gt;
        wxString m_ActualType; // this is what the parser believes is the actual return value: e.g. wxString&lt;br /&gt;
        wxString m_Name;&lt;br /&gt;
        wxString m_Args;&lt;br /&gt;
        wxString m_AncestorsString; // all ancestors comma-separated list&lt;br /&gt;
        unsigned int m_File;&lt;br /&gt;
        unsigned int m_Line;&lt;br /&gt;
        unsigned int m_ImplFile;&lt;br /&gt;
        unsigned int m_ImplLine; // where the token was met&lt;br /&gt;
        unsigned int m_ImplLineStart; // if token is impl, opening brace line&lt;br /&gt;
        unsigned int m_ImplLineEnd; // if token is impl, closing brace line&lt;br /&gt;
        TokenScope m_Scope;&lt;br /&gt;
        TokenKind m_TokenKind;&lt;br /&gt;
        bool m_IsOperator;&lt;br /&gt;
        bool m_IsLocal; // found in a local file?&lt;br /&gt;
        bool m_IsTemp; // if true, the tree deletes it in FreeTemporaries()&lt;br /&gt;
        bool m_IsConst;    // the member method is const (yes/no)&lt;br /&gt;
&lt;br /&gt;
        int m_ParentIndex;&lt;br /&gt;
        TokenIdxSet m_Children;&lt;br /&gt;
        TokenIdxSet m_Ancestors;&lt;br /&gt;
        TokenIdxSet m_DirectAncestors;&lt;br /&gt;
        TokenIdxSet m_Descendants;&lt;br /&gt;
        ......&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
You can see the Token class contains all the information needed for recording its locating, its type or class derived hierarchy... &lt;br /&gt;
&lt;br /&gt;
For example, in the source code in[Low level parser(Lexical analysis)]. A Token for &amp;quot;main&amp;quot; should contains it's name (obviously , m_Name=&amp;quot;main&amp;quot; ), then m_File will record which file dose this Token exist. m_Line will give the line number of &amp;quot;main&amp;quot; in this source file, and so on.&lt;br /&gt;
&lt;br /&gt;
===Memory Pool--BlockAllocated class===&lt;br /&gt;
In BlockAllocated class, there is only a static member say &amp;quot;static BlockAllocator&amp;lt;T, pool_size, debug&amp;gt; allocator;&amp;quot; to keep all the pre-allocated memory for all derived class.&lt;br /&gt;
&lt;br /&gt;
'''10000''' means a pool of 10000 Tokens were allocated in the memory pool, so, dynamically allocate a Token object will be fast and efficient. &lt;br /&gt;
&lt;br /&gt;
[[Image:Cb blockalloc.png|frame|none|  Operator new overloading for fast allocate in the heap]]&lt;br /&gt;
&lt;br /&gt;
===ParserThread===&lt;br /&gt;
The function Parse() will do the most job of syntax analysis. See the pseudo code below.&lt;br /&gt;
&amp;lt;source lang = &amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
ParserThread::Parse()&lt;br /&gt;
{&lt;br /&gt;
   ......&lt;br /&gt;
   do&lt;br /&gt;
    {&lt;br /&gt;
        ......&lt;br /&gt;
        DoParse();&lt;br /&gt;
        ......&lt;br /&gt;
 &lt;br /&gt;
        &lt;br /&gt;
    }while(false);&lt;br /&gt;
&lt;br /&gt;
    return result;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the DoParse(), it checks the token from Tokenizer. For example, if the token words = &amp;quot;enum&amp;quot;, then, the ParserThread::HandleEnum() will do the job to parse this enum block.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===A simple look ahead parser===&lt;br /&gt;
We can explain a little about it parser, the member variable '''m_Str''' of class ParserThread will be considered as a '''type stack''', for example, we want to parse the statement below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang = &amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
symbolA symbolB symbolC symbolD;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Only symbolD can be recognized as a variable, and it has a type of &amp;quot;symbolA symbolB symbolC&amp;quot;. When the parser meets each symbol, it will look ahead to see the next token is whether &amp;quot;;&amp;quot;, if not, the current token will '''pushed''' to m_Str. These iteration will be ended when the parser look ahead one step from symbolD and find the next token is a &amp;quot;;&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
===DoParse Examples===&lt;br /&gt;
====Handling class declaration====&lt;br /&gt;
The main routing of handling class was in &lt;br /&gt;
ParserThread::HandleClass function&lt;br /&gt;
If the parserThread meet these statement&lt;br /&gt;
&amp;lt;source lang = &amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
class AAA{&lt;br /&gt;
    int m_a;&lt;br /&gt;
    int m_b;&lt;br /&gt;
} ;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
It will surely add a Token of &amp;quot;AAA&amp;quot;, it's type is &amp;quot;class&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
What about these statements&lt;br /&gt;
&amp;lt;source lang = &amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
class AAA{&lt;br /&gt;
    int m_a;&lt;br /&gt;
    int m_b;&lt;br /&gt;
} x,y,z;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
The parserThread should firstly add a Token &amp;quot;AAA&amp;quot;, then it should regard &amp;quot;x&amp;quot;, &amp;quot;y&amp;quot;, &amp;quot;z&amp;quot; are three variables of type &amp;quot;AAA&amp;quot;. This was done by &amp;quot;ReadVarNames()&amp;quot; function, it will read every comma separated variables after a class declaration.&lt;br /&gt;
&lt;br /&gt;
====Handling typedef statement====&lt;br /&gt;
Sometimes, you can see these code blocks:&lt;br /&gt;
&amp;lt;source lang = &amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
typedef class AAA{&lt;br /&gt;
    int m_a;&lt;br /&gt;
    int m_b;&lt;br /&gt;
} BBB,CCC;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
If the parser meets the keyword &amp;quot;typedef&amp;quot;, firstly it set the &amp;quot;m_ParsingTypedef = ture&amp;quot; to indicate that we are parsing a typedef statement.&lt;br /&gt;
&lt;br /&gt;
Next, it meets a keyword &amp;quot;class&amp;quot;, which also indicate it is a class declaration. So, the HandleClass function will do the task. A Token of &amp;quot;class AAA&amp;quot; will be added to the TokenTree. Wait a minute, how can we deal with &amp;quot;BBB&amp;quot; and &amp;quot;CCC&amp;quot;, this is not the same case as previous code, we can't regard &amp;quot;BBB&amp;quot;,&amp;quot;CCC&amp;quot; as variables. In this case, another function &amp;quot;ReadClsName()&amp;quot; will be called. For simplicity of TokenTree, we just regard &amp;quot;BBB&amp;quot; and &amp;quot;CCC&amp;quot; as derived class of &amp;quot;AAA&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
How does the parserThread know between these two cases. Here is the code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang = &amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
                if (m_ParsingTypedef)&lt;br /&gt;
                {&lt;br /&gt;
                    m_Str.Clear();&lt;br /&gt;
                    ReadClsNames(newToken-&amp;gt;m_Name);&lt;br /&gt;
                    // m_ParsingTypedef = false;&lt;br /&gt;
                    break;&lt;br /&gt;
&lt;br /&gt;
                }&lt;br /&gt;
                else&lt;br /&gt;
                {&lt;br /&gt;
                    m_Str = newToken-&amp;gt;m_Name;&lt;br /&gt;
                    ReadVarNames();&lt;br /&gt;
                    m_Str.Clear();&lt;br /&gt;
                    break;&lt;br /&gt;
                }&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
That's the whole thing I would like to write about handling class and handling typedef.&lt;br /&gt;
&lt;br /&gt;
==TokenTree&amp;amp;SearchTree==&lt;br /&gt;
Maybe, you would ask a question: where do these Tokens store? The answer is that all the Tokens will be recorded in &amp;quot;TokenTree class&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
When a certain Token is identified(whether it's a global variable, a class declaration, a class member function, and so on), it will be inserted to a database(TokenTree). &lt;br /&gt;
&lt;br /&gt;
Furthermore, for fast Token query, Tokens should be sorted by it's wxString m_Name member; &lt;br /&gt;
&lt;br /&gt;
A '''compact Patricia tree'''(see the wikipedia [http://en.wikipedia.org/wiki/Radix_tree Patricia tree on wikipedia]) is built to hold all their names. &lt;br /&gt;
&lt;br /&gt;
For example, If you add three item to the TokenTree.&lt;br /&gt;
&amp;lt;source lang = &amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
    mytree-&amp;gt;AddItem(_T(&amp;quot;physics&amp;quot;),_T(&amp;quot;1 - uno&amp;quot;));&lt;br /&gt;
    mytree-&amp;gt;AddItem(_T(&amp;quot;physiology&amp;quot;),_T(&amp;quot;2 - dos&amp;quot;));&lt;br /&gt;
    mytree-&amp;gt;AddItem(_T(&amp;quot;psychic&amp;quot;),_T(&amp;quot;3 - tres&amp;quot;));&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The Patricia tree structure will show as below, the edge of a tree contains a &amp;quot;label string&amp;quot; and the number in parentheses refers to a node Id.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang = &amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
- &amp;quot;&amp;quot; (0)&lt;br /&gt;
      \- &amp;quot;p&amp;quot; (4)&lt;br /&gt;
              +- &amp;quot;hysi&amp;quot; (2)&lt;br /&gt;
              |          +- &amp;quot;cs&amp;quot; (1)&lt;br /&gt;
              |          \- &amp;quot;ology&amp;quot; (3)&lt;br /&gt;
              \- &amp;quot;sychic&amp;quot; (5)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
===Animation of Patricia tree===&lt;br /&gt;
A web page gives an animation of building a Patricia tree, you can see how the tree node added. See here [http://bootstrapping.wordpress.com/2008/01/24/prefix-searching-with-radix-tree/ Prefix searching with Radix Tree]&lt;br /&gt;
&lt;br /&gt;
A better animation demo of Patricia tree can be found in [http://people.cis.ksu.edu/%7Erhowell/viewer/viewer.html Search Tree Viewer]. In this page, you can select the tree type, and enter some strings, then the tree will dynamically show in the window.&lt;br /&gt;
&lt;br /&gt;
===SearchTree Node===&lt;br /&gt;
A Node should contains at least several essential element. They are:&lt;br /&gt;
# An edge: in the image below, the gray filled area shows a Node, since each edge belong to the next node, for example, the Node has an edge &amp;quot;abcd&amp;quot;.&lt;br /&gt;
# SearchTreeItemMap: because our searchTree is a compact Patricia tree which means an edge contains many items. Such as, &amp;quot;ab&amp;quot; , &amp;quot;abc&amp;quot;, &amp;quot;abcd&amp;quot; all the suffix string belong to the edge &amp;quot;abcd&amp;quot; &lt;br /&gt;
# SearchTreeLinkMap: This is an associated container map&amp;lt;wxChar,NodeId&amp;gt;, which store all &amp;quot;pointers&amp;quot; to its child Node. In the example below, &amp;quot;e&amp;quot; points to a Node of &amp;quot;efg&amp;quot;, while &amp;quot;x&amp;quot; points to &amp;quot;xyz&amp;quot;.&lt;br /&gt;
# Node depth: depth of Search Tree Node is defined by the string length from the &amp;quot;root node&amp;quot;. See a depth of each node on the search tree above. For example, the Node of &amp;quot;hysi&amp;quot; has a m_Depth = 5 (&amp;quot;&amp;quot; + &amp;quot;p&amp;quot; + &amp;quot;hysi&amp;quot; = 5).&lt;br /&gt;
&lt;br /&gt;
===Node Lable===&lt;br /&gt;
For example, the node &amp;quot;hysi&amp;quot; (2) has two children, they are &amp;quot;cs&amp;quot; (1) and &amp;quot;ology&amp;quot; (3), show below.&lt;br /&gt;
&lt;br /&gt;
[[Image:Cb tree node lable.png]]&lt;br /&gt;
&lt;br /&gt;
For more information, see the forum discussion here. [/index.php/topic,1696.0.html rickg22's SearchTree development] as a reference.&lt;br /&gt;
&lt;br /&gt;
===How a new item is added to the tree===&lt;br /&gt;
When you add a new key (string) to the tree, some node should be splited, and new node need to be added. For example [/index.php/topic,1696.msg12617.html#msg12617 this post]show some details.&lt;br /&gt;
&lt;br /&gt;
Suppose we have two nodes in the tree, the node id is 0 (root node) and 1, the tree hold only one key string(item) &amp;quot;physics&amp;quot;:&lt;br /&gt;
&amp;lt;source lang = &amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
Adding word: physics&lt;br /&gt;
1 items in the tree&lt;br /&gt;
- &amp;quot;&amp;quot; (0)&lt;br /&gt;
      \- &amp;quot;physics&amp;quot; (1)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Now, if another key string &amp;quot;physiology&amp;quot; is added to the tree, we now firstly check &amp;quot;physiology&amp;quot; is already in the tree, if not, we need to find the common string &amp;quot;physi&amp;quot;, so the node 1 should be splited after the common string, so you get the following result.&lt;br /&gt;
&amp;lt;source lang = &amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
Adding word: physiology&lt;br /&gt;
2 items in the tree&lt;br /&gt;
- &amp;quot;&amp;quot; (0)&lt;br /&gt;
      \- &amp;quot;physi&amp;quot; (2)&lt;br /&gt;
                  +- &amp;quot;cs&amp;quot; (1)&lt;br /&gt;
                  \- &amp;quot;ology&amp;quot; (3)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Here, the middle node &amp;quot;physi&amp;quot; is added. the original node 1's lable is shorten to &amp;quot;cs&amp;quot;, and a new node &amp;quot;ology&amp;quot; is added as a new child node to the middle node.&lt;br /&gt;
&lt;br /&gt;
In the other case, the new added item does not cause a new node to be added to the tree, only a node need to be extended by its ledge. For example:&lt;br /&gt;
&amp;lt;source lang = &amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
6 items in the tree&lt;br /&gt;
- &amp;quot;&amp;quot; (0)&lt;br /&gt;
      \- &amp;quot;p&amp;quot; (4)&lt;br /&gt;
              +- &amp;quot;aranormal&amp;quot; (8)&lt;br /&gt;
              +- &amp;quot;hysi&amp;quot; (2)&lt;br /&gt;
              |          +- &amp;quot;cs&amp;quot; (1)&lt;br /&gt;
              |          \- &amp;quot;ology&amp;quot; (3)&lt;br /&gt;
              \- &amp;quot;sych&amp;quot; (6)&lt;br /&gt;
                         +- &amp;quot;i&amp;quot; (9)&lt;br /&gt;
                         |       +- &amp;quot;atrist&amp;quot; (10)&lt;br /&gt;
                         |       \- &amp;quot;cs&amp;quot; (5)&lt;br /&gt;
                         \- &amp;quot;otic&amp;quot; (7)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Now, you add a new item &amp;quot;psychiatrists&amp;quot;, pay attention to the node 10 in the above tree, we have already an item &amp;quot;psychiatrist&amp;quot;, when the new item &amp;quot;psychiatrists&amp;quot; is added, we can just extend the node 10's edge from &amp;quot;artrist&amp;quot; to &amp;quot;artrists&amp;quot;, thus no new node is needed.&lt;br /&gt;
&amp;lt;source lang = &amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
7 items in the tree&lt;br /&gt;
- &amp;quot;&amp;quot; (0)&lt;br /&gt;
      \- &amp;quot;p&amp;quot; (4)&lt;br /&gt;
              +- &amp;quot;aranormal&amp;quot; (8)&lt;br /&gt;
              +- &amp;quot;hysi&amp;quot; (2)&lt;br /&gt;
              |          +- &amp;quot;cs&amp;quot; (1)&lt;br /&gt;
              |          \- &amp;quot;ology&amp;quot; (3)&lt;br /&gt;
              \- &amp;quot;sych&amp;quot; (6)&lt;br /&gt;
                         +- &amp;quot;i&amp;quot; (9)&lt;br /&gt;
                         |       +- &amp;quot;atrists&amp;quot; (10)&lt;br /&gt;
                         |       \- &amp;quot;cs&amp;quot; (5)&lt;br /&gt;
                         \- &amp;quot;otic&amp;quot; (7)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Note that now, the node 20 now contains two items. It is a map (depth -&amp;gt; item).&lt;br /&gt;
&amp;lt;source lang = &amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
depth -&amp;gt; item&lt;br /&gt;
12    -&amp;gt; &amp;quot;psychiatrist&amp;quot;&lt;br /&gt;
13    -&amp;gt; &amp;quot;psychiatrists&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===How to query a Token by a keyword===&lt;br /&gt;
The parser collect all the Token information, and stored them in the TokenTree, the GUI function can query keywords from the database to show function tips or to build a Class Browser tree.&lt;br /&gt;
&lt;br /&gt;
For example, if you want to find all the Tokens named &amp;quot;ab&amp;quot;. In the picture above from TokenDatabase(TokenTree). we can search on the Patricia tree containing all the Tokens names, finaly, we find a tree node with a edge &amp;quot;abcd&amp;quot;. So, &amp;quot;ab&amp;quot; is in it's Node's items list. Then, we can find a TokenIdxSet in a vector&amp;lt;TokenIdxSet&amp;gt;, this TokenIdxSet has all the index named by &amp;quot;ab&amp;quot;, so, we can get the result like: There are many Tokens named &amp;quot;ab&amp;quot;.Token &amp;quot;ab&amp;quot; may be a member varialbe name in a class, or a global function name...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang = &amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
ClassA::ab&lt;br /&gt;
ClassB::ab&lt;br /&gt;
void ab()&lt;br /&gt;
....&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:CCTokenTree1.png]]&lt;br /&gt;
&lt;br /&gt;
==Flexible Parser structure==&lt;br /&gt;
The Parser class( in Parser.cpp and Parser.h ) has re-factored to support every project associate with a Parser object (svn revision &amp;gt; 6268 ). Which means: One Parser object per project, so, every project (xxx.cbp) will hold its own Token macro defines and Token trees. &lt;br /&gt;
&lt;br /&gt;
Due to the new introduced conditional preprocessor handling mechanism, the same source file may give different Tokens due to the different macro defines in different project. Also, CC support parsing on the files which does not belong to any project. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
#You open a project in CB, then all the files belong to the project( related to the project) will be parsed in CC.&lt;br /&gt;
#Now, you open another file( we call it a &amp;quot;separate file&amp;quot; later) which is not belong to the current project nor any other opened project.&lt;br /&gt;
#Then the CC will create a &amp;quot;temporary parser&amp;quot; named &amp;quot;NONE“ parser, and add this separate file to the &amp;quot;NONE&amp;quot; parser.&lt;br /&gt;
#So, you can still see the class tree when viewing the separate file.&lt;br /&gt;
#Once you close this separate file,  the &amp;quot;NONE&amp;quot; parser will automatically be removed.&lt;br /&gt;
&lt;br /&gt;
The main idea is: Now, We can let the CC do parse on some separate files&lt;br /&gt;
and support class browsing in Symbol browser.&lt;br /&gt;
&lt;br /&gt;
==Automatic Code Completion==&lt;br /&gt;
===Find the search scope===&lt;br /&gt;
&lt;br /&gt;
[[Image:CC SearchScope.png]]&lt;br /&gt;
&lt;br /&gt;
For example, when you are editing, and the caret position was located at &amp;quot;E&amp;quot; as shown in the above image, the first thing doing an automatic code completion is find the '''search scope'''.&lt;br /&gt;
&lt;br /&gt;
Here are some steps to get the initial(first) search scope:&lt;br /&gt;
&lt;br /&gt;
*First, you need to correct all the &amp;quot;using namespace XXXX&amp;quot; directives at the beginning the the current source file.(labeled with &amp;quot;A&amp;quot;), this means all the child tokens of &amp;quot;namespace Scintilla&amp;quot; should be searched.&lt;br /&gt;
*Secondly, find the function body where the current caret position locates. eg, the above code, the caret is in the &amp;quot;RunStyles::RunFromPosition()&amp;quot; function, so the function parameter variable &amp;quot;position&amp;quot;(labeled with &amp;quot;C&amp;quot; and the local variable &amp;quot;run&amp;quot; (labeled as &amp;quot;D&amp;quot;) is also a matching Tokens.&lt;br /&gt;
*Thirdly, look at the &amp;quot;B&amp;quot;, this means we are in the class named &amp;quot;RunStyles&amp;quot;, so, &amp;quot;RunStyles&amp;quot; is also a search scope.&lt;br /&gt;
*Finally, don't forget the global namespace scope, because the tokens of this scope are exposed to everywhere of the source.&lt;br /&gt;
&lt;br /&gt;
===Break up the current statement===&lt;br /&gt;
&amp;lt;source lang = &amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
 VariableA.m_VariableB.Functi&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
If you are entering the above statement, the caret is behind the &amp;quot;Functi&amp;quot;. Then the whole line will be break up to several &amp;quot;parsing component&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
There are three components: &amp;quot;'''VariableA'''&amp;quot; , &amp;quot;'''m_VariableB'''&amp;quot; and &amp;quot;'''Functi'''&amp;quot;. In the next section, I will introduce that the AI matching routing will start from matching the first component with the initial(first) search scope.&lt;br /&gt;
&lt;br /&gt;
===Do an AI match===&lt;br /&gt;
Doing an AI match is just like a walking on a tree, and find the final matching result.See the image below:&lt;br /&gt;
&lt;br /&gt;
[[image:CC AI Match.png]]&lt;br /&gt;
&lt;br /&gt;
'''Here is the matching algorithm''':&lt;br /&gt;
&lt;br /&gt;
Now, suppose we have an initial &amp;quot;search scope&amp;quot;, and a &amp;quot;component&amp;quot; array. &lt;br /&gt;
&lt;br /&gt;
The AI match algorithm starts from matching the &amp;quot;sub search scopes&amp;quot; with the first &amp;quot;component&amp;quot;, then, the matched &amp;quot;sub search scope&amp;quot;(red rectangle) will be the initial &amp;quot;search scope&amp;quot; again matching with the second &amp;quot;component&amp;quot;, this matching routing is running continuously until we matches with the final component. Then we get the whole matching result, that will be show as a auto code completion list.&lt;br /&gt;
&lt;br /&gt;
==Code completion debugging support==&lt;br /&gt;
===Debug Log output===&lt;br /&gt;
If you want to debug your plug-in, you may need to Logout the debug message to the &amp;quot;Code::Blocks Debug&amp;quot; panel. Here is the sample code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang = &amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
Manager::Get()-&amp;gt;GetLogManager()-&amp;gt;DebugLog(_(&amp;quot;XXXXX &amp;quot;));&lt;br /&gt;
&lt;br /&gt;
wxString name;&lt;br /&gt;
wxString args;&lt;br /&gt;
wxString m_Str;&lt;br /&gt;
//.....&lt;br /&gt;
Manager::Get()-&amp;gt;GetLogManager()-&amp;gt;DebugLog(F(_T(&amp;quot;Add token name='&amp;quot;)+name+_T(&amp;quot;', args='&amp;quot;)+args+_T(&amp;quot;', return type='&amp;quot;) + m_Str+ _T(&amp;quot;'&amp;quot;)));&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Also, you need start the Code::Blocks with the command line argument. For example in windows.&lt;br /&gt;
&lt;br /&gt;
'''codeblocks.exe --debug-log'''&lt;br /&gt;
&lt;br /&gt;
then a Code::blocks debug panel will be shown to display the log.&lt;br /&gt;
[[Image:CbDebugLog.png|frame|none|  Debug Log output panel]]&lt;br /&gt;
&lt;br /&gt;
===TRACE macro support===&lt;br /&gt;
As you can see in the source file like &amp;quot;tokenizer.cpp&amp;quot; or &amp;quot;parserthread.cpp&amp;quot;, there is a macro definition in the beginning of the source.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang = &amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
#define CC_CODECOMPLETION_DEBUG_OUTPUT 0&lt;br /&gt;
&lt;br /&gt;
#if CC_CODECOMPLETION_DEBUG_OUTPUT == 1&lt;br /&gt;
    #define TRACE(format, args...) \&lt;br /&gt;
        Manager::Get()-&amp;gt;GetLogManager()-&amp;gt;DebugLog(F(format, ##args))&lt;br /&gt;
    #define TRACE2(format, args...)&lt;br /&gt;
#elif CC_CODECOMPLETION_DEBUG_OUTPUT == 2&lt;br /&gt;
    #define TRACE(format, args...)                                              \&lt;br /&gt;
        do                                                                      \&lt;br /&gt;
        {                                                                       \&lt;br /&gt;
            if (g_EnableDebugTrace)                                             \&lt;br /&gt;
                Manager::Get()-&amp;gt;GetLogManager()-&amp;gt;DebugLog(F(format, ##args));   \&lt;br /&gt;
        }                                                                       \&lt;br /&gt;
        while (false)&lt;br /&gt;
    #define TRACE2(format, args...) \&lt;br /&gt;
        Manager::Get()-&amp;gt;GetLogManager()-&amp;gt;DebugLog(F(format, ##args))&lt;br /&gt;
#else&lt;br /&gt;
    #define TRACE(format, args...)&lt;br /&gt;
    #define TRACE2(format, args...)&lt;br /&gt;
#endif&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
This is a quite complex macro definition. So, if CC_CODECOMPLETION_DEBUG_OUTPUT is defined as 0, these debugging macros were disabled. If CC_CODECOMPLETION_DEBUG_OUTPUT is defined as 1, only the TRACE macro will be defined, so you can plot some messages to the Debug log. It is always the parser will parser many files, so the debug messages will be flooding. If we only interest in the debug message when we are parsing a specific source file, the best way was define CC_CODECOMPLETION_DEBUG_OUTPUT as 2. Now, TRACE macro will plot the message only in one source file. The source file name can be specified in token.cpp&lt;br /&gt;
&amp;lt;source lang = &amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
const wxString g_DebugTraceFile = _T(&amp;quot;myfile.cpp&amp;quot;); &lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
This way, only the debug message when parsing &amp;quot;myfile.cpp&amp;quot; will be traced.&lt;br /&gt;
&lt;br /&gt;
===Code-Completion debug tool dialog===&lt;br /&gt;
When you press '''shift''' and '''ctrl''' key and double click on any entry of the navigator tree entry, a debug tool dialog will pop up to give a more detail about the selected token. You can query its information such as its member variables, its Ancestors and so on.&lt;br /&gt;
&lt;br /&gt;
[[Image:CcDebugToolDialog.png]]&lt;br /&gt;
&lt;br /&gt;
===Debug Smart Sense log output ===&lt;br /&gt;
When you hold the'''shift''' and '''ctrl''' key and right click on any entry of the navigator tree entry, the context menu will have a &amp;quot;Debug SmartSense&amp;quot; menu entry shown. You can click it to enable it. See the image blow. Then, all the debug log information when doing an Auto-completion will be shown in the &amp;quot;Debug Log&amp;quot; panel.&lt;br /&gt;
&lt;br /&gt;
[[File:Cc debug smartsense.png]]&lt;br /&gt;
&lt;br /&gt;
==Mutexs and lockers in CC==&lt;br /&gt;
We need lockers to avoid multiply thread issues of wxString. More detailed can be found: [/index.php/topic,17543.0.html wxString and the locker issue in our CC code], to avoid such issue, we need lockers.&lt;br /&gt;
There are three main kind of lockers.&lt;br /&gt;
&amp;lt;nowiki&amp;gt;wxMutex s_ParserMutex;&lt;br /&gt;
wxMutex s_TokenTreeMutex;&lt;br /&gt;
wxMutex m_ClassBrowserBuilderThreadMutex;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
The first one was to protect multiply access to Parser objects, this is a static variable. The second one tries to forbid the multiply access to the TokenTree, the last one is used to build the symbol browser tree(usually show in the left docked panels of the C::B main frame)&lt;br /&gt;
&lt;br /&gt;
The associated Macros are below:&lt;br /&gt;
&amp;lt;source lang = &amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
// For tracking, either uncomment:&lt;br /&gt;
//#define CC_ENABLE_LOCKER_TRACK&lt;br /&gt;
// ...or:&lt;br /&gt;
#define CC_ENABLE_LOCKER_ASSERT&lt;br /&gt;
// ..or none of the above.&lt;br /&gt;
&lt;br /&gt;
#if defined(CC_ENABLE_LOCKER_TRACK)&lt;br /&gt;
    // TRACKING MUTXES&lt;br /&gt;
    // [1] Implementations for tracking mutexes:&lt;br /&gt;
    #define THREAD_LOCKER_MTX_LOCK(NAME)                                         \&lt;br /&gt;
        CCLogger::Get()-&amp;gt;DebugLog(F(_T(&amp;quot;%s.Lock() : %s(), %s, %d&amp;quot;),              \&lt;br /&gt;
                                    wxString(#NAME, wxConvUTF8).wx_str(),        \&lt;br /&gt;
                                    wxString(__FUNCTION__, wxConvUTF8).wx_str(), \&lt;br /&gt;
                                    wxString(__FILE__, wxConvUTF8).wx_str(),     \&lt;br /&gt;
                                    __LINE__))&lt;br /&gt;
    #define THREAD_LOCKER_MTX_LOCK_SUCCESS(NAME)                                 \&lt;br /&gt;
        CCLogger::Get()-&amp;gt;DebugLog(F(_T(&amp;quot;%s.Lock().Success() : %s(), %s, %d&amp;quot;),    \&lt;br /&gt;
                                    wxString(#NAME, wxConvUTF8).wx_str(),        \&lt;br /&gt;
                                    wxString(__FUNCTION__, wxConvUTF8).wx_str(), \&lt;br /&gt;
                                    wxString(__FILE__, wxConvUTF8).wx_str(),     \&lt;br /&gt;
                                    __LINE__))&lt;br /&gt;
    #define THREAD_LOCKER_MTX_UNLOCK(NAME)                                       \&lt;br /&gt;
        CCLogger::Get()-&amp;gt;DebugLog(F(_T(&amp;quot;%s.Unlock() : %s(), %s, %d&amp;quot;),            \&lt;br /&gt;
                                    wxString(#NAME, wxConvUTF8).wx_str(),        \&lt;br /&gt;
                                    wxString(__FUNCTION__, wxConvUTF8).wx_str(), \&lt;br /&gt;
                                    wxString(__FILE__, wxConvUTF8).wx_str(),     \&lt;br /&gt;
                                    __LINE__))&lt;br /&gt;
    #define THREAD_LOCKER_MTX_UNLOCK_SUCCESS(NAME)                               \&lt;br /&gt;
        CCLogger::Get()-&amp;gt;DebugLog(F(_T(&amp;quot;%s.Unlock().Success() : %s(), %s, %d&amp;quot;),  \&lt;br /&gt;
                                    wxString(#NAME, wxConvUTF8).wx_str(),        \&lt;br /&gt;
                                    wxString(__FUNCTION__, wxConvUTF8).wx_str(), \&lt;br /&gt;
                                    wxString(__FILE__, wxConvUTF8).wx_str(),     \&lt;br /&gt;
                                    __LINE__))&lt;br /&gt;
    #define THREAD_LOCKER_MTX_FAIL(NAME)                                         \&lt;br /&gt;
        CCLogger::Get()-&amp;gt;DebugLog(F(_T(&amp;quot;%s.Fail() : %s(), %s, %d&amp;quot;),              \&lt;br /&gt;
                                    wxString(#NAME, wxConvUTF8).wx_str(),        \&lt;br /&gt;
                                    wxString(__FUNCTION__, wxConvUTF8).wx_str(), \&lt;br /&gt;
                                    wxString(__FILE__, wxConvUTF8).wx_str(),     \&lt;br /&gt;
                                    __LINE__))&lt;br /&gt;
    // [2] Cumulative convenient macros for tracking mutexes [USE THESE!]:&lt;br /&gt;
    #define CC_LOCKER_TRACK_TT_MTX_LOCK(M)    \&lt;br /&gt;
    {                                         \&lt;br /&gt;
        THREAD_LOCKER_MTX_LOCK(M);            \&lt;br /&gt;
        if (M.Lock()==wxMUTEX_NO_ERROR)       \&lt;br /&gt;
          THREAD_LOCKER_MTX_LOCK_SUCCESS(M);  \&lt;br /&gt;
        else                                  \&lt;br /&gt;
          THREAD_LOCKER_MTX_FAIL(M);          \&lt;br /&gt;
    }&lt;br /&gt;
    #define CC_LOCKER_TRACK_TT_MTX_UNLOCK(M)    \&lt;br /&gt;
    {                                           \&lt;br /&gt;
        THREAD_LOCKER_MTX_UNLOCK(M);            \&lt;br /&gt;
        if (M.Unlock()==wxMUTEX_NO_ERROR)       \&lt;br /&gt;
          THREAD_LOCKER_MTX_UNLOCK_SUCCESS(M);  \&lt;br /&gt;
        else                                    \&lt;br /&gt;
          THREAD_LOCKER_MTX_FAIL(M);            \&lt;br /&gt;
    }&lt;br /&gt;
    #define CC_LOCKER_TRACK_CBBT_MTX_LOCK   CC_LOCKER_TRACK_TT_MTX_LOCK&lt;br /&gt;
    #define CC_LOCKER_TRACK_CBBT_MTX_UNLOCK CC_LOCKER_TRACK_TT_MTX_UNLOCK&lt;br /&gt;
    #define CC_LOCKER_TRACK_P_MTX_LOCK      CC_LOCKER_TRACK_TT_MTX_LOCK&lt;br /&gt;
    #define CC_LOCKER_TRACK_P_MTX_UNLOCK    CC_LOCKER_TRACK_TT_MTX_UNLOCK&lt;br /&gt;
&lt;br /&gt;
    // TRACKING CRITICAL SECIONS&lt;br /&gt;
    // [2] Implementations for tracking critical sections:&lt;br /&gt;
    #define THREAD_LOCKER_CS_ENTER(NAME)                                         \&lt;br /&gt;
        CCLogger::Get()-&amp;gt;DebugLog(F(_T(&amp;quot;%s.Enter() : %s(), %s, %d&amp;quot;),             \&lt;br /&gt;
                                    wxString(#NAME, wxConvUTF8).wx_str(),        \&lt;br /&gt;
                                    wxString(__FUNCTION__, wxConvUTF8).wx_str(), \&lt;br /&gt;
                                    wxString(__FILE__, wxConvUTF8).wx_str(),     \&lt;br /&gt;
                                    __LINE__))&lt;br /&gt;
    #define THREAD_LOCKER_CS_ENTERED(NAME)                                       \&lt;br /&gt;
        CCLogger::Get()-&amp;gt;DebugLog(F(_T(&amp;quot;%s.Entered() : %s(), %s, %d&amp;quot;),           \&lt;br /&gt;
                                    wxString(#NAME, wxConvUTF8).wx_str(),        \&lt;br /&gt;
                                    wxString(__FUNCTION__, wxConvUTF8).wx_str(), \&lt;br /&gt;
                                    wxString(__FILE__, wxConvUTF8).wx_str(),     \&lt;br /&gt;
                                    __LINE__))&lt;br /&gt;
    #define THREAD_LOCKER_CS_LEAVE(NAME)                                         \&lt;br /&gt;
        CCLogger::Get()-&amp;gt;DebugLog(F(_T(&amp;quot;%s.Leave() : %s(), %s, %d&amp;quot;),             \&lt;br /&gt;
                                    wxString(#NAME, wxConvUTF8).wx_str(),        \&lt;br /&gt;
                                    wxString(__FUNCTION__, wxConvUTF8).wx_str(), \&lt;br /&gt;
                                    wxString(__FILE__, wxConvUTF8).wx_str(),     \&lt;br /&gt;
                                    __LINE__))&lt;br /&gt;
    // [2] Cumulative convenient macros for tracking critical sections [USE THESE!]:&lt;br /&gt;
    #define CC_LOCKER_TRACK_CS_ENTER(CS) \&lt;br /&gt;
    {                                    \&lt;br /&gt;
         THREAD_LOCKER_CS_ENTER(CS);     \&lt;br /&gt;
         CS.Enter();                     \&lt;br /&gt;
         THREAD_LOCKER_CS_ENTERED(CS);   \&lt;br /&gt;
    }&lt;br /&gt;
    #define CC_LOCKER_TRACK_CS_LEAVE(CS) \&lt;br /&gt;
    {                                    \&lt;br /&gt;
          THREAD_LOCKER_CS_LEAVE(CS);    \&lt;br /&gt;
          CS.Leave();                    \&lt;br /&gt;
    }&lt;br /&gt;
#elif defined CC_ENABLE_LOCKER_ASSERT&lt;br /&gt;
    #define CC_LOCKER_TRACK_CS_ENTER(CS)     CS.Enter();&lt;br /&gt;
    #define CC_LOCKER_TRACK_CS_LEAVE(CS)     CS.Leave();&lt;br /&gt;
&lt;br /&gt;
    #define CC_LOCKER_TRACK_TT_MTX_LOCK(M)   cbAssert(M.Lock()==wxMUTEX_NO_ERROR);&lt;br /&gt;
    #define CC_LOCKER_TRACK_TT_MTX_UNLOCK(M) cbAssert(M.Unlock()==wxMUTEX_NO_ERROR);&lt;br /&gt;
    #define CC_LOCKER_TRACK_CBBT_MTX_LOCK    CC_LOCKER_TRACK_TT_MTX_LOCK&lt;br /&gt;
    #define CC_LOCKER_TRACK_CBBT_MTX_UNLOCK  CC_LOCKER_TRACK_TT_MTX_UNLOCK&lt;br /&gt;
    #define CC_LOCKER_TRACK_P_MTX_LOCK       CC_LOCKER_TRACK_TT_MTX_LOCK&lt;br /&gt;
    #define CC_LOCKER_TRACK_P_MTX_UNLOCK     CC_LOCKER_TRACK_TT_MTX_UNLOCK&lt;br /&gt;
#else&lt;br /&gt;
    #define CC_LOCKER_TRACK_CS_ENTER(CS)     CS.Enter();&lt;br /&gt;
    #define CC_LOCKER_TRACK_CS_LEAVE(CS)     CS.Leave();&lt;br /&gt;
&lt;br /&gt;
    #define CC_LOCKER_TRACK_TT_MTX_LOCK(M)   M.Lock();&lt;br /&gt;
    #define CC_LOCKER_TRACK_TT_MTX_UNLOCK(M) M.Unlock();&lt;br /&gt;
    #define CC_LOCKER_TRACK_CBBT_MTX_LOCK    CC_LOCKER_TRACK_TT_MTX_LOCK&lt;br /&gt;
    #define CC_LOCKER_TRACK_CBBT_MTX_UNLOCK  CC_LOCKER_TRACK_TT_MTX_UNLOCK&lt;br /&gt;
    #define CC_LOCKER_TRACK_P_MTX_LOCK       CC_LOCKER_TRACK_TT_MTX_LOCK&lt;br /&gt;
    #define CC_LOCKER_TRACK_P_MTX_UNLOCK     CC_LOCKER_TRACK_TT_MTX_UNLOCK&lt;br /&gt;
#endif&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Each mutex need a Lock and Unlock macro, like for mutex for Parser, we need CC_LOCKER_TRACK_P_MTX_LOCK and CC_LOCKER_TRACK_P_MTX_UNLOCK.&lt;br /&gt;
&lt;br /&gt;
==Usefull Links==&lt;br /&gt;
&lt;br /&gt;
*A discussion on search tree in the forum [/index.php/topic,1696.0.html] and [/index.php/topic,1581.0.html].&lt;br /&gt;
&lt;br /&gt;
*Another opensource IDE [http://vcfbuilder.org/?q=node/139 VCF builder]or[https://sourceforge.net/projects/vcfbuilder/ vcfbuilder on sf], By the way , VCF use a CodeStore based on [http://www.antlr.org/ antlr parser] to deal with parsing, the whole source code can be check out from &lt;br /&gt;
&amp;lt;pre&amp;gt;svn co https://vcfbuilder.svn.sourceforge.net/svnroot/vcfbuilder vcfbuilder&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*online book[http://www.macs.hw.ac.uk/~alison/alg/details.html Data Structures and Algorithms II Course ] and [http://www.macs.hw.ac.uk/~alison/alg/lectures.html pdf lectures]&lt;br /&gt;
&lt;br /&gt;
*A forum discussion on why a standard perprocessor and parser works slowly. [/index.php/topic,2494.msg19801.html#msg19801 parsing iostream header takes 5 seconds]&lt;br /&gt;
&lt;br /&gt;
*[http://www.codelite.org CodeLite] is another open source IDE using wxWidgets, use Ctags as a indexing service, and do context expression syntactic analysis generated from Lex and Yacc tools.See the explanation in forum message by it's author eranif [/index.php/topic,10087.msg70875.html#msg70875 How does Codelite's CC work with CTags and Yacc&amp;amp;Lex]&lt;br /&gt;
&lt;br /&gt;
*Hopefully, we can use the patricia tree from the standard library, see here:[http://gcc.gnu.org/onlinedocs/libstdc++/ext/pb_ds/trie_based_containers.html trie]&lt;br /&gt;
&lt;br /&gt;
* a blog from KDE4's developer, it explain the code completion in KDE4, see here:[http://zwabel.wordpress.com/ zwabel' blog]&lt;br /&gt;
&lt;br /&gt;
* QT creator source code from [http://qt.gitorious.org/qt-creator/qt-creator/trees/master QT-creator source]&lt;br /&gt;
&lt;br /&gt;
* [http://websvn.kde.org/trunk/KDE/kdevelop/ Kdevelop source code] and it's [http://websvn.kde.org/trunk/KDE/kdevelop/languages/cpp/parser/ parser]&lt;br /&gt;
&lt;br /&gt;
* [http://stackoverflow.com/questions/1220099/how-does-code-completion-work How does code completion work? - Stack Overflow]&lt;br /&gt;
&lt;br /&gt;
* [/index.php/topic,11724.0.html Just a reminder Codelite IDE now have improved it's parser]&lt;br /&gt;
&lt;br /&gt;
*[http://padator.org/software-yacfe.php Yacfe, a parser with proprocessor enabled]&lt;br /&gt;
&lt;br /&gt;
*[/index.php/topic,1581.msg11701.html#msg11701 A Mini C++ interpreter] from the book &amp;quot;The Art of C++ by Herbert Schildt&amp;quot;, source code can be download [http://books.mcgraw-hill.com/downloads/products/0072255129/0072255129_code.zip here]&lt;br /&gt;
&lt;br /&gt;
*[http://www.macs.hw.ac.uk/~alison/alg/lectures/l7.pdf Lecture 7: Parsing (intro) (pdf)] and [http://www.macs.hw.ac.uk/~alison/alg/lectures/l8.pdf Lecture 8: Recursive Descent Parsing (pdf)] from [http://www.macs.hw.ac.uk/~alison/alg/lectures.html Data Structures and Algorithms II]&lt;br /&gt;
&lt;br /&gt;
*There are some online &amp;quot;Compiler design&amp;quot; books listed in [http://www.freetechbooks.com/compiler-design-and-construction-f14.html Free Online Compiler Design and Construction Books :: FreeTechBooks.com], and the best one I think is : [http://www.diku.dk/hjemmesider/ansatte/torbenm/Basics/index.html Basics of Compiler Design], and you can get a basic understanding.&lt;br /&gt;
&lt;br /&gt;
*[http://wiki.eclipse.org/CDT/designs/Overview_of_Parsing CDT/designs/Overview of Parsing].&lt;br /&gt;
&lt;br /&gt;
* [http://en.literateprograms.org/Radix_tree_(C) Radix tree (C) - LiteratePrograms]&lt;br /&gt;
&lt;br /&gt;
* LLVM's online tutorials on how to write a simple compiler [http://llvm.org/docs/tutorial/index.html LLVM Tutorial]&lt;br /&gt;
&lt;br /&gt;
* Roberto Raggi's new parser[https://github.com/robertoraggi/cplusplus cplusplus 5 My experimental C++ front end], note Roberto Raggi is the author of the parser for both Qtcreator and Kdeveloper IDE.&lt;br /&gt;
&lt;br /&gt;
* KDevelop are discussing clang now, see [http://milianw.de/blog/katekdevelop-sprint-2014-let-there-be-clang Kate/KDevelop Sprint 2014: Let There Be Clang | Milian Wolff]&lt;/div&gt;</summary>
		<author><name>Ollydbg</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=Developer_documentation&amp;diff=7757</id>
		<title>Developer documentation</title>
		<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php?title=Developer_documentation&amp;diff=7757"/>
		<updated>2014-07-17T05:14:35Z</updated>

		<summary type="html">&lt;p&gt;Ollydbg: /* Developing C::B with Git */ SVN style patch&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Code::Blocks Documentation]]&lt;br /&gt;
[[Category:Developer Documentation]]&lt;br /&gt;
{{Layout_box2|1=&lt;br /&gt;
'''Official Code repository Subversion'''&amp;lt;br/&amp;gt;&lt;br /&gt;
* Web-interface by ViewVC: http://sourceforge.net/p/codeblocks/code/log/&lt;br /&gt;
* Subversion URL: &amp;lt;nowiki&amp;gt;svn://svn.code.sf.net/p/codeblocks/code/trunk&amp;lt;/nowiki&amp;gt; or &amp;lt;nowiki&amp;gt;http://svn.code.sf.net/p/codeblocks/code/trunk&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Mirror by biplab''' (Read-only; refreshed every 10 minutes.)&lt;br /&gt;
* Subversion URL: &amp;lt;nowiki&amp;gt;svn://cb.biplab.in/codeblocks/trunk&amp;lt;/nowiki&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
* Web-interface: http://cb.biplab.in/websvn/&lt;br /&gt;
* Git URL: git://cb.biplab.in/codeblocks.git&lt;br /&gt;
* Web-interface:http://cb.biplab.in/cgit/&lt;br /&gt;
&lt;br /&gt;
'''Mirror by Jens''' (Read-only; refreshed every 10 minutes.)&lt;br /&gt;
* Web-interface: http://cgit.jenslody.de/&lt;br /&gt;
* the above link contains many mirrors such as wxWidgets trunk, git mirror, and git mirror of codeblocks.github&lt;br /&gt;
&lt;br /&gt;
'''Mirror by Obf''' (Read-only; refreshed manually.)&lt;br /&gt;
* Web-interface: https://github.com/obfuscated/codeblocks_sf&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Articles for Code::Blocks developers.'''&lt;br /&gt;
&lt;br /&gt;
* '''&amp;lt;u&amp;gt;Documentation&amp;lt;/u&amp;gt;'''&lt;br /&gt;
:[https://www.codeblocks.org/manual.shtml User's manual] in various formats and languages.&lt;br /&gt;
:Also see http://developer.berlios.de/projects/codeblocks/ (under the downloads section).&lt;br /&gt;
:Checkout the SDK documentation at http://developer.berlios.de/project/showfiles.php?group_id=5358 as CHM file(s).&lt;br /&gt;
&lt;br /&gt;
* Compile the complete Code::Blocks from sources on '''[[Installing Code::Blocks from source on Windows|Windows]]''' and '''[[Installing Code::Blocks from source on Linux|Linux]]'''&lt;br /&gt;
&lt;br /&gt;
* '''[[Compile Code::Blocks plugins based on a nightly]]''' without the need to compile wxWidgets or the Code::Blocks core.&lt;br /&gt;
&lt;br /&gt;
* '''[http://launchpad.net/products/codeblocks/ Translation]'''&lt;br /&gt;
:Code::Blocks uses Launchpad to coordinate translation efforts.&lt;br /&gt;
&lt;br /&gt;
* '''[[Coding style]]'''&lt;br /&gt;
:The source code formatting style used in the Code::Blocks' source.&lt;br /&gt;
&lt;br /&gt;
* '''[[Creating a custom lexer for Code::Blocks editor]]'''&lt;br /&gt;
:How to add support for new syntax lighting schemes.&lt;br /&gt;
&lt;br /&gt;
* '''[[Creating a patch to submit to BerliOS (Patch Tracker)]]'''&lt;br /&gt;
:Creating a diff file and then submitting it to the patch tracker.&lt;br /&gt;
&lt;br /&gt;
* '''[[Unicode Standards]]'''&lt;br /&gt;
:Information about unicode standards and how unicode is handled in Code::Blocks' source code.&lt;br /&gt;
&lt;br /&gt;
* '''[[Various development tips]]'''&lt;br /&gt;
:List of various development tips for Code::Blocks.&lt;br /&gt;
&lt;br /&gt;
* '''[[Scripting Code::Blocks]]'''&lt;br /&gt;
:Information about scripting Code::Blocks with [http://www.squirrel-lang.org/ Squirrel].&lt;br /&gt;
&lt;br /&gt;
* '''[[A short overview about Code::Blocks architecture]]'''&lt;br /&gt;
:Information about the architecture of Code::Blocks.&lt;br /&gt;
&lt;br /&gt;
* '''[[Code::Blocks SDK events]]'''&lt;br /&gt;
:Information about the Code::Blocks SDK events and how to work with them.&lt;br /&gt;
&lt;br /&gt;
* '''[[File formats description]]'''&lt;br /&gt;
:Description of the format of each file Code::Blocks produces.&lt;br /&gt;
&lt;br /&gt;
* '''[[Version control]]'''&lt;br /&gt;
:Tips and trick for working with our version control system.&lt;br /&gt;
&lt;br /&gt;
== Plug-In development ==&lt;br /&gt;
&lt;br /&gt;
* [[Creating a simple &amp;quot;Hello World&amp;quot; plugin]]&lt;br /&gt;
* [[Creating a Plug-in which modifies CB's Menus]]&lt;br /&gt;
* [[Creating a plugin that actually does something]]&lt;br /&gt;
* [[Linking the plugin to a Nightly Build]]&lt;br /&gt;
* [[Managing Plug-in Resources]]&lt;br /&gt;
&lt;br /&gt;
* [[Research on doing a Plug-in for embedded help in CB]]&lt;br /&gt;
&lt;br /&gt;
* [[wxSmith extensions]]&lt;br /&gt;
* [[Code::Completion Rewrite]] and [[Code Completion plugin]] and [[Code Completion Design]]&lt;br /&gt;
&lt;br /&gt;
== Scripting ==&lt;br /&gt;
&lt;br /&gt;
Using scripting to extend Code::Blocks' functionality&lt;br /&gt;
&lt;br /&gt;
* [[Wizard scripts|Creating a new project wizard]]&lt;br /&gt;
&lt;br /&gt;
== Developing C::B with Git ==&lt;br /&gt;
For devs who want to use Git to develop C::B, here are some steps to follow, especially you need to correctly set the SVN and GIT properties so that you can make your local git commits back to the official SVN repo. See [/index.php/topic,16096.msg128152.html#msg128152 Re: Read-only Git, SVN Repo for Code::Blocks]&lt;br /&gt;
&lt;br /&gt;
If you want to create a SVN style patch from git, see: [/index.php/topic,19391.msg132530.html#msg132530 This forum post].&lt;br /&gt;
&lt;br /&gt;
== Debugging C::B ==&lt;br /&gt;
&lt;br /&gt;
* When C::B crashed, it will generate a call-stack file &amp;quot;codeblocks.RPT&amp;quot;, at the crash point, this is a text file, you can open it, if your C::B contains the debug information, it will have file and line information about each call. If it is a stripped version, but you have the debug version of C::B, you can try to run the [/index.php/topic,13129.msg88254.html#msg88254 Debugging made easier], this is a address2line UI interface works under Windows.&lt;br /&gt;
* You can debug C::B under C::B (with the debugger plugin), also, you can link C::B to the debug version of wxWidgets library, so you can see whether a bug is located in C::B source code or wxWidgets' source code, see here: [/index.php/topic,17316.msg130972.html#msg130972 patch to build C::B against wx debug library]&lt;/div&gt;</summary>
		<author><name>Ollydbg</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=Code_Completion_Design&amp;diff=7755</id>
		<title>Code Completion Design</title>
		<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php?title=Code_Completion_Design&amp;diff=7755"/>
		<updated>2014-06-24T02:59:04Z</updated>

		<summary type="html">&lt;p&gt;Ollydbg: add a new user defined macro replacement rule AAAAA-&amp;gt;@&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Developer Documentation]]&lt;br /&gt;
==How to build==&lt;br /&gt;
===Get the source code===&lt;br /&gt;
When you download the  svn source code of code::blocks,(see here [[Installing_Code::Blocks_from_source_on_Windows#Code::Blocks_sources]] the source code of CodeCompletion plugin was already included. &lt;br /&gt;
&lt;br /&gt;
Here is the screen shot when I opened the codecompletion source code in C::B's source navigator view.&lt;br /&gt;
&lt;br /&gt;
[[Image:Devcc1.png|300x300px| Code completion source tree opened in code::blocks]]&lt;br /&gt;
&lt;br /&gt;
===Build the code completion plug-in===&lt;br /&gt;
If you only want to build the Code Completion plug-in, you can select it in the &amp;quot;build target list&amp;quot; (Note: by default, the Build target option was &amp;quot;ALL&amp;quot;, which means all the targets in the current workspace will be build), see the screen shot below:&lt;br /&gt;
&lt;br /&gt;
[[Image:Buildcc.PNG|frame|none| Code completion build target option in code::blocks]]&lt;br /&gt;
&lt;br /&gt;
Don't forget to run the batch script file &amp;quot;update.bat&amp;quot; after you build the target, this procedure will update your output folder package and strip the debug information. See the wiki page [[Installing_Code::Blocks_from_source_on_Windows]] for more information.&lt;br /&gt;
&lt;br /&gt;
===A brief description of every project files===&lt;br /&gt;
From now on, we use '''CC''' as an abbreviation for '''code completion plug-in'''.&lt;br /&gt;
{|border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; style=&amp;quot;font-size: 100%; border: gray solid 1px; border-collapse: collapse; text-align: left; width: 100% table-layout: unfixed;&amp;quot; &lt;br /&gt;
|-&lt;br /&gt;
| ccdebuginfo.cpp || a dialog for debugging CC, can be opened by double click on the code browser tree entry with shift and ctrl key pressed &lt;br /&gt;
|- &lt;br /&gt;
| ccoptionsdlg.cpp|| code completion options dialog, can be opened by menu-&amp;gt;setting-&amp;gt;editor-&amp;gt;code completion and symbols browser&lt;br /&gt;
|-&lt;br /&gt;
| ccoptionsprjdlg.cpp|| setting the additional parser search path&lt;br /&gt;
|-&lt;br /&gt;
| classbrowser.cpp||viewing the symbols tree ctrl(token tree).&lt;br /&gt;
|-&lt;br /&gt;
| classbrowserbuilderthread.cpp|| a thread to build the class browser tree above&lt;br /&gt;
|-&lt;br /&gt;
| codecompletion.cpp ||The Main file need by code completion plug-in, maintain all the CC's GUI and native parser&lt;br /&gt;
|-&lt;br /&gt;
| insertclassmethoddlg.cpp|| a dialog to insert class method, can be open by context menu in editor&lt;br /&gt;
|-&lt;br /&gt;
| nativeparser.cpp||a class derived from wxEvtHandler, NativeParser class has a member variable &amp;quot;Parser m_Parser&amp;quot;;&lt;br /&gt;
|-&lt;br /&gt;
| selectincludefile.cpp|| select multiply matched token names before any jump to declaration or jump to implementation.&lt;br /&gt;
|-&lt;br /&gt;
|parser/parser.cpp|| Parser class was also derived from wxEvtHandler, can start batch parse... this class has member variables like :cbThreadPool m_Pool(which will create a thread from thread pool for each file need passed);TokenTree* m_pTokens(contains all the Token database);&lt;br /&gt;
|-&lt;br /&gt;
|parser/parserthread.cpp||will do the syntax analysis for every file in a project, it has a Tokenizer as member variable&lt;br /&gt;
|-&lt;br /&gt;
|parser/token.cpp|| definition of the &amp;quot;Token&amp;quot; class, and TokenTree(which means the Token dababase)&lt;br /&gt;
|-&lt;br /&gt;
|parser/tokenizer.cpp|| tokenizer will return every wxString it regard as a symbol by GetToken(), also do a replacement before return&lt;br /&gt;
|-&lt;br /&gt;
|parser/searchtree.cpp|| implement the patricia search tree using by TokenTree&lt;br /&gt;
|-&lt;br /&gt;
|Header files|| no description needed&lt;br /&gt;
|}&lt;br /&gt;
==Structure of CodeCompletion plugin==&lt;br /&gt;
[[Image:CodeCompletionPluginStructure.png| Code completion plugin Structure]]&lt;br /&gt;
&lt;br /&gt;
The above image show the main structure of our CodeCompletion plugins. The main class are:&lt;br /&gt;
* CodeCompletion: this is the class for main plugin), it handle event sent from the C::B core. Toolbar handling was done in this class.&lt;br /&gt;
* NativeParser: as a main member variable of the CodeCompletion class, this class is like the Parser manager class, it create/delete Parser instances when a project load/closed.&lt;br /&gt;
* Parser: this class is mainly for handling Tokens. Parser class hold a TokenTree which record all the Tokens. Parser class also hold a thread pool, it can either run the parsing task in the pool(this means the parsing task will be done in a separate thread), or directly by a function call.&lt;br /&gt;
* Parserthread: The class derived from the worker thread(cbThreadedTask class), it member function DoParse() is the function for parsing.&lt;br /&gt;
&lt;br /&gt;
Besides that, when trying to show the suggestion list(auto completion list, or code completion list), the NativeParser need to analyze the current the current statement structure, and query the symbol(token) information from the Tokentree, this is mostly done in ResolveExpression() member function.&lt;br /&gt;
&lt;br /&gt;
Some important note: when all Parserthread instances finish parsing job in the pool, the thread pool will send an event to its parent(in this case, it is the Parser class), so the Parser know that the parsing is done, or the Parser can assign another parsing jobs to the thread pool.&lt;br /&gt;
&lt;br /&gt;
==Low level parser(Lexical analysis, Tokenize)==&lt;br /&gt;
For someone haven't heard what does &amp;quot;Token&amp;quot; and &amp;quot;Tokenize&amp;quot; mean, you should read the wikibooks article [http://en.wikibooks.org/wiki/C%2B%2B_Programming/Compiler#Compilation A brief explain of what does a parser do] and [http://en.wikipedia.org/wiki/Lexical_analysis Tokenize on wikipedia]. Shortly, a Tokenizer regards your C++ or C source code as a large array of characters (sometimes, we call it a string), then this big string can be divided to small atomic strings----a '''token''' (Each token has a unique meanings and can't be divided into sub-strings. A token can be a symbol, an identifier, a keyword, a digital number, etc), meanwhile &amp;quot;white spaces&amp;quot; and &amp;quot;comments&amp;quot; were ignored by the Tokenizer.&lt;br /&gt;
&lt;br /&gt;
for a simple c++ program like below&lt;br /&gt;
&amp;lt;source lang = &amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
int main()&lt;br /&gt;
{&lt;br /&gt;
    std::cout &amp;lt;&amp;lt; &amp;quot;hello world&amp;quot; &amp;lt;&amp;lt; std::endl;&lt;br /&gt;
    return 0;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
After tokenizing, it should give these 15 tokens&lt;br /&gt;
&amp;lt;source lang = &amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
1 = string &amp;quot;int&amp;quot;&lt;br /&gt;
2 = string &amp;quot;main&amp;quot;&lt;br /&gt;
3 = opening parenthesis&lt;br /&gt;
4 = closing parenthesis&lt;br /&gt;
5 = opening brace&lt;br /&gt;
6 = string &amp;quot;std&amp;quot;&lt;br /&gt;
7 = namespace operator&lt;br /&gt;
8 = string &amp;quot;cout&amp;quot;&lt;br /&gt;
9 = &amp;lt;&amp;lt; operator&lt;br /&gt;
10 = string &amp;quot;&amp;quot;hello world&amp;quot;&amp;quot;&lt;br /&gt;
11 = string &amp;quot;endl&amp;quot;&lt;br /&gt;
12 = semicolon&lt;br /&gt;
13 = string &amp;quot;return&amp;quot;&lt;br /&gt;
14 = number 0&lt;br /&gt;
15 = closing brace&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Tokenizer class===&lt;br /&gt;
A class named '''Tokenizer''' was implemented in &amp;quot;tokenizer.h&amp;quot; and &amp;quot;tokenizer.cpp&amp;quot;. Seen from the Tokenizer's level, a token is just a [http://docs.wxwidgets.org/stable/wx_unicode.html unicode] wxString. There are several steps to run an instance of Tokenizer. &lt;br /&gt;
===preparing the big string===&lt;br /&gt;
From the previous section, you know the Tokenizer is just a string cutter. So, the first step is preparing the big string. The string can either be loaded from a source file or a memory buffer. Currently, the Unicode wxString is used.(since we are all using Unicode build of code::blocks, and ANSI mode is outdated and deprecated).&lt;br /&gt;
===Get or Peek a token===&lt;br /&gt;
'''Tokenizer''' contains a '''file position indicator'''----m_TokenIndex(see [http://en.wikipedia.org/wiki/Fopen File Open In C language]) pointing to the current position of string. So, you can '''Get''' a token or '''Peek''' a token. Here is the function prototype&lt;br /&gt;
&amp;lt;source lang = &amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
    //Get the current token string started from m_TokenIndex, &lt;br /&gt;
    //After that, increase the m_Tokenindex&lt;br /&gt;
    wxString GetToken();&lt;br /&gt;
&lt;br /&gt;
    //Peak the current token string and but do *NOT* increase the m_TokenIndex&lt;br /&gt;
    wxString PeekToken();&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For example, if the Tokenizer parses the example code above, you can see how these two methods work.&lt;br /&gt;
&lt;br /&gt;
*After initializing the Tokenizer(preparing the big string), You firstly call the GetToken() function, which will return the first token &amp;quot;int&amp;quot; and increase the m_TokenIndex one step to &amp;quot;int&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
*Then, if you call the PeekToken(), which will return a token &amp;quot;main&amp;quot;, but the tokenindex was still remaining point to &amp;quot;int&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
*If you call the GetToken() again, it will return a &amp;quot;main&amp;quot; immediately and increase the file pointer to &amp;quot;main&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
Note: Internally, the Tokenizer class use a '''undo and peek cache''' to do the trick. Once a token is peeked, it is saved in '''m_Peek''' member, so, next time you call GetToken(), it just immediately return the cached value without calling the &amp;quot;DoGetToken()&amp;quot; procedure again. &lt;br /&gt;
&lt;br /&gt;
[[Image:Cb token cache.png]]&lt;br /&gt;
&lt;br /&gt;
===Nested Value of braces===&lt;br /&gt;
As you know, braces are exist in pairs, such as &amp;quot;{&amp;quot; and &amp;quot;}&amp;quot;, or &amp;quot;[&amp;quot; and &amp;quot;]&amp;quot;, Also, these braces can be embeded. So the Tokenizer keep a value '''m_NestLevel''' to indicate how deep you stays. If the Tokenizer meets a '''{''', it will increase the nestValue, and if it meets a '''}''', it will decrease the m_NestLevel. See the pseudo code in Tokenizer.cpp below:&lt;br /&gt;
&amp;lt;source lang = &amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
        if (CurrentChar() == '{')&lt;br /&gt;
            ++m_NestLevel;&lt;br /&gt;
        else if (CurrentChar() == '}')&lt;br /&gt;
            --m_NestLevel;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SkipUnwanted tokens===&lt;br /&gt;
A '''bool''' member variable '''m_SkipUnwantedTokens''' determines whether a regular assignments statement will be omitted or not. For example, a piece of code below:&lt;br /&gt;
&amp;lt;source lang = &amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
a = b + c;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If m_SkipUnwantedTokens == true, then once SkipUnwanted() meets the &amp;quot;=&amp;quot; symbol, it will go on skipping every characters until it meets ''',''' or ''';''' or '''}''', so this statement will be omitted by the Tokenizer. &lt;br /&gt;
&lt;br /&gt;
Sometimes, this behavior becomes a nightmare when parsing the statement like default argument in template. Or the default arguments in function.&lt;br /&gt;
&amp;lt;source lang = &amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
// assignment statement in template arguments&lt;br /&gt;
template&amp;lt;class T = int&amp;gt; &lt;br /&gt;
class abc {&lt;br /&gt;
 T m_a;&lt;br /&gt;
 ......&lt;br /&gt;
 ......&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// assignment statement in function arguments&lt;br /&gt;
&lt;br /&gt;
void foo( int arg1 = 60 )&lt;br /&gt;
{&lt;br /&gt;
    bla bla;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
If the Tokenizer finds that an equation sign '''=''', it will skip any character until it meets a '''}''', so, the class declaration or function body will be totally skipped in the unexpected way. In this case, we should manually '''disable''' this functionality by setting m_SkipUnwantedTokens = false to let the Tokenizer parse these statements correctly.&lt;br /&gt;
&lt;br /&gt;
That's why you will see many situations when you enter a function, you should save the m_SkipUnwantedTokens statues and disabled it, when you leave a function, you should manually restore it.(See function implementation in ParseThread.cpp)&lt;br /&gt;
&lt;br /&gt;
===Return a correct token, Macro replacement===&lt;br /&gt;
Special token should be replaced for parsing correctly. For example, in the standard c++ header (mingw), there are a string named &amp;quot;_GLIBCXX_STD&amp;quot;, this should be replaced to &amp;quot;std&amp;quot;. See the dialog below.&lt;br /&gt;
&lt;br /&gt;
[[Image:Cc std replacement.png|400x400px|]]&lt;br /&gt;
&lt;br /&gt;
The inline function in the Tokenizer class will check whether a token should be replaced before return. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang = &amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
wxString Tokenizer::MacroReplace(const wxString str)&lt;br /&gt;
{&lt;br /&gt;
    wxStringHashMap::const_iterator it = s_Replacements.find(str);&lt;br /&gt;
&lt;br /&gt;
    if (it != s_Replacements.end())&lt;br /&gt;
    {&lt;br /&gt;
        // match one!&lt;br /&gt;
        wxString key   = it-&amp;gt;first;&lt;br /&gt;
        wxString value = it-&amp;gt;second;&lt;br /&gt;
        TRACE(_T(&amp;quot;MacroReplace() : Replacing '%s' with '%s' (file='%s').&amp;quot;), key.wx_str(), value.wx_str(), m_Filename.wx_str());&lt;br /&gt;
        if (value[0]=='+' &amp;amp;&amp;amp; CurrentChar()=='(')&lt;br /&gt;
        {&lt;br /&gt;
            unsigned int start = m_TokenIndex;&lt;br /&gt;
            m_Buffer[start] = ' ';&lt;br /&gt;
            bool fillSpace = false;&lt;br /&gt;
            while (m_Buffer[start]!=')')&lt;br /&gt;
            {&lt;br /&gt;
                if (m_Buffer[start]==',')&lt;br /&gt;
                    fillSpace = true;&lt;br /&gt;
&lt;br /&gt;
                if (fillSpace==true)&lt;br /&gt;
                    m_Buffer[start]=' ';&lt;br /&gt;
&lt;br /&gt;
                start++;&lt;br /&gt;
            }&lt;br /&gt;
            m_Buffer[start] = '{';&lt;br /&gt;
            return value.Remove(0,1);&lt;br /&gt;
        }&lt;br /&gt;
        else if (value[0] == '-')&lt;br /&gt;
        {&lt;br /&gt;
            unsigned int lenKey = key.Len();&lt;br /&gt;
            value = value.Remove(0,1);&lt;br /&gt;
            unsigned int lenValue = value.Len();&lt;br /&gt;
&lt;br /&gt;
            for (unsigned int i=1; i&amp;lt;=lenKey; i++)&lt;br /&gt;
            {&lt;br /&gt;
                if (i &amp;lt; lenValue)&lt;br /&gt;
                    m_Buffer[m_TokenIndex-i] = value[lenValue-i];&lt;br /&gt;
                else&lt;br /&gt;
                    m_Buffer[m_TokenIndex-i] = ' ';&lt;br /&gt;
            }&lt;br /&gt;
&lt;br /&gt;
            int firstSpace = value.First(' ');&lt;br /&gt;
            // adjust m_TokenIndex&lt;br /&gt;
            m_TokenIndex = m_TokenIndex - lenValue + firstSpace;&lt;br /&gt;
&lt;br /&gt;
            return value.Mid(0,firstSpace);&lt;br /&gt;
        }&lt;br /&gt;
        else&lt;br /&gt;
            return value;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    return str;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:Cc replace dialog.png|400x400px|none| Code completion build target option in code::blocks]]&lt;br /&gt;
&lt;br /&gt;
Setting the replacement mapping. Note that before return a token, a replacement map was searched to check if it matches any entry in the map, so, the bigger this map goes, the slower it will do parsing.&lt;br /&gt;
&lt;br /&gt;
Note: Code Completion plug-in is not a preprocessor, so it is difficult to deal with the source mixed with many macro, or some strange macros. This is something like Ctags' replacement options &amp;quot;?I identifier?list&amp;quot; in [http://ctags.sourceforge.net/ctags.html#OPERATIONAL%20DETAILS ctags option detial] or [http://codelite.org/LiteEditor/FAQ Code Completion macro FAQ]&lt;br /&gt;
&lt;br /&gt;
For discussion of Ctags, the related thread is [/index.php/topic,10564.msg72424.html#msg72424 Re: namespaces and code completion] and [/index.php/topic,11187.msg77135.html#msg77135 Re: New code completion remarks/issues]&lt;br /&gt;
&lt;br /&gt;
===replacement rules===&lt;br /&gt;
====directly replacement AAAAA -&amp;gt; BBBBB====&lt;br /&gt;
You can define a rule:&lt;br /&gt;
AAAAA -&amp;gt; BBBBB&lt;br /&gt;
&lt;br /&gt;
Which means, if the tokenizer meet a string &amp;quot;AAAAA&amp;quot;, then it will returned a string &amp;quot;BBBBB&amp;quot;&lt;br /&gt;
==== AAAAA -&amp;gt; +BBBBB====&lt;br /&gt;
For example, when &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang = &amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
_GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D)&lt;br /&gt;
&lt;br /&gt;
  /// See bits/stl_deque.h's _Deque_base for an explanation.&lt;br /&gt;
  template&amp;lt;typename _Tp, typename _Alloc&amp;gt;&lt;br /&gt;
    struct _Vector_base&lt;br /&gt;
    {&lt;br /&gt;
      typedef typename _Alloc::template rebind&amp;lt;_Tp&amp;gt;::other _Tp_alloc_type;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    ......&lt;br /&gt;
&lt;br /&gt;
_GLIBCXX_END_NESTED_NAMESPACE&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We should replace the string &amp;quot;_GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D)&amp;quot; &lt;br /&gt;
to &amp;quot;namespace std {&amp;quot;, here, we introduce two replacement rules:&lt;br /&gt;
{|border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; style=&amp;quot;font-size: 100%; border: gray solid 1px; border-collapse: collapse; text-align: left; width: 100% table-layout: unfixed;&amp;quot; &lt;br /&gt;
|-&lt;br /&gt;
| _GLIBCXX_BEGIN_NESTED_NAMESPACE || +namespace&lt;br /&gt;
|-&lt;br /&gt;
| _GLIBCXX_END_NESTED_NAMESPACE  || }&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
In this rule, we firstly replace the &amp;quot;_GLIBCXX_BEGIN_NESTED_NAMESPACE&amp;quot; with the &amp;quot;namespace&amp;quot;, then, we reserve the &amp;quot;std&amp;quot;, and change the closing parenthesis to an opening brace. (See the image above), also, every token string &amp;quot;_GLIBCXX_END_NESTED_NAMESPACE&amp;quot; will be replaced by &amp;quot;}&amp;quot;. &lt;br /&gt;
[[File:CCreplacement_rule.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
So, the code becomes to like below:&lt;br /&gt;
&amp;lt;source lang = &amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
namespace     std   {&lt;br /&gt;
&lt;br /&gt;
  /// See bits/stl_deque.h's _Deque_base for an explanation.&lt;br /&gt;
  template&amp;lt;typename _Tp, typename _Alloc&amp;gt;&lt;br /&gt;
    struct _Vector_base&lt;br /&gt;
    {&lt;br /&gt;
      typedef typename _Alloc::template rebind&amp;lt;_Tp&amp;gt;::other _Tp_alloc_type;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    ......&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
==== AAAAA -&amp;gt; -BBBBB====&lt;br /&gt;
&lt;br /&gt;
For example, when &lt;br /&gt;
&amp;lt;source lang = &amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
_GLIBCXX_BEGIN_NAMESPACE_TR1&lt;br /&gt;
...&lt;br /&gt;
...&lt;br /&gt;
_GLIBCXX_END_NAMESPACE_TR1&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We should replace the string &amp;quot;_GLIBCXX_BEGIN_NAMESPACE_TR1&amp;quot; &lt;br /&gt;
to &amp;quot;namespace tr1 {&amp;quot;, here, we introduce two replacement rules:&lt;br /&gt;
{|border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; style=&amp;quot;font-size: 100%; border: gray solid 1px; border-collapse: collapse; text-align: left; width: 100% table-layout: unfixed;&amp;quot; &lt;br /&gt;
|-&lt;br /&gt;
| _GLIBCXX_BEGIN_NAMESPACE_TR1 || -namespace tr1 {&lt;br /&gt;
|-&lt;br /&gt;
| _GLIBCXX_END_NAMESPACE_TR1  || }&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
In this rule, we firstly replace the &amp;quot;_GLIBCXX_BEGIN_NAMESPACE_TR1&amp;quot; with the &amp;quot;namespace&amp;quot;, then, add aditional string &amp;quot;tr1 {&amp;quot;&lt;br /&gt;
&lt;br /&gt;
So, the code becomes:&lt;br /&gt;
&amp;lt;source lang = &amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
namespace tr1 {&lt;br /&gt;
...&lt;br /&gt;
...&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== AAAAA -&amp;gt; *====&lt;br /&gt;
In this case, we call it a &amp;quot;strip the next &amp;quot;(&amp;quot; and &amp;quot;)&amp;quot; rule. for example:&lt;br /&gt;
&lt;br /&gt;
The rule syntax is:&lt;br /&gt;
&lt;br /&gt;
XXXXXX  -&amp;gt; *&lt;br /&gt;
&lt;br /&gt;
For example, In the source code below:&lt;br /&gt;
&amp;lt;source lang = &amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
CVAPI(void) cvFxxxx();&lt;br /&gt;
CVAPI(cvMat *) cvFyyy();&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
will become to (if I add a replacement rule  CVAPI -&amp;gt; *)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang = &amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
void cvFxxxx();&lt;br /&gt;
cvMat * cvFyyy();&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== AAAAA -&amp;gt; @====&lt;br /&gt;
With this rule, you can trigger the tokenizer to work in macro replacement mode, so if you have the code&lt;br /&gt;
&amp;lt;source lang = &amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
#define	_EXFUN(name, proto)		name proto&lt;br /&gt;
&lt;br /&gt;
FILE *	_EXFUN(fopen, (const char *__restrict _name, const char *__restrict _type));&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
You can add a rule _EXFUN -&amp;gt; @, so that the tokenizer will go to macro replacement mode if he see a _EXFUN. See details in [/index.php/topic,19278.msg131810.html#msg131810 Is it possible for the parser to support newlib prototypes?]&lt;br /&gt;
&lt;br /&gt;
==High level parser(Syntax Analysis)==&lt;br /&gt;
This is the main flow of a parser.&lt;br /&gt;
&lt;br /&gt;
[[Image:Parser_Flow.gif]]&lt;br /&gt;
===parser thread===&lt;br /&gt;
Basically, we can say, the low level parser(Tokenizer) moves its pointer character by character, and return a wxString(token) to feed the high level parser(Syntax analyzer).All the syntax analysis was done in ParserThread. A thread must be created to parse a source file. see parserthread.cpp and parserthread.h, a thread will be allocated from thread pool. For example, a file contains these statement:&lt;br /&gt;
&amp;lt;source lang = &amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
    void  f1();&lt;br /&gt;
    int   f2(char c);&lt;br /&gt;
    float f3(void * p);&lt;br /&gt;
    int   f1;&lt;br /&gt;
    double f2;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
After the ParserThread finished its parsing, it will recognize five tokens, which has the keyword &amp;quot;f1&amp;quot;,&amp;quot;f2&amp;quot; and &amp;quot;f3&amp;quot;, note, tokens can have the same names, but they differ from different types( variables, functions...).&lt;br /&gt;
&lt;br /&gt;
===Token class===&lt;br /&gt;
How can a large number of tokens be recorded? A '''Token'''(note: it as a capital means it's class type) class was introduced to recorded every token. For boosting the speed of allocating Tokens, the &amp;quot;new&amp;quot; and &amp;quot;delete&amp;quot; operator were overloaded in its base class BlockAllocated. See the [http://en.wikipedia.org/wiki/Memory_pool memory pool] page on wikipedia as a reference.&lt;br /&gt;
&amp;lt;source lang = &amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
class Token  : public BlockAllocated&amp;lt;Token, 10000&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
        ......&lt;br /&gt;
        wxString m_Type; // this is the return value (if any): e.g. const wxString&amp;amp;&lt;br /&gt;
        wxString m_ActualType; // this is what the parser believes is the actual return value: e.g. wxString&lt;br /&gt;
        wxString m_Name;&lt;br /&gt;
        wxString m_Args;&lt;br /&gt;
        wxString m_AncestorsString; // all ancestors comma-separated list&lt;br /&gt;
        unsigned int m_File;&lt;br /&gt;
        unsigned int m_Line;&lt;br /&gt;
        unsigned int m_ImplFile;&lt;br /&gt;
        unsigned int m_ImplLine; // where the token was met&lt;br /&gt;
        unsigned int m_ImplLineStart; // if token is impl, opening brace line&lt;br /&gt;
        unsigned int m_ImplLineEnd; // if token is impl, closing brace line&lt;br /&gt;
        TokenScope m_Scope;&lt;br /&gt;
        TokenKind m_TokenKind;&lt;br /&gt;
        bool m_IsOperator;&lt;br /&gt;
        bool m_IsLocal; // found in a local file?&lt;br /&gt;
        bool m_IsTemp; // if true, the tree deletes it in FreeTemporaries()&lt;br /&gt;
        bool m_IsConst;    // the member method is const (yes/no)&lt;br /&gt;
&lt;br /&gt;
        int m_ParentIndex;&lt;br /&gt;
        TokenIdxSet m_Children;&lt;br /&gt;
        TokenIdxSet m_Ancestors;&lt;br /&gt;
        TokenIdxSet m_DirectAncestors;&lt;br /&gt;
        TokenIdxSet m_Descendants;&lt;br /&gt;
        ......&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
You can see the Token class contains all the information needed for recording its locating, its type or class derived hierarchy... &lt;br /&gt;
&lt;br /&gt;
For example, in the source code in[Low level parser(Lexical analysis)]. A Token for &amp;quot;main&amp;quot; should contains it's name (obviously , m_Name=&amp;quot;main&amp;quot; ), then m_File will record which file dose this Token exist. m_Line will give the line number of &amp;quot;main&amp;quot; in this source file, and so on.&lt;br /&gt;
&lt;br /&gt;
===Memory Pool--BlockAllocated class===&lt;br /&gt;
In BlockAllocated class, there is only a static member say &amp;quot;static BlockAllocator&amp;lt;T, pool_size, debug&amp;gt; allocator;&amp;quot; to keep all the pre-allocated memory for all derived class.&lt;br /&gt;
&lt;br /&gt;
'''10000''' means a pool of 10000 Tokens were allocated in the memory pool, so, dynamically allocate a Token object will be fast and efficient. &lt;br /&gt;
&lt;br /&gt;
[[Image:Cb blockalloc.png|frame|none|  Operator new overloading for fast allocate in the heap]]&lt;br /&gt;
&lt;br /&gt;
===ParserThread===&lt;br /&gt;
The function Parse() will do the most job of syntax analysis. See the pseudo code below.&lt;br /&gt;
&amp;lt;source lang = &amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
ParserThread::Parse()&lt;br /&gt;
{&lt;br /&gt;
   ......&lt;br /&gt;
   do&lt;br /&gt;
    {&lt;br /&gt;
        ......&lt;br /&gt;
        DoParse();&lt;br /&gt;
        ......&lt;br /&gt;
 &lt;br /&gt;
        &lt;br /&gt;
    }while(false);&lt;br /&gt;
&lt;br /&gt;
    return result;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the DoParse(), it checks the token from Tokenizer. For example, if the token words = &amp;quot;enum&amp;quot;, then, the ParserThread::HandleEnum() will do the job to parse this enum block.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===A simple look ahead parser===&lt;br /&gt;
We can explain a little about it parser, the member variable '''m_Str''' of class ParserThread will be considered as a '''type stack''', for example, we want to parse the statement below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang = &amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
symbolA symbolB symbolC symbolD;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Only symbolD can be recognized as a variable, and it has a type of &amp;quot;symbolA symbolB symbolC&amp;quot;. When the parser meets each symbol, it will look ahead to see the next token is whether &amp;quot;;&amp;quot;, if not, the current token will '''pushed''' to m_Str. These iteration will be ended when the parser look ahead one step from symbolD and find the next token is a &amp;quot;;&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
===DoParse Examples===&lt;br /&gt;
====Handling class declaration====&lt;br /&gt;
The main routing of handling class was in &lt;br /&gt;
ParserThread::HandleClass function&lt;br /&gt;
If the parserThread meet these statement&lt;br /&gt;
&amp;lt;source lang = &amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
class AAA{&lt;br /&gt;
    int m_a;&lt;br /&gt;
    int m_b;&lt;br /&gt;
} ;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
It will surely add a Token of &amp;quot;AAA&amp;quot;, it's type is &amp;quot;class&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
What about these statements&lt;br /&gt;
&amp;lt;source lang = &amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
class AAA{&lt;br /&gt;
    int m_a;&lt;br /&gt;
    int m_b;&lt;br /&gt;
} x,y,z;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
The parserThread should firstly add a Token &amp;quot;AAA&amp;quot;, then it should regard &amp;quot;x&amp;quot;, &amp;quot;y&amp;quot;, &amp;quot;z&amp;quot; are three variables of type &amp;quot;AAA&amp;quot;. This was done by &amp;quot;ReadVarNames()&amp;quot; function, it will read every comma separated variables after a class declaration.&lt;br /&gt;
&lt;br /&gt;
====Handling typedef statement====&lt;br /&gt;
Sometimes, you can see these code blocks:&lt;br /&gt;
&amp;lt;source lang = &amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
typedef class AAA{&lt;br /&gt;
    int m_a;&lt;br /&gt;
    int m_b;&lt;br /&gt;
} BBB,CCC;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
If the parser meets the keyword &amp;quot;typedef&amp;quot;, firstly it set the &amp;quot;m_ParsingTypedef = ture&amp;quot; to indicate that we are parsing a typedef statement.&lt;br /&gt;
&lt;br /&gt;
Next, it meets a keyword &amp;quot;class&amp;quot;, which also indicate it is a class declaration. So, the HandleClass function will do the task. A Token of &amp;quot;class AAA&amp;quot; will be added to the TokenTree. Wait a minute, how can we deal with &amp;quot;BBB&amp;quot; and &amp;quot;CCC&amp;quot;, this is not the same case as previous code, we can't regard &amp;quot;BBB&amp;quot;,&amp;quot;CCC&amp;quot; as variables. In this case, another function &amp;quot;ReadClsName()&amp;quot; will be called. For simplicity of TokenTree, we just regard &amp;quot;BBB&amp;quot; and &amp;quot;CCC&amp;quot; as derived class of &amp;quot;AAA&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
How does the parserThread know between these two cases. Here is the code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang = &amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
                if (m_ParsingTypedef)&lt;br /&gt;
                {&lt;br /&gt;
                    m_Str.Clear();&lt;br /&gt;
                    ReadClsNames(newToken-&amp;gt;m_Name);&lt;br /&gt;
                    // m_ParsingTypedef = false;&lt;br /&gt;
                    break;&lt;br /&gt;
&lt;br /&gt;
                }&lt;br /&gt;
                else&lt;br /&gt;
                {&lt;br /&gt;
                    m_Str = newToken-&amp;gt;m_Name;&lt;br /&gt;
                    ReadVarNames();&lt;br /&gt;
                    m_Str.Clear();&lt;br /&gt;
                    break;&lt;br /&gt;
                }&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
That's the whole thing I would like to write about handling class and handling typedef.&lt;br /&gt;
&lt;br /&gt;
==TokenTree&amp;amp;SearchTree==&lt;br /&gt;
Maybe, you would ask a question: where do these Tokens store? The answer is that all the Tokens will be recorded in &amp;quot;TokenTree class&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
When a certain Token is identified(whether it's a global variable, a class declaration, a class member function, and so on), it will be inserted to a database(TokenTree). &lt;br /&gt;
&lt;br /&gt;
Furthermore, for fast Token query, Tokens should be sorted by it's wxString m_Name member; &lt;br /&gt;
&lt;br /&gt;
A '''compact Patricia tree'''(see the wikipedia [http://en.wikipedia.org/wiki/Radix_tree Patricia tree on wikipedia]) is built to hold all their names. &lt;br /&gt;
&lt;br /&gt;
For example, If you add three item to the TokenTree.&lt;br /&gt;
&amp;lt;source lang = &amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
    mytree-&amp;gt;AddItem(_T(&amp;quot;physics&amp;quot;),_T(&amp;quot;1 - uno&amp;quot;));&lt;br /&gt;
    mytree-&amp;gt;AddItem(_T(&amp;quot;physiology&amp;quot;),_T(&amp;quot;2 - dos&amp;quot;));&lt;br /&gt;
    mytree-&amp;gt;AddItem(_T(&amp;quot;psychic&amp;quot;),_T(&amp;quot;3 - tres&amp;quot;));&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The Patricia tree structure will show as below, the edge of a tree contains a &amp;quot;label string&amp;quot; and the number in parentheses refers to a node Id.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang = &amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
- &amp;quot;&amp;quot; (0)&lt;br /&gt;
      \- &amp;quot;p&amp;quot; (4)&lt;br /&gt;
              +- &amp;quot;hysi&amp;quot; (2)&lt;br /&gt;
              |          +- &amp;quot;cs&amp;quot; (1)&lt;br /&gt;
              |          \- &amp;quot;ology&amp;quot; (3)&lt;br /&gt;
              \- &amp;quot;sychic&amp;quot; (5)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
===Animation of Patricia tree===&lt;br /&gt;
A web page gives an animation of building a Patricia tree, you can see how the tree node added. See here [http://bootstrapping.wordpress.com/2008/01/24/prefix-searching-with-radix-tree/ Prefix searching with Radix Tree]&lt;br /&gt;
&lt;br /&gt;
A better animation demo of Patricia tree can be found in [http://people.cis.ksu.edu/%7Erhowell/viewer/viewer.html Search Tree Viewer]. In this page, you can select the tree type, and enter some strings, then the tree will dynamically show in the window.&lt;br /&gt;
&lt;br /&gt;
===SearchTree Node===&lt;br /&gt;
A Node should contains at least several essential element. They are:&lt;br /&gt;
# An edge: in the image below, the gray filled area shows a Node, since each edge belong to the next node, for example, the Node has an edge &amp;quot;abcd&amp;quot;.&lt;br /&gt;
# SearchTreeItemMap: because our searchTree is a compact Patricia tree which means an edge contains many items. Such as, &amp;quot;ab&amp;quot; , &amp;quot;abc&amp;quot;, &amp;quot;abcd&amp;quot; all the suffix string belong to the edge &amp;quot;abcd&amp;quot; &lt;br /&gt;
# SearchTreeLinkMap: This is an associated container map&amp;lt;wxChar,NodeId&amp;gt;, which store all &amp;quot;pointers&amp;quot; to its child Node. In the example below, &amp;quot;e&amp;quot; points to a Node of &amp;quot;efg&amp;quot;, while &amp;quot;x&amp;quot; points to &amp;quot;xyz&amp;quot;.&lt;br /&gt;
# Node depth: depth of Search Tree Node is defined by the string length from the &amp;quot;root node&amp;quot;. See a depth of each node on the search tree above. For example, the Node of &amp;quot;hysi&amp;quot; has a m_Depth = 5 (&amp;quot;&amp;quot; + &amp;quot;p&amp;quot; + &amp;quot;hysi&amp;quot; = 5).&lt;br /&gt;
&lt;br /&gt;
===Node Lable===&lt;br /&gt;
For example, the node &amp;quot;hysi&amp;quot; (2) has two children, they are &amp;quot;cs&amp;quot; (1) and &amp;quot;ology&amp;quot; (3), show below.&lt;br /&gt;
&lt;br /&gt;
[[Image:Cb tree node lable.png]]&lt;br /&gt;
&lt;br /&gt;
For more information, see the forum discussion here. [/index.php/topic,1696.0.html rickg22's SearchTree development] as a reference.&lt;br /&gt;
&lt;br /&gt;
===How a new item is added to the tree===&lt;br /&gt;
When you add a new key (string) to the tree, some node should be splited, and new node need to be added. For example [/index.php/topic,1696.msg12617.html#msg12617 this post]show some details.&lt;br /&gt;
&lt;br /&gt;
Suppose we have two nodes in the tree, the node id is 0 (root node) and 1, the tree hold only one key string(item) &amp;quot;physics&amp;quot;:&lt;br /&gt;
&amp;lt;source lang = &amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
Adding word: physics&lt;br /&gt;
1 items in the tree&lt;br /&gt;
- &amp;quot;&amp;quot; (0)&lt;br /&gt;
      \- &amp;quot;physics&amp;quot; (1)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Now, if another key string &amp;quot;physiology&amp;quot; is added to the tree, we now firstly check &amp;quot;physiology&amp;quot; is already in the tree, if not, we need to find the common string &amp;quot;physi&amp;quot;, so the node 1 should be splited after the common string, so you get the following result.&lt;br /&gt;
&amp;lt;source lang = &amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
Adding word: physiology&lt;br /&gt;
2 items in the tree&lt;br /&gt;
- &amp;quot;&amp;quot; (0)&lt;br /&gt;
      \- &amp;quot;physi&amp;quot; (2)&lt;br /&gt;
                  +- &amp;quot;cs&amp;quot; (1)&lt;br /&gt;
                  \- &amp;quot;ology&amp;quot; (3)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Here, the middle node &amp;quot;physi&amp;quot; is added. the original node 1's lable is shorten to &amp;quot;cs&amp;quot;, and a new node &amp;quot;ology&amp;quot; is added as a new child node to the middle node.&lt;br /&gt;
&lt;br /&gt;
In the other case, the new added item does not cause a new node to be added to the tree, only a node need to be extended by its ledge. For example:&lt;br /&gt;
&amp;lt;source lang = &amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
6 items in the tree&lt;br /&gt;
- &amp;quot;&amp;quot; (0)&lt;br /&gt;
      \- &amp;quot;p&amp;quot; (4)&lt;br /&gt;
              +- &amp;quot;aranormal&amp;quot; (8)&lt;br /&gt;
              +- &amp;quot;hysi&amp;quot; (2)&lt;br /&gt;
              |          +- &amp;quot;cs&amp;quot; (1)&lt;br /&gt;
              |          \- &amp;quot;ology&amp;quot; (3)&lt;br /&gt;
              \- &amp;quot;sych&amp;quot; (6)&lt;br /&gt;
                         +- &amp;quot;i&amp;quot; (9)&lt;br /&gt;
                         |       +- &amp;quot;atrist&amp;quot; (10)&lt;br /&gt;
                         |       \- &amp;quot;cs&amp;quot; (5)&lt;br /&gt;
                         \- &amp;quot;otic&amp;quot; (7)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Now, you add a new item &amp;quot;psychiatrists&amp;quot;, pay attention to the node 10 in the above tree, we have already an item &amp;quot;psychiatrist&amp;quot;, when the new item &amp;quot;psychiatrists&amp;quot; is added, we can just extend the node 10's edge from &amp;quot;artrist&amp;quot; to &amp;quot;artrists&amp;quot;, thus no new node is needed.&lt;br /&gt;
&amp;lt;source lang = &amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
7 items in the tree&lt;br /&gt;
- &amp;quot;&amp;quot; (0)&lt;br /&gt;
      \- &amp;quot;p&amp;quot; (4)&lt;br /&gt;
              +- &amp;quot;aranormal&amp;quot; (8)&lt;br /&gt;
              +- &amp;quot;hysi&amp;quot; (2)&lt;br /&gt;
              |          +- &amp;quot;cs&amp;quot; (1)&lt;br /&gt;
              |          \- &amp;quot;ology&amp;quot; (3)&lt;br /&gt;
              \- &amp;quot;sych&amp;quot; (6)&lt;br /&gt;
                         +- &amp;quot;i&amp;quot; (9)&lt;br /&gt;
                         |       +- &amp;quot;atrists&amp;quot; (10)&lt;br /&gt;
                         |       \- &amp;quot;cs&amp;quot; (5)&lt;br /&gt;
                         \- &amp;quot;otic&amp;quot; (7)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Note that now, the node 20 now contains two items. It is a map (depth -&amp;gt; item).&lt;br /&gt;
&amp;lt;source lang = &amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
depth -&amp;gt; item&lt;br /&gt;
12    -&amp;gt; &amp;quot;psychiatrist&amp;quot;&lt;br /&gt;
13    -&amp;gt; &amp;quot;psychiatrists&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===How to query a Token by a keyword===&lt;br /&gt;
The parser collect all the Token information, and stored them in the TokenTree, the GUI function can query keywords from the database to show function tips or to build a Class Browser tree.&lt;br /&gt;
&lt;br /&gt;
For example, if you want to find all the Tokens named &amp;quot;ab&amp;quot;. In the picture above from TokenDatabase(TokenTree). we can search on the Patricia tree containing all the Tokens names, finaly, we find a tree node with a edge &amp;quot;abcd&amp;quot;. So, &amp;quot;ab&amp;quot; is in it's Node's items list. Then, we can find a TokenIdxSet in a vector&amp;lt;TokenIdxSet&amp;gt;, this TokenIdxSet has all the index named by &amp;quot;ab&amp;quot;, so, we can get the result like: There are many Tokens named &amp;quot;ab&amp;quot;.Token &amp;quot;ab&amp;quot; may be a member varialbe name in a class, or a global function name...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang = &amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
ClassA::ab&lt;br /&gt;
ClassB::ab&lt;br /&gt;
void ab()&lt;br /&gt;
....&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:CCTokenTree1.png]]&lt;br /&gt;
&lt;br /&gt;
==Flexible Parser structure==&lt;br /&gt;
The Parser class( in Parser.cpp and Parser.h ) has re-factored to support every project associate with a Parser object (svn revision &amp;gt; 6268 ). Which means: One Parser object per project, so, every project (xxx.cbp) will hold its own Token macro defines and Token trees. &lt;br /&gt;
&lt;br /&gt;
Due to the new introduced conditional preprocessor handling mechanism, the same source file may give different Tokens due to the different macro defines in different project. Also, CC support parsing on the files which does not belong to any project. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
#You open a project in CB, then all the files belong to the project( related to the project) will be parsed in CC.&lt;br /&gt;
#Now, you open another file( we call it a &amp;quot;separate file&amp;quot; later) which is not belong to the current project nor any other opened project.&lt;br /&gt;
#Then the CC will create a &amp;quot;temporary parser&amp;quot; named &amp;quot;NONE“ parser, and add this separate file to the &amp;quot;NONE&amp;quot; parser.&lt;br /&gt;
#So, you can still see the class tree when viewing the separate file.&lt;br /&gt;
#Once you close this separate file,  the &amp;quot;NONE&amp;quot; parser will automatically be removed.&lt;br /&gt;
&lt;br /&gt;
The main idea is: Now, We can let the CC do parse on some separate files&lt;br /&gt;
and support class browsing in Symbol browser.&lt;br /&gt;
&lt;br /&gt;
==Automatic Code Completion==&lt;br /&gt;
===Find the search scope===&lt;br /&gt;
&lt;br /&gt;
[[Image:CC SearchScope.png]]&lt;br /&gt;
&lt;br /&gt;
For example, when you are editing, and the caret position was located at &amp;quot;E&amp;quot; as shown in the above image, the first thing doing an automatic code completion is find the '''search scope'''.&lt;br /&gt;
&lt;br /&gt;
Here are some steps to get the initial(first) search scope:&lt;br /&gt;
&lt;br /&gt;
*First, you need to correct all the &amp;quot;using namespace XXXX&amp;quot; directives at the beginning the the current source file.(labeled with &amp;quot;A&amp;quot;), this means all the child tokens of &amp;quot;namespace Scintilla&amp;quot; should be searched.&lt;br /&gt;
*Secondly, find the function body where the current caret position locates. eg, the above code, the caret is in the &amp;quot;RunStyles::RunFromPosition()&amp;quot; function, so the function parameter variable &amp;quot;position&amp;quot;(labeled with &amp;quot;C&amp;quot; and the local variable &amp;quot;run&amp;quot; (labeled as &amp;quot;D&amp;quot;) is also a matching Tokens.&lt;br /&gt;
*Thirdly, look at the &amp;quot;B&amp;quot;, this means we are in the class named &amp;quot;RunStyles&amp;quot;, so, &amp;quot;RunStyles&amp;quot; is also a search scope.&lt;br /&gt;
*Finally, don't forget the global namespace scope, because the tokens of this scope are exposed to everywhere of the source.&lt;br /&gt;
&lt;br /&gt;
===Break up the current statement===&lt;br /&gt;
&amp;lt;source lang = &amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
 VariableA.m_VariableB.Functi&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
If you are entering the above statement, the caret is behind the &amp;quot;Functi&amp;quot;. Then the whole line will be break up to several &amp;quot;parsing component&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
There are three components: &amp;quot;'''VariableA'''&amp;quot; , &amp;quot;'''m_VariableB'''&amp;quot; and &amp;quot;'''Functi'''&amp;quot;. In the next section, I will introduce that the AI matching routing will start from matching the first component with the initial(first) search scope.&lt;br /&gt;
&lt;br /&gt;
===Do an AI match===&lt;br /&gt;
Doing an AI match is just like a walking on a tree, and find the final matching result.See the image below:&lt;br /&gt;
&lt;br /&gt;
[[image:CC AI Match.png]]&lt;br /&gt;
&lt;br /&gt;
'''Here is the matching algorithm''':&lt;br /&gt;
&lt;br /&gt;
Now, suppose we have an initial &amp;quot;search scope&amp;quot;, and a &amp;quot;component&amp;quot; array. &lt;br /&gt;
&lt;br /&gt;
The AI match algorithm starts from matching the &amp;quot;sub search scopes&amp;quot; with the first &amp;quot;component&amp;quot;, then, the matched &amp;quot;sub search scope&amp;quot;(red rectangle) will be the initial &amp;quot;search scope&amp;quot; again matching with the second &amp;quot;component&amp;quot;, this matching routing is running continuously until we matches with the final component. Then we get the whole matching result, that will be show as a auto code completion list.&lt;br /&gt;
&lt;br /&gt;
==Code completion debugging support==&lt;br /&gt;
===Debug Log output===&lt;br /&gt;
If you want to debug your plug-in, you may need to Logout the debug message to the &amp;quot;Code::Blocks Debug&amp;quot; panel. Here is the sample code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang = &amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
Manager::Get()-&amp;gt;GetLogManager()-&amp;gt;DebugLog(_(&amp;quot;XXXXX &amp;quot;));&lt;br /&gt;
&lt;br /&gt;
wxString name;&lt;br /&gt;
wxString args;&lt;br /&gt;
wxString m_Str;&lt;br /&gt;
//.....&lt;br /&gt;
Manager::Get()-&amp;gt;GetLogManager()-&amp;gt;DebugLog(F(_T(&amp;quot;Add token name='&amp;quot;)+name+_T(&amp;quot;', args='&amp;quot;)+args+_T(&amp;quot;', return type='&amp;quot;) + m_Str+ _T(&amp;quot;'&amp;quot;)));&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Also, you need start the Code::Blocks with the command line argument. For example in windows.&lt;br /&gt;
&lt;br /&gt;
'''codeblocks.exe --debug-log'''&lt;br /&gt;
&lt;br /&gt;
then a Code::blocks debug panel will be shown to display the log.&lt;br /&gt;
[[Image:CbDebugLog.png|frame|none|  Debug Log output panel]]&lt;br /&gt;
&lt;br /&gt;
===TRACE macro support===&lt;br /&gt;
As you can see in the source file like &amp;quot;tokenizer.cpp&amp;quot; or &amp;quot;parserthread.cpp&amp;quot;, there is a macro definition in the beginning of the source.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang = &amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
#define CC_CODECOMPLETION_DEBUG_OUTPUT 0&lt;br /&gt;
&lt;br /&gt;
#if CC_CODECOMPLETION_DEBUG_OUTPUT == 1&lt;br /&gt;
    #define TRACE(format, args...) \&lt;br /&gt;
        Manager::Get()-&amp;gt;GetLogManager()-&amp;gt;DebugLog(F(format, ##args))&lt;br /&gt;
    #define TRACE2(format, args...)&lt;br /&gt;
#elif CC_CODECOMPLETION_DEBUG_OUTPUT == 2&lt;br /&gt;
    #define TRACE(format, args...)                                              \&lt;br /&gt;
        do                                                                      \&lt;br /&gt;
        {                                                                       \&lt;br /&gt;
            if (g_EnableDebugTrace)                                             \&lt;br /&gt;
                Manager::Get()-&amp;gt;GetLogManager()-&amp;gt;DebugLog(F(format, ##args));   \&lt;br /&gt;
        }                                                                       \&lt;br /&gt;
        while (false)&lt;br /&gt;
    #define TRACE2(format, args...) \&lt;br /&gt;
        Manager::Get()-&amp;gt;GetLogManager()-&amp;gt;DebugLog(F(format, ##args))&lt;br /&gt;
#else&lt;br /&gt;
    #define TRACE(format, args...)&lt;br /&gt;
    #define TRACE2(format, args...)&lt;br /&gt;
#endif&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
This is a quite complex macro definition. So, if CC_CODECOMPLETION_DEBUG_OUTPUT is defined as 0, these debugging macros were disabled. If CC_CODECOMPLETION_DEBUG_OUTPUT is defined as 1, only the TRACE macro will be defined, so you can plot some messages to the Debug log. It is always the parser will parser many files, so the debug messages will be flooding. If we only interest in the debug message when we are parsing a specific source file, the best way was define CC_CODECOMPLETION_DEBUG_OUTPUT as 2. Now, TRACE macro will plot the message only in one source file. The source file name can be specified in token.cpp&lt;br /&gt;
&amp;lt;source lang = &amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
const wxString g_DebugTraceFile = _T(&amp;quot;myfile.cpp&amp;quot;); &lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
This way, only the debug message when parsing &amp;quot;myfile.cpp&amp;quot; will be traced.&lt;br /&gt;
&lt;br /&gt;
===Code-Completion debug tool dialog===&lt;br /&gt;
When you press '''shift''' and '''ctrl''' key and double click on any entry of the navigator tree entry, a debug tool dialog will pop up to give a more detail about the selected token. You can query its information such as its member variables, its Ancestors and so on.&lt;br /&gt;
&lt;br /&gt;
[[Image:CcDebugToolDialog.png]]&lt;br /&gt;
&lt;br /&gt;
===Debug Smart Sense log output ===&lt;br /&gt;
When you hold the'''shift''' and '''ctrl''' key and right click on any entry of the navigator tree entry, the context menu will have a &amp;quot;Debug SmartSense&amp;quot; menu entry shown. You can click it to enable it. See the image blow. Then, all the debug log information when doing an Auto-completion will be shown in the &amp;quot;Debug Log&amp;quot; panel.&lt;br /&gt;
&lt;br /&gt;
[[File:Cc debug smartsense.png]]&lt;br /&gt;
&lt;br /&gt;
==Mutexs and lockers in CC==&lt;br /&gt;
We need lockers to avoid multiply thread issues of wxString. More detailed can be found: [/index.php/topic,17543.0.html wxString and the locker issue in our CC code], to avoid such issue, we need lockers.&lt;br /&gt;
There are three main kind of lockers.&lt;br /&gt;
&amp;lt;nowiki&amp;gt;wxMutex s_ParserMutex;&lt;br /&gt;
wxMutex s_TokenTreeMutex;&lt;br /&gt;
wxMutex m_ClassBrowserBuilderThreadMutex;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
The first one was to protect multiply access to Parser objects, this is a static variable. The second one tries to forbid the multiply access to the TokenTree, the last one is used to build the symbol browser tree(usually show in the left docked panels of the C::B main frame)&lt;br /&gt;
&lt;br /&gt;
The associated Macros are below:&lt;br /&gt;
&amp;lt;source lang = &amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
// For tracking, either uncomment:&lt;br /&gt;
//#define CC_ENABLE_LOCKER_TRACK&lt;br /&gt;
// ...or:&lt;br /&gt;
#define CC_ENABLE_LOCKER_ASSERT&lt;br /&gt;
// ..or none of the above.&lt;br /&gt;
&lt;br /&gt;
#if defined(CC_ENABLE_LOCKER_TRACK)&lt;br /&gt;
    // TRACKING MUTXES&lt;br /&gt;
    // [1] Implementations for tracking mutexes:&lt;br /&gt;
    #define THREAD_LOCKER_MTX_LOCK(NAME)                                         \&lt;br /&gt;
        CCLogger::Get()-&amp;gt;DebugLog(F(_T(&amp;quot;%s.Lock() : %s(), %s, %d&amp;quot;),              \&lt;br /&gt;
                                    wxString(#NAME, wxConvUTF8).wx_str(),        \&lt;br /&gt;
                                    wxString(__FUNCTION__, wxConvUTF8).wx_str(), \&lt;br /&gt;
                                    wxString(__FILE__, wxConvUTF8).wx_str(),     \&lt;br /&gt;
                                    __LINE__))&lt;br /&gt;
    #define THREAD_LOCKER_MTX_LOCK_SUCCESS(NAME)                                 \&lt;br /&gt;
        CCLogger::Get()-&amp;gt;DebugLog(F(_T(&amp;quot;%s.Lock().Success() : %s(), %s, %d&amp;quot;),    \&lt;br /&gt;
                                    wxString(#NAME, wxConvUTF8).wx_str(),        \&lt;br /&gt;
                                    wxString(__FUNCTION__, wxConvUTF8).wx_str(), \&lt;br /&gt;
                                    wxString(__FILE__, wxConvUTF8).wx_str(),     \&lt;br /&gt;
                                    __LINE__))&lt;br /&gt;
    #define THREAD_LOCKER_MTX_UNLOCK(NAME)                                       \&lt;br /&gt;
        CCLogger::Get()-&amp;gt;DebugLog(F(_T(&amp;quot;%s.Unlock() : %s(), %s, %d&amp;quot;),            \&lt;br /&gt;
                                    wxString(#NAME, wxConvUTF8).wx_str(),        \&lt;br /&gt;
                                    wxString(__FUNCTION__, wxConvUTF8).wx_str(), \&lt;br /&gt;
                                    wxString(__FILE__, wxConvUTF8).wx_str(),     \&lt;br /&gt;
                                    __LINE__))&lt;br /&gt;
    #define THREAD_LOCKER_MTX_UNLOCK_SUCCESS(NAME)                               \&lt;br /&gt;
        CCLogger::Get()-&amp;gt;DebugLog(F(_T(&amp;quot;%s.Unlock().Success() : %s(), %s, %d&amp;quot;),  \&lt;br /&gt;
                                    wxString(#NAME, wxConvUTF8).wx_str(),        \&lt;br /&gt;
                                    wxString(__FUNCTION__, wxConvUTF8).wx_str(), \&lt;br /&gt;
                                    wxString(__FILE__, wxConvUTF8).wx_str(),     \&lt;br /&gt;
                                    __LINE__))&lt;br /&gt;
    #define THREAD_LOCKER_MTX_FAIL(NAME)                                         \&lt;br /&gt;
        CCLogger::Get()-&amp;gt;DebugLog(F(_T(&amp;quot;%s.Fail() : %s(), %s, %d&amp;quot;),              \&lt;br /&gt;
                                    wxString(#NAME, wxConvUTF8).wx_str(),        \&lt;br /&gt;
                                    wxString(__FUNCTION__, wxConvUTF8).wx_str(), \&lt;br /&gt;
                                    wxString(__FILE__, wxConvUTF8).wx_str(),     \&lt;br /&gt;
                                    __LINE__))&lt;br /&gt;
    // [2] Cumulative convenient macros for tracking mutexes [USE THESE!]:&lt;br /&gt;
    #define CC_LOCKER_TRACK_TT_MTX_LOCK(M)    \&lt;br /&gt;
    {                                         \&lt;br /&gt;
        THREAD_LOCKER_MTX_LOCK(M);            \&lt;br /&gt;
        if (M.Lock()==wxMUTEX_NO_ERROR)       \&lt;br /&gt;
          THREAD_LOCKER_MTX_LOCK_SUCCESS(M);  \&lt;br /&gt;
        else                                  \&lt;br /&gt;
          THREAD_LOCKER_MTX_FAIL(M);          \&lt;br /&gt;
    }&lt;br /&gt;
    #define CC_LOCKER_TRACK_TT_MTX_UNLOCK(M)    \&lt;br /&gt;
    {                                           \&lt;br /&gt;
        THREAD_LOCKER_MTX_UNLOCK(M);            \&lt;br /&gt;
        if (M.Unlock()==wxMUTEX_NO_ERROR)       \&lt;br /&gt;
          THREAD_LOCKER_MTX_UNLOCK_SUCCESS(M);  \&lt;br /&gt;
        else                                    \&lt;br /&gt;
          THREAD_LOCKER_MTX_FAIL(M);            \&lt;br /&gt;
    }&lt;br /&gt;
    #define CC_LOCKER_TRACK_CBBT_MTX_LOCK   CC_LOCKER_TRACK_TT_MTX_LOCK&lt;br /&gt;
    #define CC_LOCKER_TRACK_CBBT_MTX_UNLOCK CC_LOCKER_TRACK_TT_MTX_UNLOCK&lt;br /&gt;
    #define CC_LOCKER_TRACK_P_MTX_LOCK      CC_LOCKER_TRACK_TT_MTX_LOCK&lt;br /&gt;
    #define CC_LOCKER_TRACK_P_MTX_UNLOCK    CC_LOCKER_TRACK_TT_MTX_UNLOCK&lt;br /&gt;
&lt;br /&gt;
    // TRACKING CRITICAL SECIONS&lt;br /&gt;
    // [2] Implementations for tracking critical sections:&lt;br /&gt;
    #define THREAD_LOCKER_CS_ENTER(NAME)                                         \&lt;br /&gt;
        CCLogger::Get()-&amp;gt;DebugLog(F(_T(&amp;quot;%s.Enter() : %s(), %s, %d&amp;quot;),             \&lt;br /&gt;
                                    wxString(#NAME, wxConvUTF8).wx_str(),        \&lt;br /&gt;
                                    wxString(__FUNCTION__, wxConvUTF8).wx_str(), \&lt;br /&gt;
                                    wxString(__FILE__, wxConvUTF8).wx_str(),     \&lt;br /&gt;
                                    __LINE__))&lt;br /&gt;
    #define THREAD_LOCKER_CS_ENTERED(NAME)                                       \&lt;br /&gt;
        CCLogger::Get()-&amp;gt;DebugLog(F(_T(&amp;quot;%s.Entered() : %s(), %s, %d&amp;quot;),           \&lt;br /&gt;
                                    wxString(#NAME, wxConvUTF8).wx_str(),        \&lt;br /&gt;
                                    wxString(__FUNCTION__, wxConvUTF8).wx_str(), \&lt;br /&gt;
                                    wxString(__FILE__, wxConvUTF8).wx_str(),     \&lt;br /&gt;
                                    __LINE__))&lt;br /&gt;
    #define THREAD_LOCKER_CS_LEAVE(NAME)                                         \&lt;br /&gt;
        CCLogger::Get()-&amp;gt;DebugLog(F(_T(&amp;quot;%s.Leave() : %s(), %s, %d&amp;quot;),             \&lt;br /&gt;
                                    wxString(#NAME, wxConvUTF8).wx_str(),        \&lt;br /&gt;
                                    wxString(__FUNCTION__, wxConvUTF8).wx_str(), \&lt;br /&gt;
                                    wxString(__FILE__, wxConvUTF8).wx_str(),     \&lt;br /&gt;
                                    __LINE__))&lt;br /&gt;
    // [2] Cumulative convenient macros for tracking critical sections [USE THESE!]:&lt;br /&gt;
    #define CC_LOCKER_TRACK_CS_ENTER(CS) \&lt;br /&gt;
    {                                    \&lt;br /&gt;
         THREAD_LOCKER_CS_ENTER(CS);     \&lt;br /&gt;
         CS.Enter();                     \&lt;br /&gt;
         THREAD_LOCKER_CS_ENTERED(CS);   \&lt;br /&gt;
    }&lt;br /&gt;
    #define CC_LOCKER_TRACK_CS_LEAVE(CS) \&lt;br /&gt;
    {                                    \&lt;br /&gt;
          THREAD_LOCKER_CS_LEAVE(CS);    \&lt;br /&gt;
          CS.Leave();                    \&lt;br /&gt;
    }&lt;br /&gt;
#elif defined CC_ENABLE_LOCKER_ASSERT&lt;br /&gt;
    #define CC_LOCKER_TRACK_CS_ENTER(CS)     CS.Enter();&lt;br /&gt;
    #define CC_LOCKER_TRACK_CS_LEAVE(CS)     CS.Leave();&lt;br /&gt;
&lt;br /&gt;
    #define CC_LOCKER_TRACK_TT_MTX_LOCK(M)   cbAssert(M.Lock()==wxMUTEX_NO_ERROR);&lt;br /&gt;
    #define CC_LOCKER_TRACK_TT_MTX_UNLOCK(M) cbAssert(M.Unlock()==wxMUTEX_NO_ERROR);&lt;br /&gt;
    #define CC_LOCKER_TRACK_CBBT_MTX_LOCK    CC_LOCKER_TRACK_TT_MTX_LOCK&lt;br /&gt;
    #define CC_LOCKER_TRACK_CBBT_MTX_UNLOCK  CC_LOCKER_TRACK_TT_MTX_UNLOCK&lt;br /&gt;
    #define CC_LOCKER_TRACK_P_MTX_LOCK       CC_LOCKER_TRACK_TT_MTX_LOCK&lt;br /&gt;
    #define CC_LOCKER_TRACK_P_MTX_UNLOCK     CC_LOCKER_TRACK_TT_MTX_UNLOCK&lt;br /&gt;
#else&lt;br /&gt;
    #define CC_LOCKER_TRACK_CS_ENTER(CS)     CS.Enter();&lt;br /&gt;
    #define CC_LOCKER_TRACK_CS_LEAVE(CS)     CS.Leave();&lt;br /&gt;
&lt;br /&gt;
    #define CC_LOCKER_TRACK_TT_MTX_LOCK(M)   M.Lock();&lt;br /&gt;
    #define CC_LOCKER_TRACK_TT_MTX_UNLOCK(M) M.Unlock();&lt;br /&gt;
    #define CC_LOCKER_TRACK_CBBT_MTX_LOCK    CC_LOCKER_TRACK_TT_MTX_LOCK&lt;br /&gt;
    #define CC_LOCKER_TRACK_CBBT_MTX_UNLOCK  CC_LOCKER_TRACK_TT_MTX_UNLOCK&lt;br /&gt;
    #define CC_LOCKER_TRACK_P_MTX_LOCK       CC_LOCKER_TRACK_TT_MTX_LOCK&lt;br /&gt;
    #define CC_LOCKER_TRACK_P_MTX_UNLOCK     CC_LOCKER_TRACK_TT_MTX_UNLOCK&lt;br /&gt;
#endif&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Each mutex need a Lock and Unlock macro, like for mutex for Parser, we need CC_LOCKER_TRACK_P_MTX_LOCK and CC_LOCKER_TRACK_P_MTX_UNLOCK.&lt;br /&gt;
&lt;br /&gt;
==Usefull Links==&lt;br /&gt;
&lt;br /&gt;
*A discussion on search tree in the forum [/index.php/topic,1696.0.html] and [/index.php/topic,1581.0.html].&lt;br /&gt;
&lt;br /&gt;
*Another opensource IDE [http://vcfbuilder.org/?q=node/139 VCF builder]or[https://sourceforge.net/projects/vcfbuilder/ vcfbuilder on sf], By the way , VCF use a CodeStore based on [http://www.antlr.org/ antlr parser] to deal with parsing, the whole source code can be check out from &lt;br /&gt;
&amp;lt;pre&amp;gt;svn co https://vcfbuilder.svn.sourceforge.net/svnroot/vcfbuilder vcfbuilder&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*online book[http://www.macs.hw.ac.uk/~alison/alg/details.html Data Structures and Algorithms II Course ] and [http://www.macs.hw.ac.uk/~alison/alg/lectures.html pdf lectures]&lt;br /&gt;
&lt;br /&gt;
*A forum discussion on why a standard perprocessor and parser works slowly. [/index.php/topic,2494.msg19801.html#msg19801 parsing iostream header takes 5 seconds]&lt;br /&gt;
&lt;br /&gt;
*[http://www.codelite.org CodeLite] is another open source IDE using wxWidgets, use Ctags as a indexing service, and do context expression syntactic analysis generated from Lex and Yacc tools.See the explanation in forum message by it's author eranif [/index.php/topic,10087.msg70875.html#msg70875 How does Codelite's CC work with CTags and Yacc&amp;amp;Lex]&lt;br /&gt;
&lt;br /&gt;
*Hopefully, we can use the patricia tree from the standard library, see here:[http://gcc.gnu.org/onlinedocs/libstdc++/ext/pb_ds/trie_based_containers.html trie]&lt;br /&gt;
&lt;br /&gt;
* a blog from KDE4's developer, it explain the code completion in KDE4, see here:[http://zwabel.wordpress.com/ zwabel' blog]&lt;br /&gt;
&lt;br /&gt;
* QT creator source code from [http://qt.gitorious.org/qt-creator/qt-creator/trees/master QT-creator source]&lt;br /&gt;
&lt;br /&gt;
* [http://websvn.kde.org/trunk/KDE/kdevelop/ Kdevelop source code] and it's [http://websvn.kde.org/trunk/KDE/kdevelop/languages/cpp/parser/ parser]&lt;br /&gt;
&lt;br /&gt;
* [http://stackoverflow.com/questions/1220099/how-does-code-completion-work How does code completion work? - Stack Overflow]&lt;br /&gt;
&lt;br /&gt;
* [/index.php/topic,11724.0.html Just a reminder Codelite IDE now have improved it's parser]&lt;br /&gt;
&lt;br /&gt;
*[http://padator.org/software-yacfe.php Yacfe, a parser with proprocessor enabled]&lt;br /&gt;
&lt;br /&gt;
*[/index.php/topic,1581.msg11701.html#msg11701 A Mini C++ interpreter] from the book &amp;quot;The Art of C++ by Herbert Schildt&amp;quot;, source code can be download [http://books.mcgraw-hill.com/downloads/products/0072255129/0072255129_code.zip here]&lt;br /&gt;
&lt;br /&gt;
*[http://www.macs.hw.ac.uk/~alison/alg/lectures/l7.pdf Lecture 7: Parsing (intro) (pdf)] and [http://www.macs.hw.ac.uk/~alison/alg/lectures/l8.pdf Lecture 8: Recursive Descent Parsing (pdf)] from [http://www.macs.hw.ac.uk/~alison/alg/lectures.html Data Structures and Algorithms II]&lt;br /&gt;
&lt;br /&gt;
*There are some online &amp;quot;Compiler design&amp;quot; books listed in [http://www.freetechbooks.com/compiler-design-and-construction-f14.html Free Online Compiler Design and Construction Books :: FreeTechBooks.com], and the best one I think is : [http://www.diku.dk/hjemmesider/ansatte/torbenm/Basics/index.html Basics of Compiler Design], and you can get a basic understanding.&lt;br /&gt;
&lt;br /&gt;
*[http://wiki.eclipse.org/CDT/designs/Overview_of_Parsing CDT/designs/Overview of Parsing].&lt;br /&gt;
&lt;br /&gt;
* [http://en.literateprograms.org/Radix_tree_(C) Radix tree (C) - LiteratePrograms]&lt;br /&gt;
&lt;br /&gt;
* LLVM's online tutorials on how to write a simple compiler [http://llvm.org/docs/tutorial/index.html LLVM Tutorial]&lt;br /&gt;
&lt;br /&gt;
* Roberto Raggi's new parser[https://github.com/robertoraggi/cplusplus cplusplus 5 My experimental C++ front end], note Roberto Raggi is the author of the parser for both Qtcreator and Kdeveloper IDE.&lt;br /&gt;
&lt;br /&gt;
* KDevelop are discussing clang now, see [http://milianw.de/blog/katekdevelop-sprint-2014-let-there-be-clang Kate/KDevelop Sprint 2014: Let There Be Clang | Milian Wolff]&lt;/div&gt;</summary>
		<author><name>Ollydbg</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=Main_Page&amp;diff=7753</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php?title=Main_Page&amp;diff=7753"/>
		<updated>2014-06-22T14:43:55Z</updated>

		<summary type="html">&lt;p&gt;Ollydbg: fix typo&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOEDITSECTION__ __NOTOC__&lt;br /&gt;
{{Layout_box1|1=&lt;br /&gt;
[[Image:cb_splash.png|left]]&lt;br /&gt;
'''Welcome to the official Wiki for Code::Blocks'''&amp;lt;br&amp;gt;&lt;br /&gt;
[https://www.codeblocks.org Code::Blocks] is a free, open-source, cross-platform [[wikipedia:Integrated Development Environment|IDE]]. Using a plugin architecture, its capabilities and features are defined by the provided plugins.&amp;lt;br&amp;gt;&lt;br /&gt;
Currently, [https://www.codeblocks.org Code::Blocks] is oriented towards C/C++/Fortran.&lt;br /&gt;
The Code::Blocks team does not take responsibility for the content nor accuracy of these pages.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;small&amp;gt;Wiki Editors: In order to login to edit pages, you must create an account on the [/ forums]. Use the same username and password for the wiki. Read the [[Help:Contents|Help]] for editing guidelines. Look in the [[CodeBlocks:Community_Portal|community portal]] for things to do.&lt;br /&gt;
&amp;lt;/small&amp;gt;&lt;br /&gt;
&amp;lt;br clear=&amp;quot;all&amp;quot; /&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{|width=&amp;quot;100%&amp;quot; background-color=&amp;quot;transparent&amp;quot; &lt;br /&gt;
|width=&amp;quot;60%&amp;quot; valign=&amp;quot;top&amp;quot;|&lt;br /&gt;
&amp;lt;!-- LEFT --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Did you know that using Layout_box2 here instead of &amp;lt;div&amp;gt; breaks the inner table? Strange... --&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;background-color: #dfeefb; border: 1px dotted #010101; margin: 5px; padding: 5px;&amp;quot;&amp;gt;&lt;br /&gt;
{|align=&amp;quot;center&amp;quot; style=&amp;quot;background:transparent&amp;quot; cellspacing=&amp;quot;5&amp;quot;&lt;br /&gt;
&lt;br /&gt;
|valign=&amp;quot;top&amp;quot; align=&amp;quot;center&amp;quot; colspan=&amp;quot;2&amp;quot;|&lt;br /&gt;
=== How do I... ===&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|&lt;br /&gt;
'''[[Installing_Code::Blocks|...install Code::Blocks?]]'''&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:.9em&amp;quot;&amp;gt;&lt;br /&gt;
[[Installing_the_latest_official_version_of_Code::Blocks_on_Windows|Windows]] &amp;amp;middot;&lt;br /&gt;
[[Installing_Code::Blocks#Ubuntu|Ubuntu]] &amp;amp;middot;&lt;br /&gt;
[[Installing_Code::Blocks#Mac_OS_X|Mac OS X]] &amp;amp;middot;&lt;br /&gt;
[[Installing_Code::Blocks#Fedora|Fedora]] &amp;amp;middot;&lt;br /&gt;
[[Installing_Code::Blocks|more...]]&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|&lt;br /&gt;
'''[[Installing_a_supported_compiler|...set up a compiler in Code::Blocks?]]'''&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:.9em&amp;quot;&amp;gt;&lt;br /&gt;
[[Installing_a_supported_compiler#MinGW.2FGCC|MinGW]] &amp;amp;middot;&lt;br /&gt;
[[Installing_a_supported_compiler#Microsoft_Visual_C.2B.2B|MS Visual C++]] &amp;amp;middot;&lt;br /&gt;
[[Installing_a_supported_compiler|more...]]&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|&lt;br /&gt;
'''[[Creating a new project|...create a new project?]]'''&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:.9em&amp;quot;&amp;gt;&lt;br /&gt;
[[Creating a new project#Changing file composition|Add files]] &amp;amp;middot;&lt;br /&gt;
[[Creating a new project#Modifying build options|Build options]] &amp;amp;middot;&lt;br /&gt;
[[Creating a new project#Virtual Targets|Virtual Targets]] &amp;amp;middot;&lt;br /&gt;
[[Creating a new project|more...]]&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|&lt;br /&gt;
'''[[Debugging_with_Code::Blocks|...debug my program?]]'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|&lt;br /&gt;
'''[[FAQ-Settings#Q: How do I make Code::Blocks portable?|...make Code::Blocks portable?]]'''&lt;br /&gt;
&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|&lt;br /&gt;
'''[[User_documentation#Third-party_libraries|...use a 3rd-party library?]]'''&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:.9em&amp;quot;&amp;gt;&lt;br /&gt;
[[Using_wxWidgets|wxWidgets]] &amp;amp;middot;&lt;br /&gt;
[[Using_Boost|Boost]] &amp;amp;middot;&lt;br /&gt;
[[Using_SDL_with_Code::Blocks|SDL]] &amp;amp;middot;&lt;br /&gt;
[[User_documentation#Third-party_libraries|more...]]&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{Layout_box3|1=&lt;br /&gt;
== Table of Contents ==&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:.9em&amp;quot;&amp;gt;''Main article: [[Code::Blocks Documentation]]''&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== [[User documentation]] ===&lt;br /&gt;
:Articles for Code::Blocks users&lt;br /&gt;
&lt;br /&gt;
=== [[FAQ]] ===&lt;br /&gt;
:Frequently Asked Questions&lt;br /&gt;
&lt;br /&gt;
=== [[Feature List]] ===&lt;br /&gt;
:An index of Code::Blocks' useful features&lt;br /&gt;
&lt;br /&gt;
=== [[Code::Blocks Plugins]] ===&lt;br /&gt;
:Plugins extend Code::Blocks' functionality&lt;br /&gt;
&lt;br /&gt;
=== [[Off-site documentation]] ===&lt;br /&gt;
:Links to external documentation&lt;br /&gt;
&lt;br /&gt;
=== [[Developer documentation]] ===&lt;br /&gt;
:Articles for developers of Code::Blocks itself&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
|width=&amp;quot;40%&amp;quot; valign=&amp;quot;top&amp;quot;|&lt;br /&gt;
&amp;lt;!-- RIGHT --&amp;gt;&lt;br /&gt;
{{Layout_box4|1=&lt;br /&gt;
=== Download Code::Blocks ===&lt;br /&gt;
* Latest official release: [https://www.codeblocks.org/downloads/26 13.12]&lt;br /&gt;
* [/index.php?board=20.0 Nightly builds] (updated each night)&lt;br /&gt;
* [[Compiled_packages_of_Code::Blocks|Official and third-party binaries]] (for various distributions)&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{Layout_box2|1=&lt;br /&gt;
=== Other resources ===&lt;br /&gt;
* [https://www.codeblocks.org Main website]&lt;br /&gt;
* [ Community forums]&lt;br /&gt;
* [irc://irc.freenode.net/codeblocks IRC channel] and [http://webchat.freenode.net/?channels=codeblocks IRC channel web access]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{Layout_box2|1=&lt;br /&gt;
=== Development ===&lt;br /&gt;
[[Image:Chk.png]][[Roadmap]] &lt;br /&gt;
* [[Developer documentation]]&lt;br /&gt;
* [http://sourceforge.net/projects/codeblocks/ Project page at Sourceforge]&lt;br /&gt;
* '''Bugs''': browse or submit [http://sourceforge.net/p/codeblocks/tickets/  bugs] or browse [http://alpha0010.github.io/cb-history/bugs.html old bugs]&lt;br /&gt;
* '''Features''': browse or submit [http://sourceforge.net/p/codeblocks/tickets/ features] or browse [http://alpha0010.github.io/cb-history/features.html old features]&lt;br /&gt;
* '''Patches''': browse or submit [http://sourceforge.net/p/codeblocks/tickets/ patches] or browse [http://alpha0010.github.io/cb-history/patches.html old patches]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{Layout_box3|1=&lt;br /&gt;
=== Supported compilers ===&lt;br /&gt;
* [http://gcc.gnu.org/ GNU GCC (incl. G77)] (Linux)&lt;br /&gt;
* [http://www.mingw.org MinGW GCC (incl. G77)] (Win32)&lt;br /&gt;
* [http://mspgcc.sourceforge.net MSP430 GCC] (Win32)&lt;br /&gt;
* [http://www.hightec-rt.com TriCore GCC] (Win32, Linux)&lt;br /&gt;
* [http://www.hightec-rt.com PowerPC GCC] (Win32, Linux)&lt;br /&gt;
* [http://developer.apple.com/tools/ Apple GCC (Xcode)] (Mac OS X)&lt;br /&gt;
&amp;lt;!-- Tested and working with Microsoft PSDK for Windows 2003 R2 and CodeBlocks b3577 --&amp;gt;&lt;br /&gt;
* [http://xona.com/2004/06/29.html Microsoft Visual C++ Toolkit 2003] (Win32) &lt;br /&gt;
* [http://msdn.microsoft.com/vstudio/express/visualc/download/ Microsoft Visual C++ 2005] (Win32)&lt;br /&gt;
* [http://edn.embarcadero.com/article/20633 Borland's C++ Compiler 5.5] (Win32)&lt;br /&gt;
* [http://www.digitalmars.com/ DigitalMars C/C++] (Win32)&lt;br /&gt;
* [http://openwatcom.org/index.php/Main_Page OpenWatcom] (Win32)&lt;br /&gt;
* [http://www.intel.com/cd/software/products/asmo-na/eng/compilers/219754.htm Intel C++ compiler] (Win32)&lt;br /&gt;
* [http://sdcc.sourceforge.net/ Small Device C Compiler (SDCC)]&lt;br /&gt;
* [http://www.digitalmars.com/d/dcompiler.html Digital Mars D]&lt;br /&gt;
* [http://dgcc.sourceforge.net/ GDC D Compiler]&lt;br /&gt;
* [http://dsource.org/projects/ldc/ LLVM D Compiler]&lt;br /&gt;
}}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;[https://www.codeblocks.org/about.shtml The Code::Blocks team]&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;[[Special:Allpages|Index]]&amp;lt;/center&amp;gt;&lt;/div&gt;</summary>
		<author><name>Ollydbg</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=Developer_documentation&amp;diff=7752</id>
		<title>Developer documentation</title>
		<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php?title=Developer_documentation&amp;diff=7752"/>
		<updated>2014-06-15T03:43:46Z</updated>

		<summary type="html">&lt;p&gt;Ollydbg: git svn description&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Code::Blocks Documentation]]&lt;br /&gt;
[[Category:Developer Documentation]]&lt;br /&gt;
{{Layout_box2|1=&lt;br /&gt;
'''Official Code repository Subversion'''&amp;lt;br/&amp;gt;&lt;br /&gt;
* Web-interface by ViewVC: http://sourceforge.net/p/codeblocks/code/log/&lt;br /&gt;
* Subversion URL: &amp;lt;nowiki&amp;gt;svn://svn.code.sf.net/p/codeblocks/code/trunk&amp;lt;/nowiki&amp;gt; or &amp;lt;nowiki&amp;gt;http://svn.code.sf.net/p/codeblocks/code/trunk&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Mirror by biplab''' (Read-only; refreshed every 10 minutes.)&lt;br /&gt;
* Subversion URL: &amp;lt;nowiki&amp;gt;svn://cb.biplab.in/codeblocks/trunk&amp;lt;/nowiki&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
* Web-interface: http://cb.biplab.in/websvn/&lt;br /&gt;
* Git URL: git://cb.biplab.in/codeblocks.git&lt;br /&gt;
* Web-interface:http://cb.biplab.in/cgit/&lt;br /&gt;
&lt;br /&gt;
'''Mirror by Jens''' (Read-only; refreshed every 10 minutes.)&lt;br /&gt;
* Web-interface: http://cgit.jenslody.de/&lt;br /&gt;
* the above link contains many mirrors such as wxWidgets trunk, git mirror, and git mirror of codeblocks.github&lt;br /&gt;
&lt;br /&gt;
'''Mirror by Obf''' (Read-only; refreshed manually.)&lt;br /&gt;
* Web-interface: https://github.com/obfuscated/codeblocks_sf&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Articles for Code::Blocks developers.'''&lt;br /&gt;
&lt;br /&gt;
* '''&amp;lt;u&amp;gt;Documentation&amp;lt;/u&amp;gt;'''&lt;br /&gt;
:[https://www.codeblocks.org/manual.shtml User's manual] in various formats and languages.&lt;br /&gt;
:Also see http://developer.berlios.de/projects/codeblocks/ (under the downloads section).&lt;br /&gt;
:Checkout the SDK documentation at http://developer.berlios.de/project/showfiles.php?group_id=5358 as CHM file(s).&lt;br /&gt;
&lt;br /&gt;
* Compile the complete Code::Blocks from sources on '''[[Installing Code::Blocks from source on Windows|Windows]]''' and '''[[Installing Code::Blocks from source on Linux|Linux]]'''&lt;br /&gt;
&lt;br /&gt;
* '''[[Compile Code::Blocks plugins based on a nightly]]''' without the need to compile wxWidgets or the Code::Blocks core.&lt;br /&gt;
&lt;br /&gt;
* '''[http://launchpad.net/products/codeblocks/ Translation]'''&lt;br /&gt;
:Code::Blocks uses Launchpad to coordinate translation efforts.&lt;br /&gt;
&lt;br /&gt;
* '''[[Coding style]]'''&lt;br /&gt;
:The source code formatting style used in the Code::Blocks' source.&lt;br /&gt;
&lt;br /&gt;
* '''[[Creating a custom lexer for Code::Blocks editor]]'''&lt;br /&gt;
:How to add support for new syntax lighting schemes.&lt;br /&gt;
&lt;br /&gt;
* '''[[Creating a patch to submit to BerliOS (Patch Tracker)]]'''&lt;br /&gt;
:Creating a diff file and then submitting it to the patch tracker.&lt;br /&gt;
&lt;br /&gt;
* '''[[Unicode Standards]]'''&lt;br /&gt;
:Information about unicode standards and how unicode is handled in Code::Blocks' source code.&lt;br /&gt;
&lt;br /&gt;
* '''[[Various development tips]]'''&lt;br /&gt;
:List of various development tips for Code::Blocks.&lt;br /&gt;
&lt;br /&gt;
* '''[[Scripting Code::Blocks]]'''&lt;br /&gt;
:Information about scripting Code::Blocks with [http://www.squirrel-lang.org/ Squirrel].&lt;br /&gt;
&lt;br /&gt;
* '''[[A short overview about Code::Blocks architecture]]'''&lt;br /&gt;
:Information about the architecture of Code::Blocks.&lt;br /&gt;
&lt;br /&gt;
* '''[[Code::Blocks SDK events]]'''&lt;br /&gt;
:Information about the Code::Blocks SDK events and how to work with them.&lt;br /&gt;
&lt;br /&gt;
* '''[[File formats description]]'''&lt;br /&gt;
:Description of the format of each file Code::Blocks produces.&lt;br /&gt;
&lt;br /&gt;
* '''[[Version control]]'''&lt;br /&gt;
:Tips and trick for working with our version control system.&lt;br /&gt;
&lt;br /&gt;
== Plug-In development ==&lt;br /&gt;
&lt;br /&gt;
* [[Creating a simple &amp;quot;Hello World&amp;quot; plugin]]&lt;br /&gt;
* [[Creating a Plug-in which modifies CB's Menus]]&lt;br /&gt;
* [[Creating a plugin that actually does something]]&lt;br /&gt;
* [[Linking the plugin to a Nightly Build]]&lt;br /&gt;
* [[Managing Plug-in Resources]]&lt;br /&gt;
&lt;br /&gt;
* [[Research on doing a Plug-in for embedded help in CB]]&lt;br /&gt;
&lt;br /&gt;
* [[wxSmith extensions]]&lt;br /&gt;
* [[Code::Completion Rewrite]] and [[Code Completion plugin]] and [[Code Completion Design]]&lt;br /&gt;
&lt;br /&gt;
== Scripting ==&lt;br /&gt;
&lt;br /&gt;
Using scripting to extend Code::Blocks' functionality&lt;br /&gt;
&lt;br /&gt;
* [[Wizard scripts|Creating a new project wizard]]&lt;br /&gt;
&lt;br /&gt;
== Developing C::B with Git ==&lt;br /&gt;
For devs who want to use Git to develop C::B, here are some steps to follow, especially you need to correctly set the SVN and GIT properties so that you can make your local git commits back to the official SVN repo. See [/index.php/topic,16096.msg128152.html#msg128152 Re: Read-only Git, SVN Repo for Code::Blocks]&lt;br /&gt;
&lt;br /&gt;
== Debugging C::B ==&lt;br /&gt;
&lt;br /&gt;
* When C::B crashed, it will generate a call-stack file &amp;quot;codeblocks.RPT&amp;quot;, at the crash point, this is a text file, you can open it, if your C::B contains the debug information, it will have file and line information about each call. If it is a stripped version, but you have the debug version of C::B, you can try to run the [/index.php/topic,13129.msg88254.html#msg88254 Debugging made easier], this is a address2line UI interface works under Windows.&lt;br /&gt;
* You can debug C::B under C::B (with the debugger plugin), also, you can link C::B to the debug version of wxWidgets library, so you can see whether a bug is located in C::B source code or wxWidgets' source code, see here: [/index.php/topic,17316.msg130972.html#msg130972 patch to build C::B against wx debug library]&lt;/div&gt;</summary>
		<author><name>Ollydbg</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=Main_Page&amp;diff=7751</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php?title=Main_Page&amp;diff=7751"/>
		<updated>2014-06-12T05:37:42Z</updated>

		<summary type="html">&lt;p&gt;Ollydbg: minor change descriptions&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOEDITSECTION__ __NOTOC__&lt;br /&gt;
{{Layout_box1|1=&lt;br /&gt;
[[Image:cb_splash.png|left]]&lt;br /&gt;
'''Welcome to the official Wiki for Code::Blocks'''&amp;lt;br&amp;gt;&lt;br /&gt;
[https://www.codeblocks.org Code::Blocks] is a free, open-source, cross-platform [[wikipedia:Integrated Development Environment|IDE]]. Using a plugin architecture, its capabilities and features are defined by the provided plugins.&amp;lt;br&amp;gt;&lt;br /&gt;
Currently, [https://www.codeblocks.org Code::Blocks] is oriented towards C/C++/Fortran.&lt;br /&gt;
The Code::Blocks team does not take responsibility for the content nor accuracy of these pages.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;small&amp;gt;Wiki Editors: In order to login to edit pages, you must create an account on the [/ forums]. Use the same username and password for the wiki. Read the [[Help:Contents|Help]] for editing guidelines. Look in the [[CodeBlocks:Community_Portal|community portal]] for things to do.&lt;br /&gt;
&amp;lt;/small&amp;gt;&lt;br /&gt;
&amp;lt;br clear=&amp;quot;all&amp;quot; /&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{|width=&amp;quot;100%&amp;quot; background-color=&amp;quot;transparent&amp;quot; &lt;br /&gt;
|width=&amp;quot;60%&amp;quot; valign=&amp;quot;top&amp;quot;|&lt;br /&gt;
&amp;lt;!-- LEFT --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Did you know that using Layout_box2 here instead of &amp;lt;div&amp;gt; breaks the inner table? Strange... --&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;background-color: #dfeefb; border: 1px dotted #010101; margin: 5px; padding: 5px;&amp;quot;&amp;gt;&lt;br /&gt;
{|align=&amp;quot;center&amp;quot; style=&amp;quot;background:transparent&amp;quot; cellspacing=&amp;quot;5&amp;quot;&lt;br /&gt;
&lt;br /&gt;
|valign=&amp;quot;top&amp;quot; align=&amp;quot;center&amp;quot; colspan=&amp;quot;2&amp;quot;|&lt;br /&gt;
=== How do I... ===&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|&lt;br /&gt;
'''[[Installing_Code::Blocks|...install Code::Blocks?]]'''&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:.9em&amp;quot;&amp;gt;&lt;br /&gt;
[[Installing_the_latest_official_version_of_Code::Blocks_on_Windows|Windows]] &amp;amp;middot;&lt;br /&gt;
[[Installing_Code::Blocks#Ubuntu|Ubuntu]] &amp;amp;middot;&lt;br /&gt;
[[Installing_Code::Blocks#Mac_OS_X|Mac OS X]] &amp;amp;middot;&lt;br /&gt;
[[Installing_Code::Blocks#Fedora|Fedora]] &amp;amp;middot;&lt;br /&gt;
[[Installing_Code::Blocks|more...]]&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|&lt;br /&gt;
'''[[Installing_a_supported_compiler|...set up a compiler in Code::Blocks?]]'''&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:.9em&amp;quot;&amp;gt;&lt;br /&gt;
[[Installing_a_supported_compiler#MinGW.2FGCC|MinGW]] &amp;amp;middot;&lt;br /&gt;
[[Installing_a_supported_compiler#Microsoft_Visual_C.2B.2B|MS Visual C++]] &amp;amp;middot;&lt;br /&gt;
[[Installing_a_supported_compiler|more...]]&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|&lt;br /&gt;
'''[[Creating a new project|...create a new project?]]'''&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:.9em&amp;quot;&amp;gt;&lt;br /&gt;
[[Creating a new project#Changing file composition|Add files]] &amp;amp;middot;&lt;br /&gt;
[[Creating a new project#Modifying build options|Build options]] &amp;amp;middot;&lt;br /&gt;
[[Creating a new project#Virtual Targets|Virtual Targets]] &amp;amp;middot;&lt;br /&gt;
[[Creating a new project|more...]]&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|&lt;br /&gt;
'''[[Debugging_with_Code::Blocks|...debug my program?]]'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|&lt;br /&gt;
'''[[FAQ-Settings#Q: How do I make Code::Blocks portable?|...make Code::Blocks portable?]]'''&lt;br /&gt;
&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|&lt;br /&gt;
'''[[User_documentation#Third-party_libraries|...use a 3rd-party library?]]'''&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:.9em&amp;quot;&amp;gt;&lt;br /&gt;
[[Using_wxWidgets|wxWidgets]] &amp;amp;middot;&lt;br /&gt;
[[Using_Boost|Boost]] &amp;amp;middot;&lt;br /&gt;
[[Using_SDL_with_Code::Blocks|SDL]] &amp;amp;middot;&lt;br /&gt;
[[User_documentation#Third-party_libraries|more...]]&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{Layout_box3|1=&lt;br /&gt;
== Table of Contents ==&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:.9em&amp;quot;&amp;gt;''Main article: [[Code::Blocks Documentation]]''&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== [[User documentation]] ===&lt;br /&gt;
:Articles for Code::Blocks users&lt;br /&gt;
&lt;br /&gt;
=== [[FAQ]] ===&lt;br /&gt;
:Frequently Asked Questions&lt;br /&gt;
&lt;br /&gt;
=== [[Feature List]] ===&lt;br /&gt;
:An index of Code::Blocks' useful features&lt;br /&gt;
&lt;br /&gt;
=== [[Code::Blocks Plugins]] ===&lt;br /&gt;
:Plugins extend Code::Blocks' functionality&lt;br /&gt;
&lt;br /&gt;
=== [[Off-site documentation]] ===&lt;br /&gt;
:Links to external documentation&lt;br /&gt;
&lt;br /&gt;
=== [[Developer documentation]] ===&lt;br /&gt;
:Articles for developers of Code::Blocks itself&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
|width=&amp;quot;40%&amp;quot; valign=&amp;quot;top&amp;quot;|&lt;br /&gt;
&amp;lt;!-- RIGHT --&amp;gt;&lt;br /&gt;
{{Layout_box4|1=&lt;br /&gt;
=== Download Code::Blocks ===&lt;br /&gt;
* Latest official release: [https://www.codeblocks.org/downloads/26 13.12]&lt;br /&gt;
* [/index.php?board=20.0 Nightly builds] (updated each night)&lt;br /&gt;
* [[Compiled_packages_of_Code::Blocks|Official and third-party binaries]] (for various distributions)&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{Layout_box2|1=&lt;br /&gt;
=== Other resources ===&lt;br /&gt;
* [https://www.codeblocks.org Main website]&lt;br /&gt;
* [ Community forums]&lt;br /&gt;
* [irc://irc.freenode.net/codeblocks IRC channel] and [http://webchat.freenode.net/?channels=codeblocks IRC channel web access]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{Layout_box2|1=&lt;br /&gt;
=== Development ===&lt;br /&gt;
[[Image:Chk.png]][[Roadmap]] &lt;br /&gt;
* [[Developer documentation]]&lt;br /&gt;
* [http://sourceforge.net/projects/codeblocks/ Project page at Sourceforge]&lt;br /&gt;
* '''Bugs''': browse or submit [http://sourceforge.net/p/codeblocks/tickets/  bugs] or browse [http://alpha0010.github.io/cb-history/bugs.html old bugs]&lt;br /&gt;
* '''Features''': browse or submit [http://sourceforge.net/p/codeblocks/tickets/ features] or browse old [http://alpha0010.github.io/cb-history/features.html old features]&lt;br /&gt;
* '''Patches''': browse or submit [http://sourceforge.net/p/codeblocks/tickets/ patches] or browse old [http://alpha0010.github.io/cb-history/patches.html patches]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{Layout_box3|1=&lt;br /&gt;
=== Supported compilers ===&lt;br /&gt;
* [http://gcc.gnu.org/ GNU GCC (incl. G77)] (Linux)&lt;br /&gt;
* [http://www.mingw.org MinGW GCC (incl. G77)] (Win32)&lt;br /&gt;
* [http://mspgcc.sourceforge.net MSP430 GCC] (Win32)&lt;br /&gt;
* [http://www.hightec-rt.com TriCore GCC] (Win32, Linux)&lt;br /&gt;
* [http://www.hightec-rt.com PowerPC GCC] (Win32, Linux)&lt;br /&gt;
* [http://developer.apple.com/tools/ Apple GCC (Xcode)] (Mac OS X)&lt;br /&gt;
&amp;lt;!-- Tested and working with Microsoft PSDK for Windows 2003 R2 and CodeBlocks b3577 --&amp;gt;&lt;br /&gt;
* [http://xona.com/2004/06/29.html Microsoft Visual C++ Toolkit 2003] (Win32) &lt;br /&gt;
* [http://msdn.microsoft.com/vstudio/express/visualc/download/ Microsoft Visual C++ 2005] (Win32)&lt;br /&gt;
* [http://edn.embarcadero.com/article/20633 Borland's C++ Compiler 5.5] (Win32)&lt;br /&gt;
* [http://www.digitalmars.com/ DigitalMars C/C++] (Win32)&lt;br /&gt;
* [http://openwatcom.org/index.php/Main_Page OpenWatcom] (Win32)&lt;br /&gt;
* [http://www.intel.com/cd/software/products/asmo-na/eng/compilers/219754.htm Intel C++ compiler] (Win32)&lt;br /&gt;
* [http://sdcc.sourceforge.net/ Small Device C Compiler (SDCC)]&lt;br /&gt;
* [http://www.digitalmars.com/d/dcompiler.html Digital Mars D]&lt;br /&gt;
* [http://dgcc.sourceforge.net/ GDC D Compiler]&lt;br /&gt;
* [http://dsource.org/projects/ldc/ LLVM D Compiler]&lt;br /&gt;
}}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;[https://www.codeblocks.org/about.shtml The Code::Blocks team]&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;[[Special:Allpages|Index]]&amp;lt;/center&amp;gt;&lt;/div&gt;</summary>
		<author><name>Ollydbg</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=Main_Page&amp;diff=7750</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php?title=Main_Page&amp;diff=7750"/>
		<updated>2014-06-12T04:15:41Z</updated>

		<summary type="html">&lt;p&gt;Ollydbg: bugs features and patches are on SF now, also update the old issued maintained by alpha on github&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOEDITSECTION__ __NOTOC__&lt;br /&gt;
{{Layout_box1|1=&lt;br /&gt;
[[Image:cb_splash.png|left]]&lt;br /&gt;
'''Welcome to the official Wiki for Code::Blocks'''&amp;lt;br&amp;gt;&lt;br /&gt;
[https://www.codeblocks.org Code::Blocks] is an open-source, cross-platform [[wikipedia:Integrated Development Environment|IDE]]. Using a plugin architecture, its capabilities and features are defined by the provided plugins.&amp;lt;br&amp;gt;&lt;br /&gt;
Currently, [https://www.codeblocks.org Code::Blocks] is oriented towards C/C++.&lt;br /&gt;
The Code::Blocks team does not take responsibility for the content nor accuracy of these pages.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;small&amp;gt;Wiki Editors: In order to login to edit pages, you must create an account on the [/ forums]. Use the same username and password for the wiki. Read the [[Help:Contents|Help]] for editing guidelines. Look in the [[CodeBlocks:Community_Portal|community portal]] for things to do.&lt;br /&gt;
&amp;lt;/small&amp;gt;&lt;br /&gt;
&amp;lt;br clear=&amp;quot;all&amp;quot; /&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{|width=&amp;quot;100%&amp;quot; background-color=&amp;quot;transparent&amp;quot; &lt;br /&gt;
|width=&amp;quot;60%&amp;quot; valign=&amp;quot;top&amp;quot;|&lt;br /&gt;
&amp;lt;!-- LEFT --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Did you know that using Layout_box2 here instead of &amp;lt;div&amp;gt; breaks the inner table? Strange... --&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;background-color: #dfeefb; border: 1px dotted #010101; margin: 5px; padding: 5px;&amp;quot;&amp;gt;&lt;br /&gt;
{|align=&amp;quot;center&amp;quot; style=&amp;quot;background:transparent&amp;quot; cellspacing=&amp;quot;5&amp;quot;&lt;br /&gt;
&lt;br /&gt;
|valign=&amp;quot;top&amp;quot; align=&amp;quot;center&amp;quot; colspan=&amp;quot;2&amp;quot;|&lt;br /&gt;
=== How do I... ===&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|&lt;br /&gt;
'''[[Installing_Code::Blocks|...install Code::Blocks?]]'''&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:.9em&amp;quot;&amp;gt;&lt;br /&gt;
[[Installing_the_latest_official_version_of_Code::Blocks_on_Windows|Windows]] &amp;amp;middot;&lt;br /&gt;
[[Installing_Code::Blocks#Ubuntu|Ubuntu]] &amp;amp;middot;&lt;br /&gt;
[[Installing_Code::Blocks#Mac_OS_X|Mac OS X]] &amp;amp;middot;&lt;br /&gt;
[[Installing_Code::Blocks#Fedora|Fedora]] &amp;amp;middot;&lt;br /&gt;
[[Installing_Code::Blocks|more...]]&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|&lt;br /&gt;
'''[[Installing_a_supported_compiler|...set up a compiler in Code::Blocks?]]'''&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:.9em&amp;quot;&amp;gt;&lt;br /&gt;
[[Installing_a_supported_compiler#MinGW.2FGCC|MinGW]] &amp;amp;middot;&lt;br /&gt;
[[Installing_a_supported_compiler#Microsoft_Visual_C.2B.2B|MS Visual C++]] &amp;amp;middot;&lt;br /&gt;
[[Installing_a_supported_compiler|more...]]&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|&lt;br /&gt;
'''[[Creating a new project|...create a new project?]]'''&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:.9em&amp;quot;&amp;gt;&lt;br /&gt;
[[Creating a new project#Changing file composition|Add files]] &amp;amp;middot;&lt;br /&gt;
[[Creating a new project#Modifying build options|Build options]] &amp;amp;middot;&lt;br /&gt;
[[Creating a new project#Virtual Targets|Virtual Targets]] &amp;amp;middot;&lt;br /&gt;
[[Creating a new project|more...]]&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|&lt;br /&gt;
'''[[Debugging_with_Code::Blocks|...debug my program?]]'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|&lt;br /&gt;
'''[[FAQ-Settings#Q: How do I make Code::Blocks portable?|...make Code::Blocks portable?]]'''&lt;br /&gt;
&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|&lt;br /&gt;
'''[[User_documentation#Third-party_libraries|...use a 3rd-party library?]]'''&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:.9em&amp;quot;&amp;gt;&lt;br /&gt;
[[Using_wxWidgets|wxWidgets]] &amp;amp;middot;&lt;br /&gt;
[[Using_Boost|Boost]] &amp;amp;middot;&lt;br /&gt;
[[Using_SDL_with_Code::Blocks|SDL]] &amp;amp;middot;&lt;br /&gt;
[[User_documentation#Third-party_libraries|more...]]&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{Layout_box3|1=&lt;br /&gt;
== Table of Contents ==&lt;br /&gt;
&amp;lt;span style=&amp;quot;font-size:.9em&amp;quot;&amp;gt;''Main article: [[Code::Blocks Documentation]]''&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== [[User documentation]] ===&lt;br /&gt;
:Articles for Code::Blocks users&lt;br /&gt;
&lt;br /&gt;
=== [[FAQ]] ===&lt;br /&gt;
:Frequently Asked Questions&lt;br /&gt;
&lt;br /&gt;
=== [[Feature List]] ===&lt;br /&gt;
:An index of Code::Blocks' useful features&lt;br /&gt;
&lt;br /&gt;
=== [[Code::Blocks Plugins]] ===&lt;br /&gt;
:Plugins extend Code::Blocks' functionality&lt;br /&gt;
&lt;br /&gt;
=== [[Off-site documentation]] ===&lt;br /&gt;
:Links to external documentation&lt;br /&gt;
&lt;br /&gt;
=== [[Developer documentation]] ===&lt;br /&gt;
:Articles for developers of Code::Blocks itself&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
|width=&amp;quot;40%&amp;quot; valign=&amp;quot;top&amp;quot;|&lt;br /&gt;
&amp;lt;!-- RIGHT --&amp;gt;&lt;br /&gt;
{{Layout_box4|1=&lt;br /&gt;
=== Download Code::Blocks ===&lt;br /&gt;
* Latest official release: [https://www.codeblocks.org/downloads/26 13.12]&lt;br /&gt;
* [/index.php?board=20.0 Nightly builds] (updated each night)&lt;br /&gt;
* [[Compiled_packages_of_Code::Blocks|Official and third-party binaries]] (for various distributions)&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{Layout_box2|1=&lt;br /&gt;
=== Other resources ===&lt;br /&gt;
* [https://www.codeblocks.org Main website]&lt;br /&gt;
* [ Community forums]&lt;br /&gt;
* [irc://irc.freenode.net/codeblocks IRC channel] and [http://webchat.freenode.net/?channels=codeblocks IRC channel web access]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{Layout_box2|1=&lt;br /&gt;
=== Development ===&lt;br /&gt;
[[Image:Chk.png]][[Roadmap]] &lt;br /&gt;
* [[Developer documentation]]&lt;br /&gt;
* [http://sourceforge.net/projects/codeblocks/ Project page at Sourceforge]&lt;br /&gt;
* '''Bugs''': browse or submit [http://sourceforge.net/p/codeblocks/tickets/  bugs] or browse [http://alpha0010.github.io/cb-history/bugs.html old bugs]&lt;br /&gt;
* '''Features''': browse or submit [http://sourceforge.net/p/codeblocks/tickets/ features] or browse old [http://alpha0010.github.io/cb-history/features.html old features]&lt;br /&gt;
* '''Patches''': browse or submit [http://sourceforge.net/p/codeblocks/tickets/ patches] or browse old [http://alpha0010.github.io/cb-history/patches.html patches]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{Layout_box3|1=&lt;br /&gt;
=== Supported compilers ===&lt;br /&gt;
* [http://gcc.gnu.org/ GNU GCC (incl. G77)] (Linux)&lt;br /&gt;
* [http://www.mingw.org MinGW GCC (incl. G77)] (Win32)&lt;br /&gt;
* [http://mspgcc.sourceforge.net MSP430 GCC] (Win32)&lt;br /&gt;
* [http://www.hightec-rt.com TriCore GCC] (Win32, Linux)&lt;br /&gt;
* [http://www.hightec-rt.com PowerPC GCC] (Win32, Linux)&lt;br /&gt;
* [http://developer.apple.com/tools/ Apple GCC (Xcode)] (Mac OS X)&lt;br /&gt;
&amp;lt;!-- Tested and working with Microsoft PSDK for Windows 2003 R2 and CodeBlocks b3577 --&amp;gt;&lt;br /&gt;
* [http://xona.com/2004/06/29.html Microsoft Visual C++ Toolkit 2003] (Win32) &lt;br /&gt;
* [http://msdn.microsoft.com/vstudio/express/visualc/download/ Microsoft Visual C++ 2005] (Win32)&lt;br /&gt;
* [http://edn.embarcadero.com/article/20633 Borland's C++ Compiler 5.5] (Win32)&lt;br /&gt;
* [http://www.digitalmars.com/ DigitalMars C/C++] (Win32)&lt;br /&gt;
* [http://openwatcom.org/index.php/Main_Page OpenWatcom] (Win32)&lt;br /&gt;
* [http://www.intel.com/cd/software/products/asmo-na/eng/compilers/219754.htm Intel C++ compiler] (Win32)&lt;br /&gt;
* [http://sdcc.sourceforge.net/ Small Device C Compiler (SDCC)]&lt;br /&gt;
* [http://www.digitalmars.com/d/dcompiler.html Digital Mars D]&lt;br /&gt;
* [http://dgcc.sourceforge.net/ GDC D Compiler]&lt;br /&gt;
* [http://dsource.org/projects/ldc/ LLVM D Compiler]&lt;br /&gt;
}}&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;[https://www.codeblocks.org/about.shtml The Code::Blocks team]&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;[[Special:Allpages|Index]]&amp;lt;/center&amp;gt;&lt;/div&gt;</summary>
		<author><name>Ollydbg</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=Developer_documentation&amp;diff=7735</id>
		<title>Developer documentation</title>
		<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php?title=Developer_documentation&amp;diff=7735"/>
		<updated>2014-04-08T02:29:06Z</updated>

		<summary type="html">&lt;p&gt;Ollydbg: /* Debugging C::B */  link to wx debug library&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Code::Blocks Documentation]]&lt;br /&gt;
[[Category:Developer Documentation]]&lt;br /&gt;
{{Layout_box2|1=&lt;br /&gt;
'''Official Code repository Subversion'''&amp;lt;br/&amp;gt;&lt;br /&gt;
* Web-interface by ViewVC: http://sourceforge.net/p/codeblocks/code/log/&lt;br /&gt;
* Subversion URL: &amp;lt;nowiki&amp;gt;svn://svn.code.sf.net/p/codeblocks/code/trunk&amp;lt;/nowiki&amp;gt; or &amp;lt;nowiki&amp;gt;http://svn.code.sf.net/p/codeblocks/code/trunk&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Mirror by biplab''' (Read-only; refreshed every 10 minutes.)&lt;br /&gt;
* Subversion URL: &amp;lt;nowiki&amp;gt;svn://cb.biplab.in/codeblocks/trunk&amp;lt;/nowiki&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
* Web-interface: http://cb.biplab.in/websvn/&lt;br /&gt;
* Git URL: git://cb.biplab.in/codeblocks.git&lt;br /&gt;
* Web-interface:http://cb.biplab.in/cgit/&lt;br /&gt;
&lt;br /&gt;
'''Mirror by Jens''' (Read-only; refreshed every 10 minutes.)&lt;br /&gt;
* Web-interface: http://cgit.jenslody.de/&lt;br /&gt;
* the above link contains many mirrors such as wxWidgets trunk, git mirror, and git mirror of codeblocks.github&lt;br /&gt;
&lt;br /&gt;
'''Mirror by Obf''' (Read-only; refreshed manually.)&lt;br /&gt;
* Web-interface: https://github.com/obfuscated/codeblocks_sf&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Articles for Code::Blocks developers.'''&lt;br /&gt;
&lt;br /&gt;
* '''&amp;lt;u&amp;gt;Documentation&amp;lt;/u&amp;gt;'''&lt;br /&gt;
:[https://www.codeblocks.org/manual.shtml User's manual] in various formats and languages.&lt;br /&gt;
:Also see http://developer.berlios.de/projects/codeblocks/ (under the downloads section).&lt;br /&gt;
:Checkout the SDK documentation at http://developer.berlios.de/project/showfiles.php?group_id=5358 as CHM file(s).&lt;br /&gt;
&lt;br /&gt;
* Compile the complete Code::Blocks from sources on '''[[Installing Code::Blocks from source on Windows|Windows]]''' and '''[[Installing Code::Blocks from source on Linux|Linux]]'''&lt;br /&gt;
&lt;br /&gt;
* '''[[Compile Code::Blocks plugins based on a nightly]]''' without the need to compile wxWidgets or the Code::Blocks core.&lt;br /&gt;
&lt;br /&gt;
* '''[http://launchpad.net/products/codeblocks/ Translation]'''&lt;br /&gt;
:Code::Blocks uses Launchpad to coordinate translation efforts.&lt;br /&gt;
&lt;br /&gt;
* '''[[Coding style]]'''&lt;br /&gt;
:The source code formatting style used in the Code::Blocks' source.&lt;br /&gt;
&lt;br /&gt;
* '''[[Creating a custom lexer for Code::Blocks editor]]'''&lt;br /&gt;
:How to add support for new syntax lighting schemes.&lt;br /&gt;
&lt;br /&gt;
* '''[[Creating a patch to submit to BerliOS (Patch Tracker)]]'''&lt;br /&gt;
:Creating a diff file and then submitting it to the patch tracker.&lt;br /&gt;
&lt;br /&gt;
* '''[[Unicode Standards]]'''&lt;br /&gt;
:Information about unicode standards and how unicode is handled in Code::Blocks' source code.&lt;br /&gt;
&lt;br /&gt;
* '''[[Various development tips]]'''&lt;br /&gt;
:List of various development tips for Code::Blocks.&lt;br /&gt;
&lt;br /&gt;
* '''[[Scripting Code::Blocks]]'''&lt;br /&gt;
:Information about scripting Code::Blocks with [http://www.squirrel-lang.org/ Squirrel].&lt;br /&gt;
&lt;br /&gt;
* '''[[A short overview about Code::Blocks architecture]]'''&lt;br /&gt;
:Information about the architecture of Code::Blocks.&lt;br /&gt;
&lt;br /&gt;
* '''[[Code::Blocks SDK events]]'''&lt;br /&gt;
:Information about the Code::Blocks SDK events and how to work with them.&lt;br /&gt;
&lt;br /&gt;
* '''[[File formats description]]'''&lt;br /&gt;
:Description of the format of each file Code::Blocks produces.&lt;br /&gt;
&lt;br /&gt;
* '''[[Version control]]'''&lt;br /&gt;
:Tips and trick for working with our version control system.&lt;br /&gt;
&lt;br /&gt;
== Plug-In development ==&lt;br /&gt;
&lt;br /&gt;
* [[Creating a simple &amp;quot;Hello World&amp;quot; plugin]]&lt;br /&gt;
* [[Creating a Plug-in which modifies CB's Menus]]&lt;br /&gt;
* [[Creating a plugin that actually does something]]&lt;br /&gt;
* [[Linking the plugin to a Nightly Build]]&lt;br /&gt;
* [[Managing Plug-in Resources]]&lt;br /&gt;
&lt;br /&gt;
* [[Research on doing a Plug-in for embedded help in CB]]&lt;br /&gt;
&lt;br /&gt;
* [[wxSmith extensions]]&lt;br /&gt;
* [[Code::Completion Rewrite]] and [[Code Completion plugin]] and [[Code Completion Design]]&lt;br /&gt;
&lt;br /&gt;
== Scripting ==&lt;br /&gt;
&lt;br /&gt;
Using scripting to extend Code::Blocks' functionality&lt;br /&gt;
&lt;br /&gt;
* [[Wizard scripts|Creating a new project wizard]]&lt;br /&gt;
&lt;br /&gt;
== Debugging C::B ==&lt;br /&gt;
&lt;br /&gt;
* When C::B crashed, it will generate a call-stack file &amp;quot;codeblocks.RPT&amp;quot;, at the crash point, this is a text file, you can open it, if your C::B contains the debug information, it will have file and line information about each call. If it is a stripped version, but you have the debug version of C::B, you can try to run the [/index.php/topic,13129.msg88254.html#msg88254 Debugging made easier], this is a address2line UI interface works under Windows.&lt;br /&gt;
* You can debug C::B under C::B (with the debugger plugin), also, you can link C::B to the debug version of wxWidgets library, so you can see whether a bug is located in C::B source code or wxWidgets' source code, see here: [/index.php/topic,17316.msg130972.html#msg130972 patch to build C::B against wx debug library]&lt;/div&gt;</summary>
		<author><name>Ollydbg</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=Code_Completion_Design&amp;diff=7727</id>
		<title>Code Completion Design</title>
		<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php?title=Code_Completion_Design&amp;diff=7727"/>
		<updated>2014-02-17T15:16:42Z</updated>

		<summary type="html">&lt;p&gt;Ollydbg: /* Usefull Links */ add parser links&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Developer Documentation]]&lt;br /&gt;
==How to build==&lt;br /&gt;
===Get the source code===&lt;br /&gt;
When you download the  svn source code of code::blocks,(see here [[Installing_Code::Blocks_from_source_on_Windows#Code::Blocks_sources]] the source code of CodeCompletion plugin was already included. &lt;br /&gt;
&lt;br /&gt;
Here is the screen shot when I opened the codecompletion source code in C::B's source navigator view.&lt;br /&gt;
&lt;br /&gt;
[[Image:Devcc1.png|300x300px| Code completion source tree opened in code::blocks]]&lt;br /&gt;
&lt;br /&gt;
===Build the code completion plug-in===&lt;br /&gt;
If you only want to build the Code Completion plug-in, you can select it in the &amp;quot;build target list&amp;quot; (Note: by default, the Build target option was &amp;quot;ALL&amp;quot;, which means all the targets in the current workspace will be build), see the screen shot below:&lt;br /&gt;
&lt;br /&gt;
[[Image:Buildcc.PNG|frame|none| Code completion build target option in code::blocks]]&lt;br /&gt;
&lt;br /&gt;
Don't forget to run the batch script file &amp;quot;update.bat&amp;quot; after you build the target, this procedure will update your output folder package and strip the debug information. See the wiki page [[Installing_Code::Blocks_from_source_on_Windows]] for more information.&lt;br /&gt;
&lt;br /&gt;
===A brief description of every project files===&lt;br /&gt;
From now on, we use '''CC''' as an abbreviation for '''code completion plug-in'''.&lt;br /&gt;
{|border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; style=&amp;quot;font-size: 100%; border: gray solid 1px; border-collapse: collapse; text-align: left; width: 100% table-layout: unfixed;&amp;quot; &lt;br /&gt;
|-&lt;br /&gt;
| ccdebuginfo.cpp || a dialog for debugging CC, can be opened by double click on the code browser tree entry with shift and ctrl key pressed &lt;br /&gt;
|- &lt;br /&gt;
| ccoptionsdlg.cpp|| code completion options dialog, can be opened by menu-&amp;gt;setting-&amp;gt;editor-&amp;gt;code completion and symbols browser&lt;br /&gt;
|-&lt;br /&gt;
| ccoptionsprjdlg.cpp|| setting the additional parser search path&lt;br /&gt;
|-&lt;br /&gt;
| classbrowser.cpp||viewing the symbols tree ctrl(token tree).&lt;br /&gt;
|-&lt;br /&gt;
| classbrowserbuilderthread.cpp|| a thread to build the class browser tree above&lt;br /&gt;
|-&lt;br /&gt;
| codecompletion.cpp ||The Main file need by code completion plug-in, maintain all the CC's GUI and native parser&lt;br /&gt;
|-&lt;br /&gt;
| insertclassmethoddlg.cpp|| a dialog to insert class method, can be open by context menu in editor&lt;br /&gt;
|-&lt;br /&gt;
| nativeparser.cpp||a class derived from wxEvtHandler, NativeParser class has a member variable &amp;quot;Parser m_Parser&amp;quot;;&lt;br /&gt;
|-&lt;br /&gt;
| selectincludefile.cpp|| select multiply matched token names before any jump to declaration or jump to implementation.&lt;br /&gt;
|-&lt;br /&gt;
|parser/parser.cpp|| Parser class was also derived from wxEvtHandler, can start batch parse... this class has member variables like :cbThreadPool m_Pool(which will create a thread from thread pool for each file need passed);TokenTree* m_pTokens(contains all the Token database);&lt;br /&gt;
|-&lt;br /&gt;
|parser/parserthread.cpp||will do the syntax analysis for every file in a project, it has a Tokenizer as member variable&lt;br /&gt;
|-&lt;br /&gt;
|parser/token.cpp|| definition of the &amp;quot;Token&amp;quot; class, and TokenTree(which means the Token dababase)&lt;br /&gt;
|-&lt;br /&gt;
|parser/tokenizer.cpp|| tokenizer will return every wxString it regard as a symbol by GetToken(), also do a replacement before return&lt;br /&gt;
|-&lt;br /&gt;
|parser/searchtree.cpp|| implement the patricia search tree using by TokenTree&lt;br /&gt;
|-&lt;br /&gt;
|Header files|| no description needed&lt;br /&gt;
|}&lt;br /&gt;
==Structure of CodeCompletion plugin==&lt;br /&gt;
[[Image:CodeCompletionPluginStructure.png| Code completion plugin Structure]]&lt;br /&gt;
&lt;br /&gt;
The above image show the main structure of our CodeCompletion plugins. The main class are:&lt;br /&gt;
* CodeCompletion: this is the class for main plugin), it handle event sent from the C::B core. Toolbar handling was done in this class.&lt;br /&gt;
* NativeParser: as a main member variable of the CodeCompletion class, this class is like the Parser manager class, it create/delete Parser instances when a project load/closed.&lt;br /&gt;
* Parser: this class is mainly for handling Tokens. Parser class hold a TokenTree which record all the Tokens. Parser class also hold a thread pool, it can either run the parsing task in the pool(this means the parsing task will be done in a separate thread), or directly by a function call.&lt;br /&gt;
* Parserthread: The class derived from the worker thread(cbThreadedTask class), it member function DoParse() is the function for parsing.&lt;br /&gt;
&lt;br /&gt;
Besides that, when trying to show the suggestion list(auto completion list, or code completion list), the NativeParser need to analyze the current the current statement structure, and query the symbol(token) information from the Tokentree, this is mostly done in ResolveExpression() member function.&lt;br /&gt;
&lt;br /&gt;
Some important note: when all Parserthread instances finish parsing job in the pool, the thread pool will send an event to its parent(in this case, it is the Parser class), so the Parser know that the parsing is done, or the Parser can assign another parsing jobs to the thread pool.&lt;br /&gt;
&lt;br /&gt;
==Low level parser(Lexical analysis, Tokenize)==&lt;br /&gt;
For someone haven't heard what does &amp;quot;Token&amp;quot; and &amp;quot;Tokenize&amp;quot; mean, you should read the wikibooks article [http://en.wikibooks.org/wiki/C%2B%2B_Programming/Compiler#Compilation A brief explain of what does a parser do] and [http://en.wikipedia.org/wiki/Lexical_analysis Tokenize on wikipedia]. Shortly, a Tokenizer regards your C++ or C source code as a large array of characters (sometimes, we call it a string), then this big string can be divided to small atomic strings----a '''token''' (Each token has a unique meanings and can't be divided into sub-strings. A token can be a symbol, an identifier, a keyword, a digital number, etc), meanwhile &amp;quot;white spaces&amp;quot; and &amp;quot;comments&amp;quot; were ignored by the Tokenizer.&lt;br /&gt;
&lt;br /&gt;
for a simple c++ program like below&lt;br /&gt;
&amp;lt;source lang = &amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
int main()&lt;br /&gt;
{&lt;br /&gt;
    std::cout &amp;lt;&amp;lt; &amp;quot;hello world&amp;quot; &amp;lt;&amp;lt; std::endl;&lt;br /&gt;
    return 0;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
After tokenizing, it should give these 15 tokens&lt;br /&gt;
&amp;lt;source lang = &amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
1 = string &amp;quot;int&amp;quot;&lt;br /&gt;
2 = string &amp;quot;main&amp;quot;&lt;br /&gt;
3 = opening parenthesis&lt;br /&gt;
4 = closing parenthesis&lt;br /&gt;
5 = opening brace&lt;br /&gt;
6 = string &amp;quot;std&amp;quot;&lt;br /&gt;
7 = namespace operator&lt;br /&gt;
8 = string &amp;quot;cout&amp;quot;&lt;br /&gt;
9 = &amp;lt;&amp;lt; operator&lt;br /&gt;
10 = string &amp;quot;&amp;quot;hello world&amp;quot;&amp;quot;&lt;br /&gt;
11 = string &amp;quot;endl&amp;quot;&lt;br /&gt;
12 = semicolon&lt;br /&gt;
13 = string &amp;quot;return&amp;quot;&lt;br /&gt;
14 = number 0&lt;br /&gt;
15 = closing brace&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Tokenizer class===&lt;br /&gt;
A class named '''Tokenizer''' was implemented in &amp;quot;tokenizer.h&amp;quot; and &amp;quot;tokenizer.cpp&amp;quot;. Seen from the Tokenizer's level, a token is just a [http://docs.wxwidgets.org/stable/wx_unicode.html unicode] wxString. There are several steps to run an instance of Tokenizer. &lt;br /&gt;
===preparing the big string===&lt;br /&gt;
From the previous section, you know the Tokenizer is just a string cutter. So, the first step is preparing the big string. The string can either be loaded from a source file or a memory buffer. Currently, the Unicode wxString is used.(since we are all using Unicode build of code::blocks, and ANSI mode is outdated and deprecated).&lt;br /&gt;
===Get or Peek a token===&lt;br /&gt;
'''Tokenizer''' contains a '''file position indicator'''----m_TokenIndex(see [http://en.wikipedia.org/wiki/Fopen File Open In C language]) pointing to the current position of string. So, you can '''Get''' a token or '''Peek''' a token. Here is the function prototype&lt;br /&gt;
&amp;lt;source lang = &amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
    //Get the current token string started from m_TokenIndex, &lt;br /&gt;
    //After that, increase the m_Tokenindex&lt;br /&gt;
    wxString GetToken();&lt;br /&gt;
&lt;br /&gt;
    //Peak the current token string and but do *NOT* increase the m_TokenIndex&lt;br /&gt;
    wxString PeekToken();&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For example, if the Tokenizer parses the example code above, you can see how these two methods work.&lt;br /&gt;
&lt;br /&gt;
*After initializing the Tokenizer(preparing the big string), You firstly call the GetToken() function, which will return the first token &amp;quot;int&amp;quot; and increase the m_TokenIndex one step to &amp;quot;int&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
*Then, if you call the PeekToken(), which will return a token &amp;quot;main&amp;quot;, but the tokenindex was still remaining point to &amp;quot;int&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
*If you call the GetToken() again, it will return a &amp;quot;main&amp;quot; immediately and increase the file pointer to &amp;quot;main&amp;quot;. &lt;br /&gt;
&lt;br /&gt;
Note: Internally, the Tokenizer class use a '''undo and peek cache''' to do the trick. Once a token is peeked, it is saved in '''m_Peek''' member, so, next time you call GetToken(), it just immediately return the cached value without calling the &amp;quot;DoGetToken()&amp;quot; procedure again. &lt;br /&gt;
&lt;br /&gt;
[[Image:Cb token cache.png]]&lt;br /&gt;
&lt;br /&gt;
===Nested Value of braces===&lt;br /&gt;
As you know, braces are exist in pairs, such as &amp;quot;{&amp;quot; and &amp;quot;}&amp;quot;, or &amp;quot;[&amp;quot; and &amp;quot;]&amp;quot;, Also, these braces can be embeded. So the Tokenizer keep a value '''m_NestLevel''' to indicate how deep you stays. If the Tokenizer meets a '''{''', it will increase the nestValue, and if it meets a '''}''', it will decrease the m_NestLevel. See the pseudo code in Tokenizer.cpp below:&lt;br /&gt;
&amp;lt;source lang = &amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
        if (CurrentChar() == '{')&lt;br /&gt;
            ++m_NestLevel;&lt;br /&gt;
        else if (CurrentChar() == '}')&lt;br /&gt;
            --m_NestLevel;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===SkipUnwanted tokens===&lt;br /&gt;
A '''bool''' member variable '''m_SkipUnwantedTokens''' determines whether a regular assignments statement will be omitted or not. For example, a piece of code below:&lt;br /&gt;
&amp;lt;source lang = &amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
a = b + c;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If m_SkipUnwantedTokens == true, then once SkipUnwanted() meets the &amp;quot;=&amp;quot; symbol, it will go on skipping every characters until it meets ''',''' or ''';''' or '''}''', so this statement will be omitted by the Tokenizer. &lt;br /&gt;
&lt;br /&gt;
Sometimes, this behavior becomes a nightmare when parsing the statement like default argument in template. Or the default arguments in function.&lt;br /&gt;
&amp;lt;source lang = &amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
// assignment statement in template arguments&lt;br /&gt;
template&amp;lt;class T = int&amp;gt; &lt;br /&gt;
class abc {&lt;br /&gt;
 T m_a;&lt;br /&gt;
 ......&lt;br /&gt;
 ......&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// assignment statement in function arguments&lt;br /&gt;
&lt;br /&gt;
void foo( int arg1 = 60 )&lt;br /&gt;
{&lt;br /&gt;
    bla bla;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
If the Tokenizer finds that an equation sign '''=''', it will skip any character until it meets a '''}''', so, the class declaration or function body will be totally skipped in the unexpected way. In this case, we should manually '''disable''' this functionality by setting m_SkipUnwantedTokens = false to let the Tokenizer parse these statements correctly.&lt;br /&gt;
&lt;br /&gt;
That's why you will see many situations when you enter a function, you should save the m_SkipUnwantedTokens statues and disabled it, when you leave a function, you should manually restore it.(See function implementation in ParseThread.cpp)&lt;br /&gt;
&lt;br /&gt;
===Return a correct token, Macro replacement===&lt;br /&gt;
Special token should be replaced for parsing correctly. For example, in the standard c++ header (mingw), there are a string named &amp;quot;_GLIBCXX_STD&amp;quot;, this should be replaced to &amp;quot;std&amp;quot;. See the dialog below.&lt;br /&gt;
&lt;br /&gt;
[[Image:Cc std replacement.png|400x400px|]]&lt;br /&gt;
&lt;br /&gt;
The inline function in the Tokenizer class will check whether a token should be replaced before return. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang = &amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
wxString Tokenizer::MacroReplace(const wxString str)&lt;br /&gt;
{&lt;br /&gt;
    wxStringHashMap::const_iterator it = s_Replacements.find(str);&lt;br /&gt;
&lt;br /&gt;
    if (it != s_Replacements.end())&lt;br /&gt;
    {&lt;br /&gt;
        // match one!&lt;br /&gt;
        wxString key   = it-&amp;gt;first;&lt;br /&gt;
        wxString value = it-&amp;gt;second;&lt;br /&gt;
        TRACE(_T(&amp;quot;MacroReplace() : Replacing '%s' with '%s' (file='%s').&amp;quot;), key.wx_str(), value.wx_str(), m_Filename.wx_str());&lt;br /&gt;
        if (value[0]=='+' &amp;amp;&amp;amp; CurrentChar()=='(')&lt;br /&gt;
        {&lt;br /&gt;
            unsigned int start = m_TokenIndex;&lt;br /&gt;
            m_Buffer[start] = ' ';&lt;br /&gt;
            bool fillSpace = false;&lt;br /&gt;
            while (m_Buffer[start]!=')')&lt;br /&gt;
            {&lt;br /&gt;
                if (m_Buffer[start]==',')&lt;br /&gt;
                    fillSpace = true;&lt;br /&gt;
&lt;br /&gt;
                if (fillSpace==true)&lt;br /&gt;
                    m_Buffer[start]=' ';&lt;br /&gt;
&lt;br /&gt;
                start++;&lt;br /&gt;
            }&lt;br /&gt;
            m_Buffer[start] = '{';&lt;br /&gt;
            return value.Remove(0,1);&lt;br /&gt;
        }&lt;br /&gt;
        else if (value[0] == '-')&lt;br /&gt;
        {&lt;br /&gt;
            unsigned int lenKey = key.Len();&lt;br /&gt;
            value = value.Remove(0,1);&lt;br /&gt;
            unsigned int lenValue = value.Len();&lt;br /&gt;
&lt;br /&gt;
            for (unsigned int i=1; i&amp;lt;=lenKey; i++)&lt;br /&gt;
            {&lt;br /&gt;
                if (i &amp;lt; lenValue)&lt;br /&gt;
                    m_Buffer[m_TokenIndex-i] = value[lenValue-i];&lt;br /&gt;
                else&lt;br /&gt;
                    m_Buffer[m_TokenIndex-i] = ' ';&lt;br /&gt;
            }&lt;br /&gt;
&lt;br /&gt;
            int firstSpace = value.First(' ');&lt;br /&gt;
            // adjust m_TokenIndex&lt;br /&gt;
            m_TokenIndex = m_TokenIndex - lenValue + firstSpace;&lt;br /&gt;
&lt;br /&gt;
            return value.Mid(0,firstSpace);&lt;br /&gt;
        }&lt;br /&gt;
        else&lt;br /&gt;
            return value;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    return str;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:Cc replace dialog.png|400x400px|none| Code completion build target option in code::blocks]]&lt;br /&gt;
&lt;br /&gt;
Setting the replacement mapping. Note that before return a token, a replacement map was searched to check if it matches any entry in the map, so, the bigger this map goes, the slower it will do parsing.&lt;br /&gt;
&lt;br /&gt;
Note: Code Completion plug-in is not a preprocessor, so it is difficult to deal with the source mixed with many macro, or some strange macros. This is something like Ctags' replacement options &amp;quot;?I identifier?list&amp;quot; in [http://ctags.sourceforge.net/ctags.html#OPERATIONAL%20DETAILS ctags option detial] or [http://codelite.org/LiteEditor/FAQ Code Completion macro FAQ]&lt;br /&gt;
&lt;br /&gt;
For discussion of Ctags, the related thread is [/index.php/topic,10564.msg72424.html#msg72424 Re: namespaces and code completion] and [/index.php/topic,11187.msg77135.html#msg77135 Re: New code completion remarks/issues]&lt;br /&gt;
&lt;br /&gt;
===replacement rules===&lt;br /&gt;
====directly replacement AAAAA -&amp;gt; BBBBB====&lt;br /&gt;
You can define a rule:&lt;br /&gt;
AAAAA -&amp;gt; BBBBB&lt;br /&gt;
&lt;br /&gt;
Which means, if the tokenizer meet a string &amp;quot;AAAAA&amp;quot;, then it will returned a string &amp;quot;BBBBB&amp;quot;&lt;br /&gt;
==== AAAAA -&amp;gt; +BBBBB====&lt;br /&gt;
For example, when &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang = &amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
_GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D)&lt;br /&gt;
&lt;br /&gt;
  /// See bits/stl_deque.h's _Deque_base for an explanation.&lt;br /&gt;
  template&amp;lt;typename _Tp, typename _Alloc&amp;gt;&lt;br /&gt;
    struct _Vector_base&lt;br /&gt;
    {&lt;br /&gt;
      typedef typename _Alloc::template rebind&amp;lt;_Tp&amp;gt;::other _Tp_alloc_type;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    ......&lt;br /&gt;
&lt;br /&gt;
_GLIBCXX_END_NESTED_NAMESPACE&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We should replace the string &amp;quot;_GLIBCXX_BEGIN_NESTED_NAMESPACE(std, _GLIBCXX_STD_D)&amp;quot; &lt;br /&gt;
to &amp;quot;namespace std {&amp;quot;, here, we introduce two replacement rules:&lt;br /&gt;
{|border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; style=&amp;quot;font-size: 100%; border: gray solid 1px; border-collapse: collapse; text-align: left; width: 100% table-layout: unfixed;&amp;quot; &lt;br /&gt;
|-&lt;br /&gt;
| _GLIBCXX_BEGIN_NESTED_NAMESPACE || +namespace&lt;br /&gt;
|-&lt;br /&gt;
| _GLIBCXX_END_NESTED_NAMESPACE  || }&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
In this rule, we firstly replace the &amp;quot;_GLIBCXX_BEGIN_NESTED_NAMESPACE&amp;quot; with the &amp;quot;namespace&amp;quot;, then, we reserve the &amp;quot;std&amp;quot;, and change the closing parenthesis to an opening brace. (See the image above), also, every token string &amp;quot;_GLIBCXX_END_NESTED_NAMESPACE&amp;quot; will be replaced by &amp;quot;}&amp;quot;. &lt;br /&gt;
[[File:CCreplacement_rule.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
So, the code becomes to like below:&lt;br /&gt;
&amp;lt;source lang = &amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
namespace     std   {&lt;br /&gt;
&lt;br /&gt;
  /// See bits/stl_deque.h's _Deque_base for an explanation.&lt;br /&gt;
  template&amp;lt;typename _Tp, typename _Alloc&amp;gt;&lt;br /&gt;
    struct _Vector_base&lt;br /&gt;
    {&lt;br /&gt;
      typedef typename _Alloc::template rebind&amp;lt;_Tp&amp;gt;::other _Tp_alloc_type;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
    ......&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
==== AAAAA -&amp;gt; -BBBBB====&lt;br /&gt;
&lt;br /&gt;
For example, when &lt;br /&gt;
&amp;lt;source lang = &amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
_GLIBCXX_BEGIN_NAMESPACE_TR1&lt;br /&gt;
...&lt;br /&gt;
...&lt;br /&gt;
_GLIBCXX_END_NAMESPACE_TR1&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We should replace the string &amp;quot;_GLIBCXX_BEGIN_NAMESPACE_TR1&amp;quot; &lt;br /&gt;
to &amp;quot;namespace tr1 {&amp;quot;, here, we introduce two replacement rules:&lt;br /&gt;
{|border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; style=&amp;quot;font-size: 100%; border: gray solid 1px; border-collapse: collapse; text-align: left; width: 100% table-layout: unfixed;&amp;quot; &lt;br /&gt;
|-&lt;br /&gt;
| _GLIBCXX_BEGIN_NAMESPACE_TR1 || -namespace tr1 {&lt;br /&gt;
|-&lt;br /&gt;
| _GLIBCXX_END_NAMESPACE_TR1  || }&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
In this rule, we firstly replace the &amp;quot;_GLIBCXX_BEGIN_NAMESPACE_TR1&amp;quot; with the &amp;quot;namespace&amp;quot;, then, add aditional string &amp;quot;tr1 {&amp;quot;&lt;br /&gt;
&lt;br /&gt;
So, the code becomes:&lt;br /&gt;
&amp;lt;source lang = &amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
namespace tr1 {&lt;br /&gt;
...&lt;br /&gt;
...&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== AAAAA -&amp;gt; *====&lt;br /&gt;
In this case, we call it a &amp;quot;strip the next &amp;quot;(&amp;quot; and &amp;quot;)&amp;quot; rule. for example:&lt;br /&gt;
&lt;br /&gt;
The rule syntax is:&lt;br /&gt;
&lt;br /&gt;
XXXXXX  -&amp;gt; *&lt;br /&gt;
&lt;br /&gt;
For example, In the source code below:&lt;br /&gt;
&amp;lt;source lang = &amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
CVAPI(void) cvFxxxx();&lt;br /&gt;
CVAPI(cvMat *) cvFyyy();&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
will become to (if I add a replacement rule  CVAPI -&amp;gt; *)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang = &amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
void cvFxxxx();&lt;br /&gt;
cvMat * cvFyyy();&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==High level parser(Syntax Analysis)==&lt;br /&gt;
This is the main flow of a parser.&lt;br /&gt;
&lt;br /&gt;
[[Image:Parser_Flow.gif]]&lt;br /&gt;
===parser thread===&lt;br /&gt;
Basically, we can say, the low level parser(Tokenizer) moves its pointer character by character, and return a wxString(token) to feed the high level parser(Syntax analyzer).All the syntax analysis was done in ParserThread. A thread must be created to parse a source file. see parserthread.cpp and parserthread.h, a thread will be allocated from thread pool. For example, a file contains these statement:&lt;br /&gt;
&amp;lt;source lang = &amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
    void  f1();&lt;br /&gt;
    int   f2(char c);&lt;br /&gt;
    float f3(void * p);&lt;br /&gt;
    int   f1;&lt;br /&gt;
    double f2;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
After the ParserThread finished its parsing, it will recognize five tokens, which has the keyword &amp;quot;f1&amp;quot;,&amp;quot;f2&amp;quot; and &amp;quot;f3&amp;quot;, note, tokens can have the same names, but they differ from different types( variables, functions...).&lt;br /&gt;
&lt;br /&gt;
===Token class===&lt;br /&gt;
How can a large number of tokens be recorded? A '''Token'''(note: it as a capital means it's class type) class was introduced to recorded every token. For boosting the speed of allocating Tokens, the &amp;quot;new&amp;quot; and &amp;quot;delete&amp;quot; operator were overloaded in its base class BlockAllocated. See the [http://en.wikipedia.org/wiki/Memory_pool memory pool] page on wikipedia as a reference.&lt;br /&gt;
&amp;lt;source lang = &amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
class Token  : public BlockAllocated&amp;lt;Token, 10000&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
        ......&lt;br /&gt;
        wxString m_Type; // this is the return value (if any): e.g. const wxString&amp;amp;&lt;br /&gt;
        wxString m_ActualType; // this is what the parser believes is the actual return value: e.g. wxString&lt;br /&gt;
        wxString m_Name;&lt;br /&gt;
        wxString m_Args;&lt;br /&gt;
        wxString m_AncestorsString; // all ancestors comma-separated list&lt;br /&gt;
        unsigned int m_File;&lt;br /&gt;
        unsigned int m_Line;&lt;br /&gt;
        unsigned int m_ImplFile;&lt;br /&gt;
        unsigned int m_ImplLine; // where the token was met&lt;br /&gt;
        unsigned int m_ImplLineStart; // if token is impl, opening brace line&lt;br /&gt;
        unsigned int m_ImplLineEnd; // if token is impl, closing brace line&lt;br /&gt;
        TokenScope m_Scope;&lt;br /&gt;
        TokenKind m_TokenKind;&lt;br /&gt;
        bool m_IsOperator;&lt;br /&gt;
        bool m_IsLocal; // found in a local file?&lt;br /&gt;
        bool m_IsTemp; // if true, the tree deletes it in FreeTemporaries()&lt;br /&gt;
        bool m_IsConst;    // the member method is const (yes/no)&lt;br /&gt;
&lt;br /&gt;
        int m_ParentIndex;&lt;br /&gt;
        TokenIdxSet m_Children;&lt;br /&gt;
        TokenIdxSet m_Ancestors;&lt;br /&gt;
        TokenIdxSet m_DirectAncestors;&lt;br /&gt;
        TokenIdxSet m_Descendants;&lt;br /&gt;
        ......&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
You can see the Token class contains all the information needed for recording its locating, its type or class derived hierarchy... &lt;br /&gt;
&lt;br /&gt;
For example, in the source code in[Low level parser(Lexical analysis)]. A Token for &amp;quot;main&amp;quot; should contains it's name (obviously , m_Name=&amp;quot;main&amp;quot; ), then m_File will record which file dose this Token exist. m_Line will give the line number of &amp;quot;main&amp;quot; in this source file, and so on.&lt;br /&gt;
&lt;br /&gt;
===Memory Pool--BlockAllocated class===&lt;br /&gt;
In BlockAllocated class, there is only a static member say &amp;quot;static BlockAllocator&amp;lt;T, pool_size, debug&amp;gt; allocator;&amp;quot; to keep all the pre-allocated memory for all derived class.&lt;br /&gt;
&lt;br /&gt;
'''10000''' means a pool of 10000 Tokens were allocated in the memory pool, so, dynamically allocate a Token object will be fast and efficient. &lt;br /&gt;
&lt;br /&gt;
[[Image:Cb blockalloc.png|frame|none|  Operator new overloading for fast allocate in the heap]]&lt;br /&gt;
&lt;br /&gt;
===ParserThread===&lt;br /&gt;
The function Parse() will do the most job of syntax analysis. See the pseudo code below.&lt;br /&gt;
&amp;lt;source lang = &amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
ParserThread::Parse()&lt;br /&gt;
{&lt;br /&gt;
   ......&lt;br /&gt;
   do&lt;br /&gt;
    {&lt;br /&gt;
        ......&lt;br /&gt;
        DoParse();&lt;br /&gt;
        ......&lt;br /&gt;
 &lt;br /&gt;
        &lt;br /&gt;
    }while(false);&lt;br /&gt;
&lt;br /&gt;
    return result;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the DoParse(), it checks the token from Tokenizer. For example, if the token words = &amp;quot;enum&amp;quot;, then, the ParserThread::HandleEnum() will do the job to parse this enum block.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===A simple look ahead parser===&lt;br /&gt;
We can explain a little about it parser, the member variable '''m_Str''' of class ParserThread will be considered as a '''type stack''', for example, we want to parse the statement below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang = &amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
symbolA symbolB symbolC symbolD;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Only symbolD can be recognized as a variable, and it has a type of &amp;quot;symbolA symbolB symbolC&amp;quot;. When the parser meets each symbol, it will look ahead to see the next token is whether &amp;quot;;&amp;quot;, if not, the current token will '''pushed''' to m_Str. These iteration will be ended when the parser look ahead one step from symbolD and find the next token is a &amp;quot;;&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
===DoParse Examples===&lt;br /&gt;
====Handling class declaration====&lt;br /&gt;
The main routing of handling class was in &lt;br /&gt;
ParserThread::HandleClass function&lt;br /&gt;
If the parserThread meet these statement&lt;br /&gt;
&amp;lt;source lang = &amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
class AAA{&lt;br /&gt;
    int m_a;&lt;br /&gt;
    int m_b;&lt;br /&gt;
} ;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
It will surely add a Token of &amp;quot;AAA&amp;quot;, it's type is &amp;quot;class&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
What about these statements&lt;br /&gt;
&amp;lt;source lang = &amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
class AAA{&lt;br /&gt;
    int m_a;&lt;br /&gt;
    int m_b;&lt;br /&gt;
} x,y,z;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
The parserThread should firstly add a Token &amp;quot;AAA&amp;quot;, then it should regard &amp;quot;x&amp;quot;, &amp;quot;y&amp;quot;, &amp;quot;z&amp;quot; are three variables of type &amp;quot;AAA&amp;quot;. This was done by &amp;quot;ReadVarNames()&amp;quot; function, it will read every comma separated variables after a class declaration.&lt;br /&gt;
&lt;br /&gt;
====Handling typedef statement====&lt;br /&gt;
Sometimes, you can see these code blocks:&lt;br /&gt;
&amp;lt;source lang = &amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
typedef class AAA{&lt;br /&gt;
    int m_a;&lt;br /&gt;
    int m_b;&lt;br /&gt;
} BBB,CCC;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
If the parser meets the keyword &amp;quot;typedef&amp;quot;, firstly it set the &amp;quot;m_ParsingTypedef = ture&amp;quot; to indicate that we are parsing a typedef statement.&lt;br /&gt;
&lt;br /&gt;
Next, it meets a keyword &amp;quot;class&amp;quot;, which also indicate it is a class declaration. So, the HandleClass function will do the task. A Token of &amp;quot;class AAA&amp;quot; will be added to the TokenTree. Wait a minute, how can we deal with &amp;quot;BBB&amp;quot; and &amp;quot;CCC&amp;quot;, this is not the same case as previous code, we can't regard &amp;quot;BBB&amp;quot;,&amp;quot;CCC&amp;quot; as variables. In this case, another function &amp;quot;ReadClsName()&amp;quot; will be called. For simplicity of TokenTree, we just regard &amp;quot;BBB&amp;quot; and &amp;quot;CCC&amp;quot; as derived class of &amp;quot;AAA&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
How does the parserThread know between these two cases. Here is the code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang = &amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
                if (m_ParsingTypedef)&lt;br /&gt;
                {&lt;br /&gt;
                    m_Str.Clear();&lt;br /&gt;
                    ReadClsNames(newToken-&amp;gt;m_Name);&lt;br /&gt;
                    // m_ParsingTypedef = false;&lt;br /&gt;
                    break;&lt;br /&gt;
&lt;br /&gt;
                }&lt;br /&gt;
                else&lt;br /&gt;
                {&lt;br /&gt;
                    m_Str = newToken-&amp;gt;m_Name;&lt;br /&gt;
                    ReadVarNames();&lt;br /&gt;
                    m_Str.Clear();&lt;br /&gt;
                    break;&lt;br /&gt;
                }&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
That's the whole thing I would like to write about handling class and handling typedef.&lt;br /&gt;
&lt;br /&gt;
==TokenTree&amp;amp;SearchTree==&lt;br /&gt;
Maybe, you would ask a question: where do these Tokens store? The answer is that all the Tokens will be recorded in &amp;quot;TokenTree class&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
When a certain Token is identified(whether it's a global variable, a class declaration, a class member function, and so on), it will be inserted to a database(TokenTree). &lt;br /&gt;
&lt;br /&gt;
Furthermore, for fast Token query, Tokens should be sorted by it's wxString m_Name member; &lt;br /&gt;
&lt;br /&gt;
A '''compact Patricia tree'''(see the wikipedia [http://en.wikipedia.org/wiki/Radix_tree Patricia tree on wikipedia]) is built to hold all their names. &lt;br /&gt;
&lt;br /&gt;
For example, If you add three item to the TokenTree.&lt;br /&gt;
&amp;lt;source lang = &amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
    mytree-&amp;gt;AddItem(_T(&amp;quot;physics&amp;quot;),_T(&amp;quot;1 - uno&amp;quot;));&lt;br /&gt;
    mytree-&amp;gt;AddItem(_T(&amp;quot;physiology&amp;quot;),_T(&amp;quot;2 - dos&amp;quot;));&lt;br /&gt;
    mytree-&amp;gt;AddItem(_T(&amp;quot;psychic&amp;quot;),_T(&amp;quot;3 - tres&amp;quot;));&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The Patricia tree structure will show as below, the edge of a tree contains a &amp;quot;label string&amp;quot; and the number in parentheses refers to a node Id.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang = &amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
- &amp;quot;&amp;quot; (0)&lt;br /&gt;
      \- &amp;quot;p&amp;quot; (4)&lt;br /&gt;
              +- &amp;quot;hysi&amp;quot; (2)&lt;br /&gt;
              |          +- &amp;quot;cs&amp;quot; (1)&lt;br /&gt;
              |          \- &amp;quot;ology&amp;quot; (3)&lt;br /&gt;
              \- &amp;quot;sychic&amp;quot; (5)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
===Animation of Patricia tree===&lt;br /&gt;
A web page gives an animation of building a Patricia tree, you can see how the tree node added. See here [http://bootstrapping.wordpress.com/2008/01/24/prefix-searching-with-radix-tree/ Prefix searching with Radix Tree]&lt;br /&gt;
&lt;br /&gt;
A better animation demo of Patricia tree can be found in [http://people.cis.ksu.edu/%7Erhowell/viewer/viewer.html Search Tree Viewer]. In this page, you can select the tree type, and enter some strings, then the tree will dynamically show in the window.&lt;br /&gt;
&lt;br /&gt;
===SearchTree Node===&lt;br /&gt;
A Node should contains at least several essential element. They are:&lt;br /&gt;
# An edge: in the image below, the gray filled area shows a Node, since each edge belong to the next node, for example, the Node has an edge &amp;quot;abcd&amp;quot;.&lt;br /&gt;
# SearchTreeItemMap: because our searchTree is a compact Patricia tree which means an edge contains many items. Such as, &amp;quot;ab&amp;quot; , &amp;quot;abc&amp;quot;, &amp;quot;abcd&amp;quot; all the suffix string belong to the edge &amp;quot;abcd&amp;quot; &lt;br /&gt;
# SearchTreeLinkMap: This is an associated container map&amp;lt;wxChar,NodeId&amp;gt;, which store all &amp;quot;pointers&amp;quot; to its child Node. In the example below, &amp;quot;e&amp;quot; points to a Node of &amp;quot;efg&amp;quot;, while &amp;quot;x&amp;quot; points to &amp;quot;xyz&amp;quot;.&lt;br /&gt;
# Node depth: depth of Search Tree Node is defined by the string length from the &amp;quot;root node&amp;quot;. See a depth of each node on the search tree above. For example, the Node of &amp;quot;hysi&amp;quot; has a m_Depth = 5 (&amp;quot;&amp;quot; + &amp;quot;p&amp;quot; + &amp;quot;hysi&amp;quot; = 5).&lt;br /&gt;
&lt;br /&gt;
===Node Lable===&lt;br /&gt;
For example, the node &amp;quot;hysi&amp;quot; (2) has two children, they are &amp;quot;cs&amp;quot; (1) and &amp;quot;ology&amp;quot; (3), show below.&lt;br /&gt;
&lt;br /&gt;
[[Image:Cb tree node lable.png]]&lt;br /&gt;
&lt;br /&gt;
For more information, see the forum discussion here. [/index.php/topic,1696.0.html rickg22's SearchTree development] as a reference.&lt;br /&gt;
&lt;br /&gt;
===How a new item is added to the tree===&lt;br /&gt;
When you add a new key (string) to the tree, some node should be splited, and new node need to be added. For example [/index.php/topic,1696.msg12617.html#msg12617 this post]show some details.&lt;br /&gt;
&lt;br /&gt;
Suppose we have two nodes in the tree, the node id is 0 (root node) and 1, the tree hold only one key string(item) &amp;quot;physics&amp;quot;:&lt;br /&gt;
&amp;lt;source lang = &amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
Adding word: physics&lt;br /&gt;
1 items in the tree&lt;br /&gt;
- &amp;quot;&amp;quot; (0)&lt;br /&gt;
      \- &amp;quot;physics&amp;quot; (1)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Now, if another key string &amp;quot;physiology&amp;quot; is added to the tree, we now firstly check &amp;quot;physiology&amp;quot; is already in the tree, if not, we need to find the common string &amp;quot;physi&amp;quot;, so the node 1 should be splited after the common string, so you get the following result.&lt;br /&gt;
&amp;lt;source lang = &amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
Adding word: physiology&lt;br /&gt;
2 items in the tree&lt;br /&gt;
- &amp;quot;&amp;quot; (0)&lt;br /&gt;
      \- &amp;quot;physi&amp;quot; (2)&lt;br /&gt;
                  +- &amp;quot;cs&amp;quot; (1)&lt;br /&gt;
                  \- &amp;quot;ology&amp;quot; (3)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Here, the middle node &amp;quot;physi&amp;quot; is added. the original node 1's lable is shorten to &amp;quot;cs&amp;quot;, and a new node &amp;quot;ology&amp;quot; is added as a new child node to the middle node.&lt;br /&gt;
&lt;br /&gt;
In the other case, the new added item does not cause a new node to be added to the tree, only a node need to be extended by its ledge. For example:&lt;br /&gt;
&amp;lt;source lang = &amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
6 items in the tree&lt;br /&gt;
- &amp;quot;&amp;quot; (0)&lt;br /&gt;
      \- &amp;quot;p&amp;quot; (4)&lt;br /&gt;
              +- &amp;quot;aranormal&amp;quot; (8)&lt;br /&gt;
              +- &amp;quot;hysi&amp;quot; (2)&lt;br /&gt;
              |          +- &amp;quot;cs&amp;quot; (1)&lt;br /&gt;
              |          \- &amp;quot;ology&amp;quot; (3)&lt;br /&gt;
              \- &amp;quot;sych&amp;quot; (6)&lt;br /&gt;
                         +- &amp;quot;i&amp;quot; (9)&lt;br /&gt;
                         |       +- &amp;quot;atrist&amp;quot; (10)&lt;br /&gt;
                         |       \- &amp;quot;cs&amp;quot; (5)&lt;br /&gt;
                         \- &amp;quot;otic&amp;quot; (7)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Now, you add a new item &amp;quot;psychiatrists&amp;quot;, pay attention to the node 10 in the above tree, we have already an item &amp;quot;psychiatrist&amp;quot;, when the new item &amp;quot;psychiatrists&amp;quot; is added, we can just extend the node 10's edge from &amp;quot;artrist&amp;quot; to &amp;quot;artrists&amp;quot;, thus no new node is needed.&lt;br /&gt;
&amp;lt;source lang = &amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
7 items in the tree&lt;br /&gt;
- &amp;quot;&amp;quot; (0)&lt;br /&gt;
      \- &amp;quot;p&amp;quot; (4)&lt;br /&gt;
              +- &amp;quot;aranormal&amp;quot; (8)&lt;br /&gt;
              +- &amp;quot;hysi&amp;quot; (2)&lt;br /&gt;
              |          +- &amp;quot;cs&amp;quot; (1)&lt;br /&gt;
              |          \- &amp;quot;ology&amp;quot; (3)&lt;br /&gt;
              \- &amp;quot;sych&amp;quot; (6)&lt;br /&gt;
                         +- &amp;quot;i&amp;quot; (9)&lt;br /&gt;
                         |       +- &amp;quot;atrists&amp;quot; (10)&lt;br /&gt;
                         |       \- &amp;quot;cs&amp;quot; (5)&lt;br /&gt;
                         \- &amp;quot;otic&amp;quot; (7)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Note that now, the node 20 now contains two items. It is a map (depth -&amp;gt; item).&lt;br /&gt;
&amp;lt;source lang = &amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
depth -&amp;gt; item&lt;br /&gt;
12    -&amp;gt; &amp;quot;psychiatrist&amp;quot;&lt;br /&gt;
13    -&amp;gt; &amp;quot;psychiatrists&amp;quot;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===How to query a Token by a keyword===&lt;br /&gt;
The parser collect all the Token information, and stored them in the TokenTree, the GUI function can query keywords from the database to show function tips or to build a Class Browser tree.&lt;br /&gt;
&lt;br /&gt;
For example, if you want to find all the Tokens named &amp;quot;ab&amp;quot;. In the picture above from TokenDatabase(TokenTree). we can search on the Patricia tree containing all the Tokens names, finaly, we find a tree node with a edge &amp;quot;abcd&amp;quot;. So, &amp;quot;ab&amp;quot; is in it's Node's items list. Then, we can find a TokenIdxSet in a vector&amp;lt;TokenIdxSet&amp;gt;, this TokenIdxSet has all the index named by &amp;quot;ab&amp;quot;, so, we can get the result like: There are many Tokens named &amp;quot;ab&amp;quot;.Token &amp;quot;ab&amp;quot; may be a member varialbe name in a class, or a global function name...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang = &amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
ClassA::ab&lt;br /&gt;
ClassB::ab&lt;br /&gt;
void ab()&lt;br /&gt;
....&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:CCTokenTree1.png]]&lt;br /&gt;
&lt;br /&gt;
==Flexible Parser structure==&lt;br /&gt;
The Parser class( in Parser.cpp and Parser.h ) has re-factored to support every project associate with a Parser object (svn revision &amp;gt; 6268 ). Which means: One Parser object per project, so, every project (xxx.cbp) will hold its own Token macro defines and Token trees. &lt;br /&gt;
&lt;br /&gt;
Due to the new introduced conditional preprocessor handling mechanism, the same source file may give different Tokens due to the different macro defines in different project. Also, CC support parsing on the files which does not belong to any project. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
#You open a project in CB, then all the files belong to the project( related to the project) will be parsed in CC.&lt;br /&gt;
#Now, you open another file( we call it a &amp;quot;separate file&amp;quot; later) which is not belong to the current project nor any other opened project.&lt;br /&gt;
#Then the CC will create a &amp;quot;temporary parser&amp;quot; named &amp;quot;NONE“ parser, and add this separate file to the &amp;quot;NONE&amp;quot; parser.&lt;br /&gt;
#So, you can still see the class tree when viewing the separate file.&lt;br /&gt;
#Once you close this separate file,  the &amp;quot;NONE&amp;quot; parser will automatically be removed.&lt;br /&gt;
&lt;br /&gt;
The main idea is: Now, We can let the CC do parse on some separate files&lt;br /&gt;
and support class browsing in Symbol browser.&lt;br /&gt;
&lt;br /&gt;
==Automatic Code Completion==&lt;br /&gt;
===Find the search scope===&lt;br /&gt;
&lt;br /&gt;
[[Image:CC SearchScope.png]]&lt;br /&gt;
&lt;br /&gt;
For example, when you are editing, and the caret position was located at &amp;quot;E&amp;quot; as shown in the above image, the first thing doing an automatic code completion is find the '''search scope'''.&lt;br /&gt;
&lt;br /&gt;
Here are some steps to get the initial(first) search scope:&lt;br /&gt;
&lt;br /&gt;
*First, you need to correct all the &amp;quot;using namespace XXXX&amp;quot; directives at the beginning the the current source file.(labeled with &amp;quot;A&amp;quot;), this means all the child tokens of &amp;quot;namespace Scintilla&amp;quot; should be searched.&lt;br /&gt;
*Secondly, find the function body where the current caret position locates. eg, the above code, the caret is in the &amp;quot;RunStyles::RunFromPosition()&amp;quot; function, so the function parameter variable &amp;quot;position&amp;quot;(labeled with &amp;quot;C&amp;quot; and the local variable &amp;quot;run&amp;quot; (labeled as &amp;quot;D&amp;quot;) is also a matching Tokens.&lt;br /&gt;
*Thirdly, look at the &amp;quot;B&amp;quot;, this means we are in the class named &amp;quot;RunStyles&amp;quot;, so, &amp;quot;RunStyles&amp;quot; is also a search scope.&lt;br /&gt;
*Finally, don't forget the global namespace scope, because the tokens of this scope are exposed to everywhere of the source.&lt;br /&gt;
&lt;br /&gt;
===Break up the current statement===&lt;br /&gt;
&amp;lt;source lang = &amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
 VariableA.m_VariableB.Functi&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
If you are entering the above statement, the caret is behind the &amp;quot;Functi&amp;quot;. Then the whole line will be break up to several &amp;quot;parsing component&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
There are three components: &amp;quot;'''VariableA'''&amp;quot; , &amp;quot;'''m_VariableB'''&amp;quot; and &amp;quot;'''Functi'''&amp;quot;. In the next section, I will introduce that the AI matching routing will start from matching the first component with the initial(first) search scope.&lt;br /&gt;
&lt;br /&gt;
===Do an AI match===&lt;br /&gt;
Doing an AI match is just like a walking on a tree, and find the final matching result.See the image below:&lt;br /&gt;
&lt;br /&gt;
[[image:CC AI Match.png]]&lt;br /&gt;
&lt;br /&gt;
'''Here is the matching algorithm''':&lt;br /&gt;
&lt;br /&gt;
Now, suppose we have an initial &amp;quot;search scope&amp;quot;, and a &amp;quot;component&amp;quot; array. &lt;br /&gt;
&lt;br /&gt;
The AI match algorithm starts from matching the &amp;quot;sub search scopes&amp;quot; with the first &amp;quot;component&amp;quot;, then, the matched &amp;quot;sub search scope&amp;quot;(red rectangle) will be the initial &amp;quot;search scope&amp;quot; again matching with the second &amp;quot;component&amp;quot;, this matching routing is running continuously until we matches with the final component. Then we get the whole matching result, that will be show as a auto code completion list.&lt;br /&gt;
&lt;br /&gt;
==Code completion debugging support==&lt;br /&gt;
===Debug Log output===&lt;br /&gt;
If you want to debug your plug-in, you may need to Logout the debug message to the &amp;quot;Code::Blocks Debug&amp;quot; panel. Here is the sample code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang = &amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
Manager::Get()-&amp;gt;GetLogManager()-&amp;gt;DebugLog(_(&amp;quot;XXXXX &amp;quot;));&lt;br /&gt;
&lt;br /&gt;
wxString name;&lt;br /&gt;
wxString args;&lt;br /&gt;
wxString m_Str;&lt;br /&gt;
//.....&lt;br /&gt;
Manager::Get()-&amp;gt;GetLogManager()-&amp;gt;DebugLog(F(_T(&amp;quot;Add token name='&amp;quot;)+name+_T(&amp;quot;', args='&amp;quot;)+args+_T(&amp;quot;', return type='&amp;quot;) + m_Str+ _T(&amp;quot;'&amp;quot;)));&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Also, you need start the Code::Blocks with the command line argument. For example in windows.&lt;br /&gt;
&lt;br /&gt;
'''codeblocks.exe --debug-log'''&lt;br /&gt;
&lt;br /&gt;
then a Code::blocks debug panel will be shown to display the log.&lt;br /&gt;
[[Image:CbDebugLog.png|frame|none|  Debug Log output panel]]&lt;br /&gt;
&lt;br /&gt;
===TRACE macro support===&lt;br /&gt;
As you can see in the source file like &amp;quot;tokenizer.cpp&amp;quot; or &amp;quot;parserthread.cpp&amp;quot;, there is a macro definition in the beginning of the source.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang = &amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
#define CC_CODECOMPLETION_DEBUG_OUTPUT 0&lt;br /&gt;
&lt;br /&gt;
#if CC_CODECOMPLETION_DEBUG_OUTPUT == 1&lt;br /&gt;
    #define TRACE(format, args...) \&lt;br /&gt;
        Manager::Get()-&amp;gt;GetLogManager()-&amp;gt;DebugLog(F(format, ##args))&lt;br /&gt;
    #define TRACE2(format, args...)&lt;br /&gt;
#elif CC_CODECOMPLETION_DEBUG_OUTPUT == 2&lt;br /&gt;
    #define TRACE(format, args...)                                              \&lt;br /&gt;
        do                                                                      \&lt;br /&gt;
        {                                                                       \&lt;br /&gt;
            if (g_EnableDebugTrace)                                             \&lt;br /&gt;
                Manager::Get()-&amp;gt;GetLogManager()-&amp;gt;DebugLog(F(format, ##args));   \&lt;br /&gt;
        }                                                                       \&lt;br /&gt;
        while (false)&lt;br /&gt;
    #define TRACE2(format, args...) \&lt;br /&gt;
        Manager::Get()-&amp;gt;GetLogManager()-&amp;gt;DebugLog(F(format, ##args))&lt;br /&gt;
#else&lt;br /&gt;
    #define TRACE(format, args...)&lt;br /&gt;
    #define TRACE2(format, args...)&lt;br /&gt;
#endif&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
This is a quite complex macro definition. So, if CC_CODECOMPLETION_DEBUG_OUTPUT is defined as 0, these debugging macros were disabled. If CC_CODECOMPLETION_DEBUG_OUTPUT is defined as 1, only the TRACE macro will be defined, so you can plot some messages to the Debug log. It is always the parser will parser many files, so the debug messages will be flooding. If we only interest in the debug message when we are parsing a specific source file, the best way was define CC_CODECOMPLETION_DEBUG_OUTPUT as 2. Now, TRACE macro will plot the message only in one source file. The source file name can be specified in token.cpp&lt;br /&gt;
&amp;lt;source lang = &amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
const wxString g_DebugTraceFile = _T(&amp;quot;myfile.cpp&amp;quot;); &lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
This way, only the debug message when parsing &amp;quot;myfile.cpp&amp;quot; will be traced.&lt;br /&gt;
&lt;br /&gt;
===Code-Completion debug tool dialog===&lt;br /&gt;
When you press '''shift''' and '''ctrl''' key and double click on any entry of the navigator tree entry, a debug tool dialog will pop up to give a more detail about the selected token. You can query its information such as its member variables, its Ancestors and so on.&lt;br /&gt;
&lt;br /&gt;
[[Image:CcDebugToolDialog.png]]&lt;br /&gt;
&lt;br /&gt;
===Debug Smart Sense log output ===&lt;br /&gt;
When you hold the'''shift''' and '''ctrl''' key and right click on any entry of the navigator tree entry, the context menu will have a &amp;quot;Debug SmartSense&amp;quot; menu entry shown. You can click it to enable it. See the image blow. Then, all the debug log information when doing an Auto-completion will be shown in the &amp;quot;Debug Log&amp;quot; panel.&lt;br /&gt;
&lt;br /&gt;
[[File:Cc debug smartsense.png]]&lt;br /&gt;
&lt;br /&gt;
==Mutexs and lockers in CC==&lt;br /&gt;
We need lockers to avoid multiply thread issues of wxString. More detailed can be found: [/index.php/topic,17543.0.html wxString and the locker issue in our CC code], to avoid such issue, we need lockers.&lt;br /&gt;
There are three main kind of lockers.&lt;br /&gt;
&amp;lt;nowiki&amp;gt;wxMutex s_ParserMutex;&lt;br /&gt;
wxMutex s_TokenTreeMutex;&lt;br /&gt;
wxMutex m_ClassBrowserBuilderThreadMutex;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
The first one was to protect multiply access to Parser objects, this is a static variable. The second one tries to forbid the multiply access to the TokenTree, the last one is used to build the symbol browser tree(usually show in the left docked panels of the C::B main frame)&lt;br /&gt;
&lt;br /&gt;
The associated Macros are below:&lt;br /&gt;
&amp;lt;source lang = &amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
// For tracking, either uncomment:&lt;br /&gt;
//#define CC_ENABLE_LOCKER_TRACK&lt;br /&gt;
// ...or:&lt;br /&gt;
#define CC_ENABLE_LOCKER_ASSERT&lt;br /&gt;
// ..or none of the above.&lt;br /&gt;
&lt;br /&gt;
#if defined(CC_ENABLE_LOCKER_TRACK)&lt;br /&gt;
    // TRACKING MUTXES&lt;br /&gt;
    // [1] Implementations for tracking mutexes:&lt;br /&gt;
    #define THREAD_LOCKER_MTX_LOCK(NAME)                                         \&lt;br /&gt;
        CCLogger::Get()-&amp;gt;DebugLog(F(_T(&amp;quot;%s.Lock() : %s(), %s, %d&amp;quot;),              \&lt;br /&gt;
                                    wxString(#NAME, wxConvUTF8).wx_str(),        \&lt;br /&gt;
                                    wxString(__FUNCTION__, wxConvUTF8).wx_str(), \&lt;br /&gt;
                                    wxString(__FILE__, wxConvUTF8).wx_str(),     \&lt;br /&gt;
                                    __LINE__))&lt;br /&gt;
    #define THREAD_LOCKER_MTX_LOCK_SUCCESS(NAME)                                 \&lt;br /&gt;
        CCLogger::Get()-&amp;gt;DebugLog(F(_T(&amp;quot;%s.Lock().Success() : %s(), %s, %d&amp;quot;),    \&lt;br /&gt;
                                    wxString(#NAME, wxConvUTF8).wx_str(),        \&lt;br /&gt;
                                    wxString(__FUNCTION__, wxConvUTF8).wx_str(), \&lt;br /&gt;
                                    wxString(__FILE__, wxConvUTF8).wx_str(),     \&lt;br /&gt;
                                    __LINE__))&lt;br /&gt;
    #define THREAD_LOCKER_MTX_UNLOCK(NAME)                                       \&lt;br /&gt;
        CCLogger::Get()-&amp;gt;DebugLog(F(_T(&amp;quot;%s.Unlock() : %s(), %s, %d&amp;quot;),            \&lt;br /&gt;
                                    wxString(#NAME, wxConvUTF8).wx_str(),        \&lt;br /&gt;
                                    wxString(__FUNCTION__, wxConvUTF8).wx_str(), \&lt;br /&gt;
                                    wxString(__FILE__, wxConvUTF8).wx_str(),     \&lt;br /&gt;
                                    __LINE__))&lt;br /&gt;
    #define THREAD_LOCKER_MTX_UNLOCK_SUCCESS(NAME)                               \&lt;br /&gt;
        CCLogger::Get()-&amp;gt;DebugLog(F(_T(&amp;quot;%s.Unlock().Success() : %s(), %s, %d&amp;quot;),  \&lt;br /&gt;
                                    wxString(#NAME, wxConvUTF8).wx_str(),        \&lt;br /&gt;
                                    wxString(__FUNCTION__, wxConvUTF8).wx_str(), \&lt;br /&gt;
                                    wxString(__FILE__, wxConvUTF8).wx_str(),     \&lt;br /&gt;
                                    __LINE__))&lt;br /&gt;
    #define THREAD_LOCKER_MTX_FAIL(NAME)                                         \&lt;br /&gt;
        CCLogger::Get()-&amp;gt;DebugLog(F(_T(&amp;quot;%s.Fail() : %s(), %s, %d&amp;quot;),              \&lt;br /&gt;
                                    wxString(#NAME, wxConvUTF8).wx_str(),        \&lt;br /&gt;
                                    wxString(__FUNCTION__, wxConvUTF8).wx_str(), \&lt;br /&gt;
                                    wxString(__FILE__, wxConvUTF8).wx_str(),     \&lt;br /&gt;
                                    __LINE__))&lt;br /&gt;
    // [2] Cumulative convenient macros for tracking mutexes [USE THESE!]:&lt;br /&gt;
    #define CC_LOCKER_TRACK_TT_MTX_LOCK(M)    \&lt;br /&gt;
    {                                         \&lt;br /&gt;
        THREAD_LOCKER_MTX_LOCK(M);            \&lt;br /&gt;
        if (M.Lock()==wxMUTEX_NO_ERROR)       \&lt;br /&gt;
          THREAD_LOCKER_MTX_LOCK_SUCCESS(M);  \&lt;br /&gt;
        else                                  \&lt;br /&gt;
          THREAD_LOCKER_MTX_FAIL(M);          \&lt;br /&gt;
    }&lt;br /&gt;
    #define CC_LOCKER_TRACK_TT_MTX_UNLOCK(M)    \&lt;br /&gt;
    {                                           \&lt;br /&gt;
        THREAD_LOCKER_MTX_UNLOCK(M);            \&lt;br /&gt;
        if (M.Unlock()==wxMUTEX_NO_ERROR)       \&lt;br /&gt;
          THREAD_LOCKER_MTX_UNLOCK_SUCCESS(M);  \&lt;br /&gt;
        else                                    \&lt;br /&gt;
          THREAD_LOCKER_MTX_FAIL(M);            \&lt;br /&gt;
    }&lt;br /&gt;
    #define CC_LOCKER_TRACK_CBBT_MTX_LOCK   CC_LOCKER_TRACK_TT_MTX_LOCK&lt;br /&gt;
    #define CC_LOCKER_TRACK_CBBT_MTX_UNLOCK CC_LOCKER_TRACK_TT_MTX_UNLOCK&lt;br /&gt;
    #define CC_LOCKER_TRACK_P_MTX_LOCK      CC_LOCKER_TRACK_TT_MTX_LOCK&lt;br /&gt;
    #define CC_LOCKER_TRACK_P_MTX_UNLOCK    CC_LOCKER_TRACK_TT_MTX_UNLOCK&lt;br /&gt;
&lt;br /&gt;
    // TRACKING CRITICAL SECIONS&lt;br /&gt;
    // [2] Implementations for tracking critical sections:&lt;br /&gt;
    #define THREAD_LOCKER_CS_ENTER(NAME)                                         \&lt;br /&gt;
        CCLogger::Get()-&amp;gt;DebugLog(F(_T(&amp;quot;%s.Enter() : %s(), %s, %d&amp;quot;),             \&lt;br /&gt;
                                    wxString(#NAME, wxConvUTF8).wx_str(),        \&lt;br /&gt;
                                    wxString(__FUNCTION__, wxConvUTF8).wx_str(), \&lt;br /&gt;
                                    wxString(__FILE__, wxConvUTF8).wx_str(),     \&lt;br /&gt;
                                    __LINE__))&lt;br /&gt;
    #define THREAD_LOCKER_CS_ENTERED(NAME)                                       \&lt;br /&gt;
        CCLogger::Get()-&amp;gt;DebugLog(F(_T(&amp;quot;%s.Entered() : %s(), %s, %d&amp;quot;),           \&lt;br /&gt;
                                    wxString(#NAME, wxConvUTF8).wx_str(),        \&lt;br /&gt;
                                    wxString(__FUNCTION__, wxConvUTF8).wx_str(), \&lt;br /&gt;
                                    wxString(__FILE__, wxConvUTF8).wx_str(),     \&lt;br /&gt;
                                    __LINE__))&lt;br /&gt;
    #define THREAD_LOCKER_CS_LEAVE(NAME)                                         \&lt;br /&gt;
        CCLogger::Get()-&amp;gt;DebugLog(F(_T(&amp;quot;%s.Leave() : %s(), %s, %d&amp;quot;),             \&lt;br /&gt;
                                    wxString(#NAME, wxConvUTF8).wx_str(),        \&lt;br /&gt;
                                    wxString(__FUNCTION__, wxConvUTF8).wx_str(), \&lt;br /&gt;
                                    wxString(__FILE__, wxConvUTF8).wx_str(),     \&lt;br /&gt;
                                    __LINE__))&lt;br /&gt;
    // [2] Cumulative convenient macros for tracking critical sections [USE THESE!]:&lt;br /&gt;
    #define CC_LOCKER_TRACK_CS_ENTER(CS) \&lt;br /&gt;
    {                                    \&lt;br /&gt;
         THREAD_LOCKER_CS_ENTER(CS);     \&lt;br /&gt;
         CS.Enter();                     \&lt;br /&gt;
         THREAD_LOCKER_CS_ENTERED(CS);   \&lt;br /&gt;
    }&lt;br /&gt;
    #define CC_LOCKER_TRACK_CS_LEAVE(CS) \&lt;br /&gt;
    {                                    \&lt;br /&gt;
          THREAD_LOCKER_CS_LEAVE(CS);    \&lt;br /&gt;
          CS.Leave();                    \&lt;br /&gt;
    }&lt;br /&gt;
#elif defined CC_ENABLE_LOCKER_ASSERT&lt;br /&gt;
    #define CC_LOCKER_TRACK_CS_ENTER(CS)     CS.Enter();&lt;br /&gt;
    #define CC_LOCKER_TRACK_CS_LEAVE(CS)     CS.Leave();&lt;br /&gt;
&lt;br /&gt;
    #define CC_LOCKER_TRACK_TT_MTX_LOCK(M)   cbAssert(M.Lock()==wxMUTEX_NO_ERROR);&lt;br /&gt;
    #define CC_LOCKER_TRACK_TT_MTX_UNLOCK(M) cbAssert(M.Unlock()==wxMUTEX_NO_ERROR);&lt;br /&gt;
    #define CC_LOCKER_TRACK_CBBT_MTX_LOCK    CC_LOCKER_TRACK_TT_MTX_LOCK&lt;br /&gt;
    #define CC_LOCKER_TRACK_CBBT_MTX_UNLOCK  CC_LOCKER_TRACK_TT_MTX_UNLOCK&lt;br /&gt;
    #define CC_LOCKER_TRACK_P_MTX_LOCK       CC_LOCKER_TRACK_TT_MTX_LOCK&lt;br /&gt;
    #define CC_LOCKER_TRACK_P_MTX_UNLOCK     CC_LOCKER_TRACK_TT_MTX_UNLOCK&lt;br /&gt;
#else&lt;br /&gt;
    #define CC_LOCKER_TRACK_CS_ENTER(CS)     CS.Enter();&lt;br /&gt;
    #define CC_LOCKER_TRACK_CS_LEAVE(CS)     CS.Leave();&lt;br /&gt;
&lt;br /&gt;
    #define CC_LOCKER_TRACK_TT_MTX_LOCK(M)   M.Lock();&lt;br /&gt;
    #define CC_LOCKER_TRACK_TT_MTX_UNLOCK(M) M.Unlock();&lt;br /&gt;
    #define CC_LOCKER_TRACK_CBBT_MTX_LOCK    CC_LOCKER_TRACK_TT_MTX_LOCK&lt;br /&gt;
    #define CC_LOCKER_TRACK_CBBT_MTX_UNLOCK  CC_LOCKER_TRACK_TT_MTX_UNLOCK&lt;br /&gt;
    #define CC_LOCKER_TRACK_P_MTX_LOCK       CC_LOCKER_TRACK_TT_MTX_LOCK&lt;br /&gt;
    #define CC_LOCKER_TRACK_P_MTX_UNLOCK     CC_LOCKER_TRACK_TT_MTX_UNLOCK&lt;br /&gt;
#endif&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Each mutex need a Lock and Unlock macro, like for mutex for Parser, we need CC_LOCKER_TRACK_P_MTX_LOCK and CC_LOCKER_TRACK_P_MTX_UNLOCK.&lt;br /&gt;
&lt;br /&gt;
==Usefull Links==&lt;br /&gt;
&lt;br /&gt;
*A discussion on search tree in the forum [/index.php/topic,1696.0.html] and [/index.php/topic,1581.0.html].&lt;br /&gt;
&lt;br /&gt;
*Another opensource IDE [http://vcfbuilder.org/?q=node/139 VCF builder]or[https://sourceforge.net/projects/vcfbuilder/ vcfbuilder on sf], By the way , VCF use a CodeStore based on [http://www.antlr.org/ antlr parser] to deal with parsing, the whole source code can be check out from &lt;br /&gt;
&amp;lt;pre&amp;gt;svn co https://vcfbuilder.svn.sourceforge.net/svnroot/vcfbuilder vcfbuilder&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*online book[http://www.macs.hw.ac.uk/~alison/alg/details.html Data Structures and Algorithms II Course ] and [http://www.macs.hw.ac.uk/~alison/alg/lectures.html pdf lectures]&lt;br /&gt;
&lt;br /&gt;
*A forum discussion on why a standard perprocessor and parser works slowly. [/index.php/topic,2494.msg19801.html#msg19801 parsing iostream header takes 5 seconds]&lt;br /&gt;
&lt;br /&gt;
*[http://www.codelite.org CodeLite] is another open source IDE using wxWidgets, use Ctags as a indexing service, and do context expression syntactic analysis generated from Lex and Yacc tools.See the explanation in forum message by it's author eranif [/index.php/topic,10087.msg70875.html#msg70875 How does Codelite's CC work with CTags and Yacc&amp;amp;Lex]&lt;br /&gt;
&lt;br /&gt;
*Hopefully, we can use the patricia tree from the standard library, see here:[http://gcc.gnu.org/onlinedocs/libstdc++/ext/pb_ds/trie_based_containers.html trie]&lt;br /&gt;
&lt;br /&gt;
* a blog from KDE4's developer, it explain the code completion in KDE4, see here:[http://zwabel.wordpress.com/ zwabel' blog]&lt;br /&gt;
&lt;br /&gt;
* QT creator source code from [http://qt.gitorious.org/qt-creator/qt-creator/trees/master QT-creator source]&lt;br /&gt;
&lt;br /&gt;
* [http://websvn.kde.org/trunk/KDE/kdevelop/ Kdevelop source code] and it's [http://websvn.kde.org/trunk/KDE/kdevelop/languages/cpp/parser/ parser]&lt;br /&gt;
&lt;br /&gt;
* [http://stackoverflow.com/questions/1220099/how-does-code-completion-work How does code completion work? - Stack Overflow]&lt;br /&gt;
&lt;br /&gt;
* [/index.php/topic,11724.0.html Just a reminder Codelite IDE now have improved it's parser]&lt;br /&gt;
&lt;br /&gt;
*[http://padator.org/software-yacfe.php Yacfe, a parser with proprocessor enabled]&lt;br /&gt;
&lt;br /&gt;
*[/index.php/topic,1581.msg11701.html#msg11701 A Mini C++ interpreter] from the book &amp;quot;The Art of C++ by Herbert Schildt&amp;quot;, source code can be download [http://books.mcgraw-hill.com/downloads/products/0072255129/0072255129_code.zip here]&lt;br /&gt;
&lt;br /&gt;
*[http://www.macs.hw.ac.uk/~alison/alg/lectures/l7.pdf Lecture 7: Parsing (intro) (pdf)] and [http://www.macs.hw.ac.uk/~alison/alg/lectures/l8.pdf Lecture 8: Recursive Descent Parsing (pdf)] from [http://www.macs.hw.ac.uk/~alison/alg/lectures.html Data Structures and Algorithms II]&lt;br /&gt;
&lt;br /&gt;
*There are some online &amp;quot;Compiler design&amp;quot; books listed in [http://www.freetechbooks.com/compiler-design-and-construction-f14.html Free Online Compiler Design and Construction Books :: FreeTechBooks.com], and the best one I think is : [http://www.diku.dk/hjemmesider/ansatte/torbenm/Basics/index.html Basics of Compiler Design], and you can get a basic understanding.&lt;br /&gt;
&lt;br /&gt;
*[http://wiki.eclipse.org/CDT/designs/Overview_of_Parsing CDT/designs/Overview of Parsing].&lt;br /&gt;
&lt;br /&gt;
* [http://en.literateprograms.org/Radix_tree_(C) Radix tree (C) - LiteratePrograms]&lt;br /&gt;
&lt;br /&gt;
* LLVM's online tutorials on how to write a simple compiler [http://llvm.org/docs/tutorial/index.html LLVM Tutorial]&lt;br /&gt;
&lt;br /&gt;
* Roberto Raggi's new parser[https://github.com/robertoraggi/cplusplus cplusplus 5 My experimental C++ front end], note Roberto Raggi is the author of the parser for both Qtcreator and Kdeveloper IDE.&lt;br /&gt;
&lt;br /&gt;
* KDevelop are discussing clang now, see [http://milianw.de/blog/katekdevelop-sprint-2014-let-there-be-clang Kate/KDevelop Sprint 2014: Let There Be Clang | Milian Wolff]&lt;/div&gt;</summary>
		<author><name>Ollydbg</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=Coding_style&amp;diff=7723</id>
		<title>Coding style</title>
		<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php?title=Coding_style&amp;diff=7723"/>
		<updated>2014-02-10T14:15:15Z</updated>

		<summary type="html">&lt;p&gt;Ollydbg: /* Commenting */ doxygen comment style&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Developer Documentation]]&lt;br /&gt;
The following are guidelines for the code formatting to use in Code::Blocks source code. Anyone writing code or a [[Creating a patch to submit to BerliOS (Patch Tracker)|patch]] for Code::Blocks, is required to follow these.&lt;br /&gt;
&lt;br /&gt;
== General coding style ==&lt;br /&gt;
&lt;br /&gt;
The general coding style is the ANSI one:&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
namespace FooSpace&lt;br /&gt;
{&lt;br /&gt;
    int Foo()&lt;br /&gt;
    {&lt;br /&gt;
        if (isBar)&lt;br /&gt;
        {&lt;br /&gt;
            Bar();&lt;br /&gt;
            return 1;&lt;br /&gt;
        }&lt;br /&gt;
        else&lt;br /&gt;
            return 0;&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Variables naming ==&lt;br /&gt;
&lt;br /&gt;
Class names do not start with 'C' (as in CObject, CWindow, etc). Only abstract base classes (interfaces) should start with 'I'.&lt;br /&gt;
But they all have to start with a capital letter.&lt;br /&gt;
&lt;br /&gt;
Class member variables should start with &amp;lt;tt&amp;gt;m_&amp;lt;/tt&amp;gt;. If the variable is a pointer, use &amp;lt;tt&amp;gt;m_p&amp;lt;/tt&amp;gt; as a prefix.&lt;br /&gt;
Following the prefix is the variable's name. Use descriptive names and use capital letters at the start of each word (the first too). So a fictious variable holding a value for position would be named as &amp;lt;tt&amp;gt;m_ValueForPosition&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Non-class member variables should not start with a capital letter.&lt;br /&gt;
&lt;br /&gt;
Function names should always start with a capital letter.&lt;br /&gt;
&lt;br /&gt;
Examples:&lt;br /&gt;
&amp;lt;pre&amp;gt;// Good&lt;br /&gt;
int aLocalVar;&lt;br /&gt;
int m_SomeInt;&lt;br /&gt;
void* m_pSomePointer;&lt;br /&gt;
bool SomeFunc();&lt;br /&gt;
&lt;br /&gt;
// Bad&lt;br /&gt;
int SomeInt; // either no m_ prefix if it's a class variable, &lt;br /&gt;
             // or capital first letter if it's a local variable&lt;br /&gt;
int m_someInt; // no capital letter 'S'&lt;br /&gt;
void* m_SomePointer; // no m_p prefix&lt;br /&gt;
bool someFunc(); // function with non-capital first letter&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Parameters that are not absolutely required to be used in an interface or base class should preferrably be tagged with the &amp;lt;tt&amp;gt;cb_optional&amp;lt;/tt&amp;gt; macro so users of the interface realize this, and as a side effect no compiler warnings are generated.&lt;br /&gt;
&lt;br /&gt;
Parameters that are ''actually not used'' should be tagged &amp;lt;tt&amp;gt;cb_unused&amp;lt;/tt&amp;gt; both to suppress a compiler warning and indicate that this is happening intentionally.&lt;br /&gt;
&lt;br /&gt;
If the caller of a function takes ownership of the object referenced by the return value, tag the function as &amp;lt;tt&amp;gt;cb_must_consume_result&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Variables declaration ==&lt;br /&gt;
&lt;br /&gt;
One variable declared each time on a different line.&lt;br /&gt;
For pointer/reference variables, the '*' or '&amp;amp;' is part of the type.&lt;br /&gt;
&lt;br /&gt;
Examples:&lt;br /&gt;
&amp;lt;pre&amp;gt;// Good&lt;br /&gt;
int&amp;amp; someInt;&lt;br /&gt;
void* pPtr;&lt;br /&gt;
&lt;br /&gt;
// Bad&lt;br /&gt;
int &amp;amp;someInt; // &amp;amp; not after type&lt;br /&gt;
void* pPtr, pSomeOther; // multiple declarations in one line&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Spacing ==&lt;br /&gt;
&lt;br /&gt;
Prefer spaces over tabs. If you want to use tabs you won't be prosecuted (!) but please use a tab size of 4 spaces.&amp;lt;br&amp;gt;&lt;br /&gt;
Code indentation should be 4 spaces.&amp;lt;br&amp;gt;&lt;br /&gt;
In class declarations, the keywords &amp;lt;tt&amp;gt;public:&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;protected:&amp;lt;/tt&amp;gt;, and &amp;lt;tt&amp;gt;private:&amp;lt;/tt&amp;gt; should be indented. The same goes for all the class members.&lt;br /&gt;
&lt;br /&gt;
Examples:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
// Good&lt;br /&gt;
class AClass&lt;br /&gt;
{&lt;br /&gt;
    public:&lt;br /&gt;
        AClass(){ ... }&lt;br /&gt;
    protected:&lt;br /&gt;
        int m_Member;&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
// Bad&lt;br /&gt;
class AClass&lt;br /&gt;
{&lt;br /&gt;
public:&lt;br /&gt;
    AClass(){ ... }&lt;br /&gt;
protected:&lt;br /&gt;
    int m_Member;&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Commenting ==&lt;br /&gt;
&lt;br /&gt;
* All three types of comments are used in Code::Blocks. C++ style ('//'), C style ('/* */'), and the Doxygen style ('/** */').&lt;br /&gt;
* The C++ style is used for just about everything. Use this style to describe what your code does.&lt;br /&gt;
* The C style is used only for very long comments (paragraphs), or for a license or description at the top of a C++ file.&lt;br /&gt;
* The Doxygen style is used for documenting functions only. These functions would be public, and protected class functions, and global helper functions.&lt;br /&gt;
* Comments should clearly describe what the code does. Comments should be concise, but coherent.&lt;br /&gt;
&lt;br /&gt;
=== Doxygen style comments ===&lt;br /&gt;
This is the recommended Doxygen style, see [/index.php/topic,15948.msg107431.html#msg107431 comment style question] for details.&lt;br /&gt;
&amp;lt;source lang = &amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
/** Short description&lt;br /&gt;
 * &lt;br /&gt;
 * Long description&lt;br /&gt;
 */&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Header file include and Precompiled header rule ==&lt;br /&gt;
The NON-PCH compilation (I mean with NOPCH switch, that's different from simply disabling PCH!) will be helpful to detect missing includes. Keep in mind that no matter what we do - wx will do and use PCH unless we declare NOPCH at the compile time. So even if we disable our PCH, the patches won't stop unless we do it properly in the first place.&lt;br /&gt;
&lt;br /&gt;
The rules are plain simple:&lt;br /&gt;
PCH file:&lt;br /&gt;
- include all rarely changing header files&lt;br /&gt;
- do the PCH macro vodoo (we have that already)&lt;br /&gt;
Header:&lt;br /&gt;
- If you access or define an object, include the header&lt;br /&gt;
- If you use pointers/references, use forward decl&lt;br /&gt;
- Put headers you need to include into such a section if they are part of your PCH file:&lt;br /&gt;
Code:&lt;br /&gt;
	&lt;br /&gt;
&amp;lt;source lang = &amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
#ifndef USE_PCH&lt;br /&gt;
  #include &amp;lt;wx/dialog.h&amp;gt;&lt;br /&gt;
#endif&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
- Include headers you need to include that are not part of your PCH file as normal&lt;br /&gt;
Implementation:&lt;br /&gt;
- include the PCH file first&lt;br /&gt;
- same thing for headers needed as in the header file.&lt;br /&gt;
&lt;br /&gt;
I do it that way in my own projects and i works flawlessly for ages! Of course, whenever I change code and use new classes, I need to check the above rules.&lt;br /&gt;
&lt;br /&gt;
But (nevermind) if we decide to get rid of this because these rules are too hard - go ahead.&lt;br /&gt;
&lt;br /&gt;
Here comes a simple small class:&lt;br /&gt;
Header:&lt;br /&gt;
	&lt;br /&gt;
&amp;lt;source lang = &amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
#ifndef USE_PCH&lt;br /&gt;
  #include &amp;lt;wx/dialog.h&amp;gt; // is in wx_pch.h!&lt;br /&gt;
#endif&lt;br /&gt;
&lt;br /&gt;
#include &amp;lt;wx/busyinfo.h&amp;gt; // NOT in wx_pch.h and used as object&lt;br /&gt;
&lt;br /&gt;
class MyClass; // forward decsl due to pointer usage&lt;br /&gt;
&lt;br /&gt;
class MyDlg: public wxDialog&lt;br /&gt;
{&lt;br /&gt;
  MyDlg() { ; };&lt;br /&gt;
  void Func(MyClass* c); // used as pointer&lt;br /&gt;
  wxBusyInfo bi; // used as object&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Implementation:&lt;br /&gt;
	&lt;br /&gt;
&amp;lt;source lang = &amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
#include &amp;lt;wx_pch.h&amp;gt; // our PCH file, may include the WX PCH file (if needed)&lt;br /&gt;
&lt;br /&gt;
#include &amp;quot;MyDlg.h&amp;quot;&lt;br /&gt;
&lt;br /&gt;
#ifndef USE_PCH&lt;br /&gt;
  #include &amp;quot;MyClass.h&amp;quot; // is in wx_pch.h, but now used as object / accessed&lt;br /&gt;
#endif&lt;br /&gt;
&lt;br /&gt;
#include &amp;quot;MyOhterClass.h&amp;quot; // NOT in wx_pch.h and used as object&lt;br /&gt;
&lt;br /&gt;
void MyDlg::Func(MyClass* c)&lt;br /&gt;
{&lt;br /&gt;
  MyOtherClass moc;&lt;br /&gt;
  c-&amp;gt;DoSomething(moc);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
See some disscussion in our forum: [/index.php/topic,16028.msg108172.html#msg108172 Morten's comments on include file rules]&lt;br /&gt;
&lt;br /&gt;
Also: [/index.php/topic,3321.msg26184.html#msg26184 include rules (by killerbot)]&lt;/div&gt;</summary>
		<author><name>Ollydbg</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=Compiling_wxWidgets_3.0.0_to_develop_Code::Blocks_(MSW)&amp;diff=7712</id>
		<title>Compiling wxWidgets 3.0.0 to develop Code::Blocks (MSW)</title>
		<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php?title=Compiling_wxWidgets_3.0.0_to_develop_Code::Blocks_(MSW)&amp;diff=7712"/>
		<updated>2014-01-12T07:35:42Z</updated>

		<summary type="html">&lt;p&gt;Ollydbg: /* Reference */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Note, compiling Code::Blocks linked against the wxWidgets 3.0.0 is NOT ready for stable use; CodeBlocks developers are working hard to stabilize it, also patches are welcome to accelerate the migration'''&lt;br /&gt;
&lt;br /&gt;
These are the instructions for compiling wxWidgets for use with Code::Blocks. They are primarily intended in preparation for compiling Code::Blocks itself but (hopefully) may also help installing wxWidgets for general development using that framework.&lt;br /&gt;
&lt;br /&gt;
Although these instructions are targeted at the Windows operating system, it should be possible to apply them with slight adjustments to other platforms, since we make use of MinGW.&lt;br /&gt;
&lt;br /&gt;
== Installing MinGW ==&lt;br /&gt;
Directions to install MinGW for Code::Blocks can be found here.&lt;br /&gt;
[[MinGW installation]]&lt;br /&gt;
&lt;br /&gt;
== Installing the wxWidgets Source Code ==&lt;br /&gt;
The wxWidgets 3.0.0 distribution can be found at the [http://www.wxwidgets.org/downloads/#latest_stable wxWidgets download site]. (Note that there is also a winhelp file available.) You can choose between an installer and a zip file. You can just get the zip file because the installer is also a zipped version.&lt;br /&gt;
&lt;br /&gt;
If you use the plain zip version, make sure to unzip using the full path. Otherwise the directories won't be created correctly.&lt;br /&gt;
&lt;br /&gt;
'''NOTE:''' For the remainder of these instructions we call the wxWidgets directory ''&amp;lt;WXWIN&amp;gt;''. You have to change it to your corresponding directory (e.g. &amp;quot;c:\wxMSW-3.0.0\wxWidgets-3.0.0&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
'''NOTE:''' You do not need MSYS. Furthermore, you cannot have MSYS in your path, or the wxWidgets compilation will fail. Thus, if you have MSYS installed, ensure that ''&amp;lt;MSYS&amp;gt;\bin'' '''is not''' in your path before compiling wxWidgets. wxWidgets must be compiled from a &amp;quot;regular&amp;quot; command line (like cmd.exe), not from a Unix-like shell. The same problem could arise if Cygwin is in the path.&lt;br /&gt;
&lt;br /&gt;
'''NOTE:''' For the remainder of these instructions we call the MinGW directory ''&amp;lt;MINGW&amp;gt;''. You have to change it to your corresponding directory (e.g. &amp;quot;C:\MinGW&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
== Checking make Version ==&lt;br /&gt;
If you didn't install MinGW yourself you have to ensure you are using a recent enough version of the make utility. Open a command prompt and type:&lt;br /&gt;
 &amp;lt;tt&amp;gt;cd &amp;lt;MINGW&amp;gt;\bin&lt;br /&gt;
 mingw32-make -v&amp;lt;/tt&amp;gt;&lt;br /&gt;
The version should read 3.80 or higher.&lt;br /&gt;
&lt;br /&gt;
== Building wxWidgets ==&lt;br /&gt;
=== Changing Directory and Setting Path ===&lt;br /&gt;
To compile wxWidgets, open the command prompt window and change to the wxWidgets directory:&lt;br /&gt;
 &amp;lt;tt&amp;gt;cd /d &amp;lt;WXWIN&amp;gt;\build\msw&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;tt&amp;gt;SET PATH=&amp;lt;MINGW&amp;gt;\bin&amp;lt;/tt&amp;gt;&lt;br /&gt;
'''NOTE:''' This is normally SET PATH=C:\MingGW\bin&lt;br /&gt;
&lt;br /&gt;
=== Cleaning wxWidgets Code ===&lt;br /&gt;
Now clean up the source:&lt;br /&gt;
 &amp;lt;tt&amp;gt;mingw32-make -f makefile.gcc USE_XRC=1 SHARED=1 MONOLITHIC=1 BUILD=release UNICODE=1 USE_OPENGL=1 VENDOR=cb CXXFLAGS=&amp;quot;-fno-keep-inline-dllexport&amp;quot; clean&amp;lt;/tt&amp;gt;&lt;br /&gt;
'''NOTE:''' Make sure you use exactly the same options for this step and for the build step below. The clean target uses these variables and only cleans the specified version of the generated object and library files. (It will not clean the intended files if these variables are not identical.)&lt;br /&gt;
&lt;br /&gt;
'''NOTE:''' If you still have problems with compiling after cleaning, you could try to manually remove the gcc_dll directory under the build\msw directory. This directory is the place where the object files are stored.&lt;br /&gt;
&lt;br /&gt;
=== Building wxWidgets Code ===&lt;br /&gt;
When everything is clean you can start compiling wxWidgets:&lt;br /&gt;
 &amp;lt;tt&amp;gt;mingw32-make -f makefile.gcc USE_XRC=1 SHARED=1 MONOLITHIC=1 BUILD=release UNICODE=1 USE_OPENGL=1 VENDOR=cb CXXFLAGS=&amp;quot;-fno-keep-inline-dllexport&amp;quot; &amp;gt;log.txt 2&amp;gt;&amp;amp;1&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''NOTE:''' If you want another version of wxWidgets (debug or non-Unicode) you still have to make sure you build a MONOLITHIC version (one big DLL) for linking Code::Blocks.&lt;br /&gt;
&lt;br /&gt;
Patience. This step takes time. Make sure there was no compilation error before you continue.&lt;br /&gt;
&lt;br /&gt;
== Compiling Code::Blocks ==&lt;br /&gt;
=== Code::Blocks project to use===&lt;br /&gt;
No patches are needed to compile Code::Blocks with wxWidgets 3.0, just use the project/workspace-files with the ''_wx30'' in the name and call ''update30.bat'' to update the resources.&lt;br /&gt;
&lt;br /&gt;
That does not mean, that everything runs absolutely bug-free, but we are working on it.&lt;br /&gt;
&lt;br /&gt;
As always patches are welcome.&lt;br /&gt;
&lt;br /&gt;
=== Setting up paths ===&lt;br /&gt;
Before finally compiling Code::Blocks itself, you need to setup the paths:&lt;br /&gt;
*Open the Code::Blocks project (CodeBlocks_wx30.cbp).&lt;br /&gt;
*It will ask you to define a [[Global compiler variables|Global variable]] named &amp;quot;wx30&amp;quot;&lt;br /&gt;
*Set the path to where you have wxWidgets installed (e.g. &amp;quot;c:\wxMSW-3.0.0\wxWidgets-3.0.0&amp;quot;).&lt;br /&gt;
*Set the global variable cb_release_type to &amp;quot;-g&amp;quot;. (no quote is needed when your enter the text)&lt;br /&gt;
*Compile Code::Blocks.&lt;br /&gt;
&lt;br /&gt;
'''NOTE:''' A zip.exe file should be in your PATH, so they can run post steps correctly, see [https://wiki.codeblocks.org/index.php?title=Installing_Code::Blocks_from_source_on_Windows#zip.exe 1.6 zip.exe] for some details about zip.exe&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Post compilation steps ===&lt;br /&gt;
When the compilation process is finished, simply run the update30.bat script. It will ensure that all resource files Code::Blocks uses are in the right place and up to date.&lt;br /&gt;
&lt;br /&gt;
=== Reference ===&lt;br /&gt;
* Forum discussion:[/index.php/topic,18412.msg125957.html#msg125957 Re: wxWidgets 3.0 and Code::Blocks files question?]&lt;br /&gt;
* [[Installing Code::Blocks from source on Windows]]&lt;br /&gt;
* Note that PCH is disabled in Codeblocks_wx30.cbp, because it cause GCC build error (a bug in GCC 4.8.x [http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56926 Bug 56926 – Crash (without ICE) while compiling Boost.Math]), see discussions here: [/index.php/topic,18412.msg126028.html#msg126028 Re: wxWidgets 3.0 and Code::Blocks files question?] and [/index.php/topic,18568.msg127102.html#msg127102 Patches for Compiling Code::Blocks against wxWidgets 3.0 using MinGW GCC 4.8.1]&lt;/div&gt;</summary>
		<author><name>Ollydbg</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=Compiling_wxWidgets_3.0.0_to_develop_Code::Blocks_(MSW)&amp;diff=7711</id>
		<title>Compiling wxWidgets 3.0.0 to develop Code::Blocks (MSW)</title>
		<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php?title=Compiling_wxWidgets_3.0.0_to_develop_Code::Blocks_(MSW)&amp;diff=7711"/>
		<updated>2014-01-12T07:34:55Z</updated>

		<summary type="html">&lt;p&gt;Ollydbg: /* Reference */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Note, compiling Code::Blocks linked against the wxWidgets 3.0.0 is NOT ready for stable use; CodeBlocks developers are working hard to stabilize it, also patches are welcome to accelerate the migration'''&lt;br /&gt;
&lt;br /&gt;
These are the instructions for compiling wxWidgets for use with Code::Blocks. They are primarily intended in preparation for compiling Code::Blocks itself but (hopefully) may also help installing wxWidgets for general development using that framework.&lt;br /&gt;
&lt;br /&gt;
Although these instructions are targeted at the Windows operating system, it should be possible to apply them with slight adjustments to other platforms, since we make use of MinGW.&lt;br /&gt;
&lt;br /&gt;
== Installing MinGW ==&lt;br /&gt;
Directions to install MinGW for Code::Blocks can be found here.&lt;br /&gt;
[[MinGW installation]]&lt;br /&gt;
&lt;br /&gt;
== Installing the wxWidgets Source Code ==&lt;br /&gt;
The wxWidgets 3.0.0 distribution can be found at the [http://www.wxwidgets.org/downloads/#latest_stable wxWidgets download site]. (Note that there is also a winhelp file available.) You can choose between an installer and a zip file. You can just get the zip file because the installer is also a zipped version.&lt;br /&gt;
&lt;br /&gt;
If you use the plain zip version, make sure to unzip using the full path. Otherwise the directories won't be created correctly.&lt;br /&gt;
&lt;br /&gt;
'''NOTE:''' For the remainder of these instructions we call the wxWidgets directory ''&amp;lt;WXWIN&amp;gt;''. You have to change it to your corresponding directory (e.g. &amp;quot;c:\wxMSW-3.0.0\wxWidgets-3.0.0&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
'''NOTE:''' You do not need MSYS. Furthermore, you cannot have MSYS in your path, or the wxWidgets compilation will fail. Thus, if you have MSYS installed, ensure that ''&amp;lt;MSYS&amp;gt;\bin'' '''is not''' in your path before compiling wxWidgets. wxWidgets must be compiled from a &amp;quot;regular&amp;quot; command line (like cmd.exe), not from a Unix-like shell. The same problem could arise if Cygwin is in the path.&lt;br /&gt;
&lt;br /&gt;
'''NOTE:''' For the remainder of these instructions we call the MinGW directory ''&amp;lt;MINGW&amp;gt;''. You have to change it to your corresponding directory (e.g. &amp;quot;C:\MinGW&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
== Checking make Version ==&lt;br /&gt;
If you didn't install MinGW yourself you have to ensure you are using a recent enough version of the make utility. Open a command prompt and type:&lt;br /&gt;
 &amp;lt;tt&amp;gt;cd &amp;lt;MINGW&amp;gt;\bin&lt;br /&gt;
 mingw32-make -v&amp;lt;/tt&amp;gt;&lt;br /&gt;
The version should read 3.80 or higher.&lt;br /&gt;
&lt;br /&gt;
== Building wxWidgets ==&lt;br /&gt;
=== Changing Directory and Setting Path ===&lt;br /&gt;
To compile wxWidgets, open the command prompt window and change to the wxWidgets directory:&lt;br /&gt;
 &amp;lt;tt&amp;gt;cd /d &amp;lt;WXWIN&amp;gt;\build\msw&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;tt&amp;gt;SET PATH=&amp;lt;MINGW&amp;gt;\bin&amp;lt;/tt&amp;gt;&lt;br /&gt;
'''NOTE:''' This is normally SET PATH=C:\MingGW\bin&lt;br /&gt;
&lt;br /&gt;
=== Cleaning wxWidgets Code ===&lt;br /&gt;
Now clean up the source:&lt;br /&gt;
 &amp;lt;tt&amp;gt;mingw32-make -f makefile.gcc USE_XRC=1 SHARED=1 MONOLITHIC=1 BUILD=release UNICODE=1 USE_OPENGL=1 VENDOR=cb CXXFLAGS=&amp;quot;-fno-keep-inline-dllexport&amp;quot; clean&amp;lt;/tt&amp;gt;&lt;br /&gt;
'''NOTE:''' Make sure you use exactly the same options for this step and for the build step below. The clean target uses these variables and only cleans the specified version of the generated object and library files. (It will not clean the intended files if these variables are not identical.)&lt;br /&gt;
&lt;br /&gt;
'''NOTE:''' If you still have problems with compiling after cleaning, you could try to manually remove the gcc_dll directory under the build\msw directory. This directory is the place where the object files are stored.&lt;br /&gt;
&lt;br /&gt;
=== Building wxWidgets Code ===&lt;br /&gt;
When everything is clean you can start compiling wxWidgets:&lt;br /&gt;
 &amp;lt;tt&amp;gt;mingw32-make -f makefile.gcc USE_XRC=1 SHARED=1 MONOLITHIC=1 BUILD=release UNICODE=1 USE_OPENGL=1 VENDOR=cb CXXFLAGS=&amp;quot;-fno-keep-inline-dllexport&amp;quot; &amp;gt;log.txt 2&amp;gt;&amp;amp;1&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''NOTE:''' If you want another version of wxWidgets (debug or non-Unicode) you still have to make sure you build a MONOLITHIC version (one big DLL) for linking Code::Blocks.&lt;br /&gt;
&lt;br /&gt;
Patience. This step takes time. Make sure there was no compilation error before you continue.&lt;br /&gt;
&lt;br /&gt;
== Compiling Code::Blocks ==&lt;br /&gt;
=== Code::Blocks project to use===&lt;br /&gt;
No patches are needed to compile Code::Blocks with wxWidgets 3.0, just use the project/workspace-files with the ''_wx30'' in the name and call ''update30.bat'' to update the resources.&lt;br /&gt;
&lt;br /&gt;
That does not mean, that everything runs absolutely bug-free, but we are working on it.&lt;br /&gt;
&lt;br /&gt;
As always patches are welcome.&lt;br /&gt;
&lt;br /&gt;
=== Setting up paths ===&lt;br /&gt;
Before finally compiling Code::Blocks itself, you need to setup the paths:&lt;br /&gt;
*Open the Code::Blocks project (CodeBlocks_wx30.cbp).&lt;br /&gt;
*It will ask you to define a [[Global compiler variables|Global variable]] named &amp;quot;wx30&amp;quot;&lt;br /&gt;
*Set the path to where you have wxWidgets installed (e.g. &amp;quot;c:\wxMSW-3.0.0\wxWidgets-3.0.0&amp;quot;).&lt;br /&gt;
*Set the global variable cb_release_type to &amp;quot;-g&amp;quot;. (no quote is needed when your enter the text)&lt;br /&gt;
*Compile Code::Blocks.&lt;br /&gt;
&lt;br /&gt;
'''NOTE:''' A zip.exe file should be in your PATH, so they can run post steps correctly, see [https://wiki.codeblocks.org/index.php?title=Installing_Code::Blocks_from_source_on_Windows#zip.exe 1.6 zip.exe] for some details about zip.exe&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Post compilation steps ===&lt;br /&gt;
When the compilation process is finished, simply run the update30.bat script. It will ensure that all resource files Code::Blocks uses are in the right place and up to date.&lt;br /&gt;
&lt;br /&gt;
=== Reference ===&lt;br /&gt;
* Forum discussion:[/index.php/topic,18412.msg125957.html#msg125957 Re: wxWidgets 3.0 and Code::Blocks files question?]&lt;br /&gt;
* [[Installing Code::Blocks from source on Windows]]&lt;br /&gt;
* Note that PCH is disabled in Codeblocks_wx30.cbp, because it cause GCC build error (a bug in GCC 4.8.x), see discussions here: [/index.php/topic,18412.msg126028.html#msg126028 Re: wxWidgets 3.0 and Code::Blocks files question?] and [/index.php/topic,18568.msg127102.html#msg127102 Patches for Compiling Code::Blocks against wxWidgets 3.0 using MinGW GCC 4.8.1]&lt;/div&gt;</summary>
		<author><name>Ollydbg</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=Compiling_wxWidgets_3.0.0_to_develop_Code::Blocks_(MSW)&amp;diff=7710</id>
		<title>Compiling wxWidgets 3.0.0 to develop Code::Blocks (MSW)</title>
		<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php?title=Compiling_wxWidgets_3.0.0_to_develop_Code::Blocks_(MSW)&amp;diff=7710"/>
		<updated>2014-01-12T07:32:34Z</updated>

		<summary type="html">&lt;p&gt;Ollydbg: /* Reference */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Note, compiling Code::Blocks linked against the wxWidgets 3.0.0 is NOT ready for stable use; CodeBlocks developers are working hard to stabilize it, also patches are welcome to accelerate the migration'''&lt;br /&gt;
&lt;br /&gt;
These are the instructions for compiling wxWidgets for use with Code::Blocks. They are primarily intended in preparation for compiling Code::Blocks itself but (hopefully) may also help installing wxWidgets for general development using that framework.&lt;br /&gt;
&lt;br /&gt;
Although these instructions are targeted at the Windows operating system, it should be possible to apply them with slight adjustments to other platforms, since we make use of MinGW.&lt;br /&gt;
&lt;br /&gt;
== Installing MinGW ==&lt;br /&gt;
Directions to install MinGW for Code::Blocks can be found here.&lt;br /&gt;
[[MinGW installation]]&lt;br /&gt;
&lt;br /&gt;
== Installing the wxWidgets Source Code ==&lt;br /&gt;
The wxWidgets 3.0.0 distribution can be found at the [http://www.wxwidgets.org/downloads/#latest_stable wxWidgets download site]. (Note that there is also a winhelp file available.) You can choose between an installer and a zip file. You can just get the zip file because the installer is also a zipped version.&lt;br /&gt;
&lt;br /&gt;
If you use the plain zip version, make sure to unzip using the full path. Otherwise the directories won't be created correctly.&lt;br /&gt;
&lt;br /&gt;
'''NOTE:''' For the remainder of these instructions we call the wxWidgets directory ''&amp;lt;WXWIN&amp;gt;''. You have to change it to your corresponding directory (e.g. &amp;quot;c:\wxMSW-3.0.0\wxWidgets-3.0.0&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
'''NOTE:''' You do not need MSYS. Furthermore, you cannot have MSYS in your path, or the wxWidgets compilation will fail. Thus, if you have MSYS installed, ensure that ''&amp;lt;MSYS&amp;gt;\bin'' '''is not''' in your path before compiling wxWidgets. wxWidgets must be compiled from a &amp;quot;regular&amp;quot; command line (like cmd.exe), not from a Unix-like shell. The same problem could arise if Cygwin is in the path.&lt;br /&gt;
&lt;br /&gt;
'''NOTE:''' For the remainder of these instructions we call the MinGW directory ''&amp;lt;MINGW&amp;gt;''. You have to change it to your corresponding directory (e.g. &amp;quot;C:\MinGW&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
== Checking make Version ==&lt;br /&gt;
If you didn't install MinGW yourself you have to ensure you are using a recent enough version of the make utility. Open a command prompt and type:&lt;br /&gt;
 &amp;lt;tt&amp;gt;cd &amp;lt;MINGW&amp;gt;\bin&lt;br /&gt;
 mingw32-make -v&amp;lt;/tt&amp;gt;&lt;br /&gt;
The version should read 3.80 or higher.&lt;br /&gt;
&lt;br /&gt;
== Building wxWidgets ==&lt;br /&gt;
=== Changing Directory and Setting Path ===&lt;br /&gt;
To compile wxWidgets, open the command prompt window and change to the wxWidgets directory:&lt;br /&gt;
 &amp;lt;tt&amp;gt;cd /d &amp;lt;WXWIN&amp;gt;\build\msw&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;tt&amp;gt;SET PATH=&amp;lt;MINGW&amp;gt;\bin&amp;lt;/tt&amp;gt;&lt;br /&gt;
'''NOTE:''' This is normally SET PATH=C:\MingGW\bin&lt;br /&gt;
&lt;br /&gt;
=== Cleaning wxWidgets Code ===&lt;br /&gt;
Now clean up the source:&lt;br /&gt;
 &amp;lt;tt&amp;gt;mingw32-make -f makefile.gcc USE_XRC=1 SHARED=1 MONOLITHIC=1 BUILD=release UNICODE=1 USE_OPENGL=1 VENDOR=cb CXXFLAGS=&amp;quot;-fno-keep-inline-dllexport&amp;quot; clean&amp;lt;/tt&amp;gt;&lt;br /&gt;
'''NOTE:''' Make sure you use exactly the same options for this step and for the build step below. The clean target uses these variables and only cleans the specified version of the generated object and library files. (It will not clean the intended files if these variables are not identical.)&lt;br /&gt;
&lt;br /&gt;
'''NOTE:''' If you still have problems with compiling after cleaning, you could try to manually remove the gcc_dll directory under the build\msw directory. This directory is the place where the object files are stored.&lt;br /&gt;
&lt;br /&gt;
=== Building wxWidgets Code ===&lt;br /&gt;
When everything is clean you can start compiling wxWidgets:&lt;br /&gt;
 &amp;lt;tt&amp;gt;mingw32-make -f makefile.gcc USE_XRC=1 SHARED=1 MONOLITHIC=1 BUILD=release UNICODE=1 USE_OPENGL=1 VENDOR=cb CXXFLAGS=&amp;quot;-fno-keep-inline-dllexport&amp;quot; &amp;gt;log.txt 2&amp;gt;&amp;amp;1&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''NOTE:''' If you want another version of wxWidgets (debug or non-Unicode) you still have to make sure you build a MONOLITHIC version (one big DLL) for linking Code::Blocks.&lt;br /&gt;
&lt;br /&gt;
Patience. This step takes time. Make sure there was no compilation error before you continue.&lt;br /&gt;
&lt;br /&gt;
== Compiling Code::Blocks ==&lt;br /&gt;
=== Code::Blocks project to use===&lt;br /&gt;
No patches are needed to compile Code::Blocks with wxWidgets 3.0, just use the project/workspace-files with the ''_wx30'' in the name and call ''update30.bat'' to update the resources.&lt;br /&gt;
&lt;br /&gt;
That does not mean, that everything runs absolutely bug-free, but we are working on it.&lt;br /&gt;
&lt;br /&gt;
As always patches are welcome.&lt;br /&gt;
&lt;br /&gt;
=== Setting up paths ===&lt;br /&gt;
Before finally compiling Code::Blocks itself, you need to setup the paths:&lt;br /&gt;
*Open the Code::Blocks project (CodeBlocks_wx30.cbp).&lt;br /&gt;
*It will ask you to define a [[Global compiler variables|Global variable]] named &amp;quot;wx30&amp;quot;&lt;br /&gt;
*Set the path to where you have wxWidgets installed (e.g. &amp;quot;c:\wxMSW-3.0.0\wxWidgets-3.0.0&amp;quot;).&lt;br /&gt;
*Set the global variable cb_release_type to &amp;quot;-g&amp;quot;. (no quote is needed when your enter the text)&lt;br /&gt;
*Compile Code::Blocks.&lt;br /&gt;
&lt;br /&gt;
'''NOTE:''' A zip.exe file should be in your PATH, so they can run post steps correctly, see [https://wiki.codeblocks.org/index.php?title=Installing_Code::Blocks_from_source_on_Windows#zip.exe 1.6 zip.exe] for some details about zip.exe&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Post compilation steps ===&lt;br /&gt;
When the compilation process is finished, simply run the update30.bat script. It will ensure that all resource files Code::Blocks uses are in the right place and up to date.&lt;br /&gt;
&lt;br /&gt;
=== Reference ===&lt;br /&gt;
* Forum discussion:[/index.php/topic,18412.msg125957.html#msg125957 Re: wxWidgets 3.0 and Code::Blocks files question?]&lt;br /&gt;
* [[Installing Code::Blocks from source on Windows]]&lt;br /&gt;
* Note that PCH is disabled in Codeblocks_wx30.cbp, because it cause GCC build error (a bug in GCC 4.8.x), see discussions here: [/index.php/topic,18412.msg126028.html#msg126028 Re: wxWidgets 3.0 and Code::Blocks files question?]&lt;/div&gt;</summary>
		<author><name>Ollydbg</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=Compiling_wxWidgets_3.0.0_to_develop_Code::Blocks_(MSW)&amp;diff=7707</id>
		<title>Compiling wxWidgets 3.0.0 to develop Code::Blocks (MSW)</title>
		<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php?title=Compiling_wxWidgets_3.0.0_to_develop_Code::Blocks_(MSW)&amp;diff=7707"/>
		<updated>2014-01-06T14:41:22Z</updated>

		<summary type="html">&lt;p&gt;Ollydbg: add one reference&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Note, compiling Code::Blocks linked against the wxWidgets 3.0.0 is NOT ready for stable use; CodeBlocks developers are working hard to stabilize it, also patches are welcome to accelerate the migration'''&lt;br /&gt;
&lt;br /&gt;
These are the instructions for compiling wxWidgets for use with Code::Blocks. They are primarily intended in preparation for compiling Code::Blocks itself but (hopefully) may also help installing wxWidgets for general development using that framework.&lt;br /&gt;
&lt;br /&gt;
Although these instructions are targeted at the Windows operating system, it should be possible to apply them with slight adjustments to other platforms, since we make use of MinGW.&lt;br /&gt;
&lt;br /&gt;
== Installing MinGW ==&lt;br /&gt;
Directions to install MinGW for Code::Blocks can be found here.&lt;br /&gt;
[[MinGW installation]]&lt;br /&gt;
&lt;br /&gt;
== Installing the wxWidgets Source Code ==&lt;br /&gt;
The wxWidgets 3.0.0 distribution can be found at the [http://www.wxwidgets.org/downloads/#latest_stable wxWidgets download site]. (Note that there is also a winhelp file available.) You can choose between an installer and a zip file. You can just get the zip file because the installer is also a zipped version.&lt;br /&gt;
&lt;br /&gt;
If you use the plain zip version, make sure to unzip using the full path. Otherwise the directories won't be created correctly.&lt;br /&gt;
&lt;br /&gt;
'''NOTE:''' For the remainder of these instructions we call the wxWidgets directory ''&amp;lt;WXWIN&amp;gt;''. You have to change it to your corresponding directory (e.g. &amp;quot;c:\wxMSW-3.0.0\wxWidgets-3.0.0&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
'''NOTE:''' You do not need MSYS. Furthermore, you cannot have MSYS in your path, or the wxWidgets compilation will fail. Thus, if you have MSYS installed, ensure that ''&amp;lt;MSYS&amp;gt;\bin'' '''is not''' in your path before compiling wxWidgets. wxWidgets must be compiled from a &amp;quot;regular&amp;quot; command line (like cmd.exe), not from a Unix-like shell. The same problem could arise if Cygwin is in the path.&lt;br /&gt;
&lt;br /&gt;
'''NOTE:''' For the remainder of these instructions we call the MinGW directory ''&amp;lt;MINGW&amp;gt;''. You have to change it to your corresponding directory (e.g. &amp;quot;C:\MinGW&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
== Checking make Version ==&lt;br /&gt;
If you didn't install MinGW yourself you have to ensure you are using a recent enough version of the make utility. Open a command prompt and type:&lt;br /&gt;
 &amp;lt;tt&amp;gt;cd &amp;lt;MINGW&amp;gt;\bin&lt;br /&gt;
 mingw32-make -v&amp;lt;/tt&amp;gt;&lt;br /&gt;
The version should read 3.80 or higher.&lt;br /&gt;
&lt;br /&gt;
== Building wxWidgets ==&lt;br /&gt;
=== Changing Directory and Setting Path ===&lt;br /&gt;
To compile wxWidgets, open the command prompt window and change to the wxWidgets directory:&lt;br /&gt;
 &amp;lt;tt&amp;gt;cd /d &amp;lt;WXWIN&amp;gt;\build\msw&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;tt&amp;gt;SET PATH=&amp;lt;MINGW&amp;gt;\bin&amp;lt;/tt&amp;gt;&lt;br /&gt;
'''NOTE:''' This is normally SET PATH=C:\MingGW\bin&lt;br /&gt;
&lt;br /&gt;
=== Cleaning wxWidgets Code ===&lt;br /&gt;
Now clean up the source:&lt;br /&gt;
 &amp;lt;tt&amp;gt;mingw32-make -f makefile.gcc USE_XRC=1 SHARED=1 MONOLITHIC=1 BUILD=release UNICODE=1 USE_OPENGL=1 VENDOR=cb CXXFLAGS=&amp;quot;-fno-keep-inline-dllexport&amp;quot; clean&amp;lt;/tt&amp;gt;&lt;br /&gt;
'''NOTE:''' Make sure you use exactly the same options for this step and for the build step below. The clean target uses these variables and only cleans the specified version of the generated object and library files. (It will not clean the intended files if these variables are not identical.)&lt;br /&gt;
&lt;br /&gt;
'''NOTE:''' If you still have problems with compiling after cleaning, you could try to manually remove the gcc_dll directory under the build\msw directory. This directory is the place where the object files are stored.&lt;br /&gt;
&lt;br /&gt;
=== Building wxWidgets Code ===&lt;br /&gt;
When everything is clean you can start compiling wxWidgets:&lt;br /&gt;
 &amp;lt;tt&amp;gt;mingw32-make -f makefile.gcc USE_XRC=1 SHARED=1 MONOLITHIC=1 BUILD=release UNICODE=1 USE_OPENGL=1 VENDOR=cb CXXFLAGS=&amp;quot;-fno-keep-inline-dllexport&amp;quot; &amp;gt;log.txt 2&amp;gt;&amp;amp;1&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''NOTE:''' If you want another version of wxWidgets (debug or non-Unicode) you still have to make sure you build a MONOLITHIC version (one big DLL) for linking Code::Blocks.&lt;br /&gt;
&lt;br /&gt;
Patience. This step takes time. Make sure there was no compilation error before you continue.&lt;br /&gt;
&lt;br /&gt;
== Compiling Code::Blocks ==&lt;br /&gt;
=== Code::Blocks project to use===&lt;br /&gt;
No patches are needed to compile Code::Blocks with wxWidgets 3.0, just use the project/workspace-files with the ''_wx30'' in the name and call ''update30.bat'' to update the resources.&lt;br /&gt;
&lt;br /&gt;
That does not mean, that everything runs absolutely bug-free, but we are working on it.&lt;br /&gt;
&lt;br /&gt;
As always patches are welcome.&lt;br /&gt;
&lt;br /&gt;
=== Setting up paths ===&lt;br /&gt;
Before finally compiling Code::Blocks itself, you need to setup the paths:&lt;br /&gt;
*Open the Code::Blocks project (CodeBlocks_wx30.cbp).&lt;br /&gt;
*It will ask you to define a [[Global compiler variables|Global variable]] named &amp;quot;wx30&amp;quot;&lt;br /&gt;
*Set the path to where you have wxWidgets installed (e.g. &amp;quot;c:\wxMSW-3.0.0\wxWidgets-3.0.0&amp;quot;).&lt;br /&gt;
*Set the global variable cb_release_type to &amp;quot;-g&amp;quot;. (no quote is needed when your enter the text)&lt;br /&gt;
*Compile Code::Blocks.&lt;br /&gt;
&lt;br /&gt;
'''NOTE:''' A zip.exe file should be in your PATH, so they can run post steps correctly, see [https://wiki.codeblocks.org/index.php?title=Installing_Code::Blocks_from_source_on_Windows#zip.exe 1.6 zip.exe] for some details about zip.exe&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Post compilation steps ===&lt;br /&gt;
When the compilation process is finished, simply run the update30.bat script. It will ensure that all resource files Code::Blocks uses are in the right place and up to date.&lt;br /&gt;
&lt;br /&gt;
=== Reference ===&lt;br /&gt;
*Forum discussion:[/index.php/topic,18412.msg125957.html#msg125957 Re: wxWidgets 3.0 and Code::Blocks files question?]&lt;br /&gt;
*[[Installing Code::Blocks from source on Windows]]&lt;/div&gt;</summary>
		<author><name>Ollydbg</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=Compiling_wxWidgets_3.0.0_to_develop_Code::Blocks_(MSW)&amp;diff=7706</id>
		<title>Compiling wxWidgets 3.0.0 to develop Code::Blocks (MSW)</title>
		<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php?title=Compiling_wxWidgets_3.0.0_to_develop_Code::Blocks_(MSW)&amp;diff=7706"/>
		<updated>2014-01-06T14:30:02Z</updated>

		<summary type="html">&lt;p&gt;Ollydbg: update the build steps, remove unnecessary steps&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Note, compiling Code::Blocks linked against the wxWidgets 3.0.0 is NOT ready for stable use; CodeBlocks developers are working hard to stabilize it, also patches are welcome to accelerate the migration'''&lt;br /&gt;
&lt;br /&gt;
These are the instructions for compiling wxWidgets for use with Code::Blocks. They are primarily intended in preparation for compiling Code::Blocks itself but (hopefully) may also help installing wxWidgets for general development using that framework.&lt;br /&gt;
&lt;br /&gt;
Although these instructions are targeted at the Windows operating system, it should be possible to apply them with slight adjustments to other platforms, since we make use of MinGW.&lt;br /&gt;
&lt;br /&gt;
== Installing MinGW ==&lt;br /&gt;
Directions to install MinGW for Code::Blocks can be found here.&lt;br /&gt;
[[MinGW installation]]&lt;br /&gt;
&lt;br /&gt;
== Installing the wxWidgets Source Code ==&lt;br /&gt;
The wxWidgets 3.0.0 distribution can be found at the [http://www.wxwidgets.org/downloads/#latest_stable wxWidgets download site]. (Note that there is also a winhelp file available.) You can choose between an installer and a zip file. You can just get the zip file because the installer is also a zipped version.&lt;br /&gt;
&lt;br /&gt;
If you use the plain zip version, make sure to unzip using the full path. Otherwise the directories won't be created correctly.&lt;br /&gt;
&lt;br /&gt;
'''NOTE:''' For the remainder of these instructions we call the wxWidgets directory ''&amp;lt;WXWIN&amp;gt;''. You have to change it to your corresponding directory (e.g. &amp;quot;c:\wxMSW-3.0.0\wxWidgets-3.0.0&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
'''NOTE:''' You do not need MSYS. Furthermore, you cannot have MSYS in your path, or the wxWidgets compilation will fail. Thus, if you have MSYS installed, ensure that ''&amp;lt;MSYS&amp;gt;\bin'' '''is not''' in your path before compiling wxWidgets. wxWidgets must be compiled from a &amp;quot;regular&amp;quot; command line (like cmd.exe), not from a Unix-like shell. The same problem could arise if Cygwin is in the path.&lt;br /&gt;
&lt;br /&gt;
'''NOTE:''' For the remainder of these instructions we call the MinGW directory ''&amp;lt;MINGW&amp;gt;''. You have to change it to your corresponding directory (e.g. &amp;quot;C:\MinGW&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
== Checking make Version ==&lt;br /&gt;
If you didn't install MinGW yourself you have to ensure you are using a recent enough version of the make utility. Open a command prompt and type:&lt;br /&gt;
 &amp;lt;tt&amp;gt;cd &amp;lt;MINGW&amp;gt;\bin&lt;br /&gt;
 mingw32-make -v&amp;lt;/tt&amp;gt;&lt;br /&gt;
The version should read 3.80 or higher.&lt;br /&gt;
&lt;br /&gt;
== Building wxWidgets ==&lt;br /&gt;
=== Changing Directory and Setting Path ===&lt;br /&gt;
To compile wxWidgets, open the command prompt window and change to the wxWidgets directory:&lt;br /&gt;
 &amp;lt;tt&amp;gt;cd /d &amp;lt;WXWIN&amp;gt;\build\msw&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;tt&amp;gt;SET PATH=&amp;lt;MINGW&amp;gt;\bin&amp;lt;/tt&amp;gt;&lt;br /&gt;
'''NOTE:''' This is normally SET PATH=C:\MingGW\bin&lt;br /&gt;
&lt;br /&gt;
=== Cleaning wxWidgets Code ===&lt;br /&gt;
Now clean up the source:&lt;br /&gt;
 &amp;lt;tt&amp;gt;mingw32-make -f makefile.gcc USE_XRC=1 SHARED=1 MONOLITHIC=1 BUILD=release UNICODE=1 USE_OPENGL=1 VENDOR=cb CXXFLAGS=&amp;quot;-fno-keep-inline-dllexport&amp;quot; clean&amp;lt;/tt&amp;gt;&lt;br /&gt;
'''NOTE:''' Make sure you use exactly the same options for this step and for the build step below. The clean target uses these variables and only cleans the specified version of the generated object and library files. (It will not clean the intended files if these variables are not identical.)&lt;br /&gt;
&lt;br /&gt;
'''NOTE:''' If you still have problems with compiling after cleaning, you could try to manually remove the gcc_dll directory under the build\msw directory. This directory is the place where the object files are stored.&lt;br /&gt;
&lt;br /&gt;
=== Building wxWidgets Code ===&lt;br /&gt;
When everything is clean you can start compiling wxWidgets:&lt;br /&gt;
 &amp;lt;tt&amp;gt;mingw32-make -f makefile.gcc USE_XRC=1 SHARED=1 MONOLITHIC=1 BUILD=release UNICODE=1 USE_OPENGL=1 VENDOR=cb CXXFLAGS=&amp;quot;-fno-keep-inline-dllexport&amp;quot; &amp;gt;log.txt 2&amp;gt;&amp;amp;1&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''NOTE:''' If you want another version of wxWidgets (debug or non-Unicode) you still have to make sure you build a MONOLITHIC version (one big DLL) for linking Code::Blocks.&lt;br /&gt;
&lt;br /&gt;
Patience. This step takes time. Make sure there was no compilation error before you continue.&lt;br /&gt;
&lt;br /&gt;
== Compiling Code::Blocks ==&lt;br /&gt;
=== Code::Blocks project to use===&lt;br /&gt;
No patches are needed to compile Code::Blocks with wxWidgets 3.0, just use the project/workspace-files with the ''_wx30'' in the name and call ''update30.bat'' to update the resources.&lt;br /&gt;
&lt;br /&gt;
That does not mean, that everything runs absolutely bug-free, but we are working on it.&lt;br /&gt;
&lt;br /&gt;
As always patches are welcome.&lt;br /&gt;
&lt;br /&gt;
=== Setting up paths ===&lt;br /&gt;
Before finally compiling Code::Blocks itself, you need to setup the paths:&lt;br /&gt;
*Open the Code::Blocks project (CodeBlocks_wx30.cbp).&lt;br /&gt;
*It will ask you to define a [[Global compiler variables|Global variable]] named &amp;quot;wx30&amp;quot;&lt;br /&gt;
*Set the path to where you have wxWidgets installed (e.g. &amp;quot;c:\wxMSW-3.0.0\wxWidgets-3.0.0&amp;quot;).&lt;br /&gt;
*Set the global variable cb_release_type to &amp;quot;-g&amp;quot;. (no quote is needed when your enter the text)&lt;br /&gt;
*Compile Code::Blocks.&lt;br /&gt;
&lt;br /&gt;
'''NOTE:''' A zip.exe file should be in your PATH, so they can run post steps correctly, see [https://wiki.codeblocks.org/index.php?title=Installing_Code::Blocks_from_source_on_Windows#zip.exe 1.6 zip.exe] for some details about zip.exe&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Post compilation steps ===&lt;br /&gt;
When the compilation process is finished, simply run the update30.bat script. It will ensure that all resource files Code::Blocks uses are in the right place and up to date.&lt;br /&gt;
&lt;br /&gt;
=== Reference forum discussion ===&lt;br /&gt;
*[/index.php/topic,18412.msg125957.html#msg125957 Re: wxWidgets 3.0 and Code::Blocks files question?]&lt;/div&gt;</summary>
		<author><name>Ollydbg</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=Compiling_wxWidgets_3.0.0_to_develop_Code::Blocks_(MSW)&amp;diff=7705</id>
		<title>Compiling wxWidgets 3.0.0 to develop Code::Blocks (MSW)</title>
		<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php?title=Compiling_wxWidgets_3.0.0_to_develop_Code::Blocks_(MSW)&amp;diff=7705"/>
		<updated>2014-01-06T06:53:47Z</updated>

		<summary type="html">&lt;p&gt;Ollydbg: first step to update the to wx3.0&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Note, compiling Code::Blocks linked against the wxWidgets 3.0.0 is NOT ready for stable use; CodeBlocks developers are working hard to stabilize it, also patches are welcome to accelerate the migration'''&lt;br /&gt;
&lt;br /&gt;
These are the instructions for compiling wxWidgets for use with Code::Blocks. They are primarily intended in preparation for compiling Code::Blocks itself but (hopefully) may also help installing wxWidgets for general development using that framework.&lt;br /&gt;
&lt;br /&gt;
Although these instructions are targeted at the Windows operating system, it should be possible to apply them with slight adjustments to other platforms, since we make use of MinGW.&lt;br /&gt;
&lt;br /&gt;
== Installing MinGW ==&lt;br /&gt;
Directions to install MinGW for Code::Blocks can be found here.&lt;br /&gt;
[[MinGW installation]]&lt;br /&gt;
&lt;br /&gt;
== Installing the wxWidgets Source Code ==&lt;br /&gt;
The wxWidgets 3.0.0 distribution can be found at the [http://www.wxwidgets.org/downloads/#latest_stable wxWidgets download site]. (Note that there is also a winhelp file available.) You can choose between an installer and a zip file. You can just get the zip file because the installer is also a zipped version.&lt;br /&gt;
&lt;br /&gt;
If you use the plain zip version, make sure to unzip using the full path. Otherwise the directories won't be created correctly.&lt;br /&gt;
&lt;br /&gt;
'''NOTE:''' For the remainder of these instructions we call the wxWidgets directory ''&amp;lt;WXWIN&amp;gt;''. You have to change it to your corresponding directory (e.g. &amp;quot;c:\wxMSW-3.0.0\wxWidgets-3.0.0&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
'''NOTE:''' You do not need MSYS. Furthermore, you cannot have MSYS in your path, or the wxWidgets compilation will fail. Thus, if you have MSYS installed, ensure that ''&amp;lt;MSYS&amp;gt;\bin'' '''is not''' in your path before compiling wxWidgets. wxWidgets must be compiled from a &amp;quot;regular&amp;quot; command line (like cmd.exe), not from a Unix-like shell. The same problem could arise if Cygwin is in the path.&lt;br /&gt;
&lt;br /&gt;
'''NOTE:''' For the remainder of these instructions we call the MinGW directory ''&amp;lt;MINGW&amp;gt;''. You have to change it to your corresponding directory (e.g. &amp;quot;C:\MinGW&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
== Checking make Version ==&lt;br /&gt;
If you didn't install MinGW yourself you have to ensure you are using a recent enough version of the make utility. Open a command prompt and type:&lt;br /&gt;
 &amp;lt;tt&amp;gt;cd &amp;lt;MINGW&amp;gt;\bin&lt;br /&gt;
 mingw32-make -v&amp;lt;/tt&amp;gt;&lt;br /&gt;
The version should read 3.80 or higher.&lt;br /&gt;
&lt;br /&gt;
== Building wxWidgets ==&lt;br /&gt;
=== Editing the values to be used in wx/setup.h ===&lt;br /&gt;
Note, changing the value of wxUSE_STC prevents error compiling Code::Blocks because it has its own custom version of STC.&lt;br /&gt;
===== Open the folder &amp;lt;WXWIN&amp;gt;\include\wx\msw\ ===== &lt;br /&gt;
===== If the file setup.h does not exist copy the file setup0.h to setup.h =====&lt;br /&gt;
===== With an text editor open &amp;lt;WXWIN&amp;gt;\include\wx\msw\setup.h =====&lt;br /&gt;
===== Change &amp;quot;#define wxUSE_STC 1&amp;quot; to &amp;quot;#define wxUSE_STC 0&amp;quot; =====&lt;br /&gt;
===== Save the changes =====&lt;br /&gt;
&lt;br /&gt;
=== Changing Directory and Setting Path ===&lt;br /&gt;
To compile wxWidgets, open the command prompt window and change to the wxWidgets directory:&lt;br /&gt;
 &amp;lt;tt&amp;gt;cd /d &amp;lt;WXWIN&amp;gt;\build\msw&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;tt&amp;gt;SET PATH=&amp;lt;MINGW&amp;gt;\bin&amp;lt;/tt&amp;gt;&lt;br /&gt;
'''NOTE:''' This is normally SET PATH=C:\MingGW\bin&lt;br /&gt;
&lt;br /&gt;
=== Cleaning wxWidgets Code ===&lt;br /&gt;
Now clean up the source:&lt;br /&gt;
 &amp;lt;tt&amp;gt;mingw32-make -f makefile.gcc MONOLITHIC=1 SHARED=1 UNICODE=1 USE_STC=0 USE_PROPGRID=1 BUILD=release clean&amp;lt;/tt&amp;gt;&lt;br /&gt;
'''NOTE:''' Make sure you use exactly the same options for this step and for the build step below. The clean target uses these variables and only cleans the specified version of the generated object and library files. (It will not clean the intended files if these variables are not identical.)&lt;br /&gt;
&lt;br /&gt;
'''NOTE:''' If you still have problems with compiling after cleaning, you could try to manually remove the gcc_msw directory under the build\msw directory. This directory is the place where the object files are stored.&lt;br /&gt;
&lt;br /&gt;
=== Building wxWidgets Code ===&lt;br /&gt;
When everything is clean you can start compiling wxWidgets:&lt;br /&gt;
 &amp;lt;tt&amp;gt;mingw32-make -f makefile.gcc MONOLITHIC=1 SHARED=1 UNICODE=1 USE_STC=0 USE_PROPGRID=1 BUILD=release&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''NOTE:''' These options are not the officially-supported Code::Blocks options because there is no official options for wxWidgets 2.9. The option of &amp;quot;USE_STC=0&amp;quot; is needed because Code::Blocks has its own customized version of it; and, if both exists it will cause errors building Code::Blocks plugins. The option &amp;quot;USE_PROPGRID=1&amp;quot; is used to help building plugins that depend on wxPropertyGrid. If you want another version of wxWidgets (debug or non-Unicode) you still have to make sure you build a MONOLITHIC version (one big DLL) for linking Code::Blocks.&lt;br /&gt;
&lt;br /&gt;
Patience. This step takes time. Make sure there was no compilation error before you continue.&lt;br /&gt;
&lt;br /&gt;
== Compiling Code::Blocks ==&lt;br /&gt;
=== Code::Blocks project to use===&lt;br /&gt;
No patches are needed to compile Code::Blocks with wxWidgets 3.0, just use the project/workspace-files with the ''_wx30'' in the name and call ''update30.bat'' to update the resources.&lt;br /&gt;
&lt;br /&gt;
That does not mean, that everything runs absolutely bug-free, but we are working on it.&lt;br /&gt;
&lt;br /&gt;
As always patches are welcome.&lt;br /&gt;
&lt;br /&gt;
=== Setting up paths ===&lt;br /&gt;
Before finally compiling Code::Blocks itself, you need to setup the paths:&lt;br /&gt;
*Open the Code::Blocks project (CodeBlocks_wx30.cbp).&lt;br /&gt;
*It will ask you to define a [[Global compiler variables|Global variable]]&lt;br /&gt;
*Set the path to where you have wxWidgets installed (e.g. &amp;quot;c:\wxMSW-3.0.0\wxWidgets-3.0.0&amp;quot;).&lt;br /&gt;
*Compile Code::Blocks.&lt;br /&gt;
&lt;br /&gt;
=== Post compilation steps ===&lt;br /&gt;
When the compilation process is finished, simply run the update.bat script. It will ensure that all resource files Code::Blocks uses are in the right place and up to date.&lt;br /&gt;
&lt;br /&gt;
=== Reference forum discussion ===&lt;br /&gt;
*[/index.php/topic,18412.msg125957.html#msg125957 Re: wxWidgets 3.0 and Code::Blocks files question?]&lt;/div&gt;</summary>
		<author><name>Ollydbg</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=Compiling_wxWidgets_2.9.0_to_develop_Code::Blocks_(MSW)&amp;diff=7704</id>
		<title>Compiling wxWidgets 2.9.0 to develop Code::Blocks (MSW)</title>
		<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php?title=Compiling_wxWidgets_2.9.0_to_develop_Code::Blocks_(MSW)&amp;diff=7704"/>
		<updated>2014-01-06T04:16:53Z</updated>

		<summary type="html">&lt;p&gt;Ollydbg: moved Compiling wxWidgets 2.9.0 to develop Code::Blocks (MSW) to Compiling wxWidgets 3.0.0 to develop Code::Blocks (MSW): wx 3.0.0 is release, and wx 2.9.x is deprecated.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#REDIRECT [[Compiling wxWidgets 3.0.0 to develop Code::Blocks (MSW)]]&lt;/div&gt;</summary>
		<author><name>Ollydbg</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=Compiling_wxWidgets_3.0.0_to_develop_Code::Blocks_(MSW)&amp;diff=7703</id>
		<title>Compiling wxWidgets 3.0.0 to develop Code::Blocks (MSW)</title>
		<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php?title=Compiling_wxWidgets_3.0.0_to_develop_Code::Blocks_(MSW)&amp;diff=7703"/>
		<updated>2014-01-06T04:16:53Z</updated>

		<summary type="html">&lt;p&gt;Ollydbg: moved Compiling wxWidgets 2.9.0 to develop Code::Blocks (MSW) to Compiling wxWidgets 3.0.0 to develop Code::Blocks (MSW): wx 3.0.0 is release, and wx 2.9.x is deprecated.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Note, the wxWidgets 2.9.0 release is a development release NOT intended for production use.''' &lt;br /&gt;
&lt;br /&gt;
'''Note, compiling Code::Blocks linked against the wxWidgets 2.9.0 is NOT ready for stable use; it crashes and fails to compile from time to time.'''&lt;br /&gt;
&lt;br /&gt;
These are the instructions for compiling wxWidgets for use with Code::Blocks. They are primarily intended in preparation for compiling Code::Blocks itself but (hopefully) may also help installing wxWidgets for general development using that framework.&lt;br /&gt;
&lt;br /&gt;
Although these instructions are targeted at the Windows operating system, it should be possible to apply them with slight adjustments to other platforms, since we make use of MinGW.&lt;br /&gt;
&lt;br /&gt;
== Installing MinGW ==&lt;br /&gt;
Directions to install MinGW for Code::Blocks can be found here.&lt;br /&gt;
[[MinGW installation]]&lt;br /&gt;
&lt;br /&gt;
== Installing the wxWidgets Source Code ==&lt;br /&gt;
The wxWidgets 2.9.0 distribution can be found at the [http://www.wxwidgets.org/downloads/#previous_stable wxWidgets download site]. (Note that there is also a winhelp file available.) You can choose between an installer and a zip file. You can just get the zip file because the installer is also a zipped version.&lt;br /&gt;
&lt;br /&gt;
If you use the plain zip version, make sure to unzip using the full path. Otherwise the directories won't be created correctly.&lt;br /&gt;
&lt;br /&gt;
'''NOTE:''' For the remainder of these instructions we call the wxWidgets directory ''&amp;lt;WXWIN&amp;gt;''. You have to change it to your corresponding directory (e.g. &amp;quot;c:\wxMSW-2.9.0\wxWidgets-2.9.0&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
'''NOTE:''' You do not need MSYS. Furthermore, you cannot have MSYS in your path, or the wxWidgets compilation will fail. Thus, if you have MSYS installed, ensure that ''&amp;lt;MSYS&amp;gt;\bin'' '''is not''' in your path before compiling wxWidgets. wxWidgets must be compiled from a &amp;quot;regular&amp;quot; command line (like cmd.exe), not from a Unix-like shell. The same problem could arise if Cygwin is in the path.&lt;br /&gt;
&lt;br /&gt;
'''NOTE:''' For the remainder of these instructions we call the MinGW directory ''&amp;lt;MINGW&amp;gt;''. You have to change it to your corresponding directory (e.g. &amp;quot;C:\MinGW&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
== Checking make Version ==&lt;br /&gt;
If you didn't install MinGW yourself you have to ensure you are using a recent enough version of the make utility. Open a command prompt and type:&lt;br /&gt;
 &amp;lt;tt&amp;gt;cd &amp;lt;MINGW&amp;gt;\bin&lt;br /&gt;
 mingw32-make -v&amp;lt;/tt&amp;gt;&lt;br /&gt;
The version should read 3.80 or higher.&lt;br /&gt;
&lt;br /&gt;
== Building wxWidgets ==&lt;br /&gt;
=== Editing the values to be used in wx/setup.h ===&lt;br /&gt;
Note, changing the value of wxUSE_STC prevents error compiling Code::Blocks because it has its own custom version of STC.&lt;br /&gt;
===== Open the folder &amp;lt;WXWIN&amp;gt;\include\wx\msw\ ===== &lt;br /&gt;
===== If the file setup.h does not exist copy the file setup0.h to setup.h =====&lt;br /&gt;
===== With an text editor open &amp;lt;WXWIN&amp;gt;\include\wx\msw\setup.h =====&lt;br /&gt;
===== Change &amp;quot;#define wxUSE_STC 1&amp;quot; to &amp;quot;#define wxUSE_STC 0&amp;quot; =====&lt;br /&gt;
===== Save the changes =====&lt;br /&gt;
&lt;br /&gt;
=== Changing Directory and Setting Path ===&lt;br /&gt;
To compile wxWidgets, open the command prompt window and change to the wxWidgets directory:&lt;br /&gt;
 &amp;lt;tt&amp;gt;cd /d &amp;lt;WXWIN&amp;gt;\build\msw&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;tt&amp;gt;SET PATH=&amp;lt;MINGW&amp;gt;\bin&amp;lt;/tt&amp;gt;&lt;br /&gt;
'''NOTE:''' This is normally SET PATH=C:\MingGW\bin&lt;br /&gt;
&lt;br /&gt;
=== Cleaning wxWidgets Code ===&lt;br /&gt;
Now clean up the source:&lt;br /&gt;
 &amp;lt;tt&amp;gt;mingw32-make -f makefile.gcc MONOLITHIC=1 SHARED=1 UNICODE=1 USE_STC=0 USE_PROPGRID=1 BUILD=release clean&amp;lt;/tt&amp;gt;&lt;br /&gt;
'''NOTE:''' Make sure you use exactly the same options for this step and for the build step below. The clean target uses these variables and only cleans the specified version of the generated object and library files. (It will not clean the intended files if these variables are not identical.)&lt;br /&gt;
&lt;br /&gt;
'''NOTE:''' If you still have problems with compiling after cleaning, you could try to manually remove the gcc_msw directory under the build\msw directory. This directory is the place where the object files are stored.&lt;br /&gt;
&lt;br /&gt;
=== Building wxWidgets Code ===&lt;br /&gt;
When everything is clean you can start compiling wxWidgets:&lt;br /&gt;
 &amp;lt;tt&amp;gt;mingw32-make -f makefile.gcc MONOLITHIC=1 SHARED=1 UNICODE=1 USE_STC=0 USE_PROPGRID=1 BUILD=release&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''NOTE:''' These options are not the officially-supported Code::Blocks options because there is no official options for wxWidgets 2.9. The option of &amp;quot;USE_STC=0&amp;quot; is needed because Code::Blocks has its own customized version of it; and, if both exists it will cause errors building Code::Blocks plugins. The option &amp;quot;USE_PROPGRID=1&amp;quot; is used to help building plugins that depend on wxPropertyGrid. If you want another version of wxWidgets (debug or non-Unicode) you still have to make sure you build a MONOLITHIC version (one big DLL) for linking Code::Blocks.&lt;br /&gt;
&lt;br /&gt;
Patience. This step takes time. Make sure there was no compilation error before you continue.&lt;br /&gt;
&lt;br /&gt;
== Compiling Code::Blocks ==&lt;br /&gt;
=== Patching Code::Blocks to using 2.9 instead of 2.8 ===&lt;br /&gt;
No patches are needed to compile Code::Blocks with wxWidgets 2.9, just use the project/workspace-files with the ''_wx29'' in the name and call ''update29,bat'' to update the resources.&lt;br /&gt;
&lt;br /&gt;
That does not mean, that everything runs absolutely bug-free, but we are working on it.&lt;br /&gt;
&lt;br /&gt;
As always patches are welcome.&lt;br /&gt;
&lt;br /&gt;
=== Setting up paths ===&lt;br /&gt;
Before finally compiling Code::Blocks itself, you need to setup the paths:&lt;br /&gt;
*Open the Code::Blocks project (CodeBlocks.cbp).&lt;br /&gt;
*It will ask you to define a [[Global compiler variables|Global variable]]&lt;br /&gt;
*Set the path to where you have wxWidgets installed (e.g. &amp;quot;c:\wxMSW-2.9.0\wxWidgets-2.9.0&amp;quot;).&lt;br /&gt;
*Compile Code::Blocks.&lt;br /&gt;
&lt;br /&gt;
=== Post compilation steps ===&lt;br /&gt;
When the compilation process is finished, simply run the update.bat script. It will ensure that all resource files Code::Blocks uses are in the right place and up to date.&lt;/div&gt;</summary>
		<author><name>Ollydbg</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=Developer_documentation&amp;diff=7702</id>
		<title>Developer documentation</title>
		<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php?title=Developer_documentation&amp;diff=7702"/>
		<updated>2014-01-06T04:02:30Z</updated>

		<summary type="html">&lt;p&gt;Ollydbg: add some source mirrors&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Code::Blocks Documentation]]&lt;br /&gt;
[[Category:Developer Documentation]]&lt;br /&gt;
{{Layout_box2|1=&lt;br /&gt;
'''Official Code repository Subversion'''&amp;lt;br/&amp;gt;&lt;br /&gt;
* Web-interface by ViewVC: http://sourceforge.net/p/codeblocks/code/log/&lt;br /&gt;
* Subversion URL: &amp;lt;nowiki&amp;gt;svn://svn.code.sf.net/p/codeblocks/code/trunk&amp;lt;/nowiki&amp;gt; or &amp;lt;nowiki&amp;gt;http://svn.code.sf.net/p/codeblocks/code/trunk&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Mirror by biplab''' (Read-only; refreshed every 10 minutes.)&lt;br /&gt;
* Subversion URL: &amp;lt;nowiki&amp;gt;svn://cb.biplab.in/codeblocks/trunk&amp;lt;/nowiki&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
* Web-interface: http://cb.biplab.in/websvn/&lt;br /&gt;
* Git URL: git://cb.biplab.in/codeblocks.git&lt;br /&gt;
* Web-interface:http://cb.biplab.in/cgit/&lt;br /&gt;
&lt;br /&gt;
'''Mirror by Jens''' (Read-only; refreshed every 10 minutes.)&lt;br /&gt;
* Web-interface: http://cgit.jenslody.de/&lt;br /&gt;
* the above link contains many mirrors such as wxWidgets trunk, git mirror, and git mirror of codeblocks.github&lt;br /&gt;
&lt;br /&gt;
'''Mirror by Obf''' (Read-only; refreshed every 10 minutes.)&lt;br /&gt;
* Web-interface: https://github.com/obfuscated/codeblocks_sf&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Articles for Code::Blocks developers.'''&lt;br /&gt;
&lt;br /&gt;
* '''&amp;lt;u&amp;gt;Documentation&amp;lt;/u&amp;gt;'''&lt;br /&gt;
:[https://www.codeblocks.org/manual.shtml User's manual] in various formats and languages.&lt;br /&gt;
:Also see http://developer.berlios.de/projects/codeblocks/ (under the downloads section).&lt;br /&gt;
:Checkout the SDK documentation at http://developer.berlios.de/project/showfiles.php?group_id=5358 as CHM file(s).&lt;br /&gt;
&lt;br /&gt;
* Compile the complete Code::Blocks from sources on '''[[Installing Code::Blocks from source on Windows|Windows]]''' and '''[[Installing Code::Blocks from source on Linux|Linux]]'''&lt;br /&gt;
&lt;br /&gt;
* '''[[Compile Code::Blocks plugins based on a nightly]]''' without the need to compile wxWidgets or the Code::Blocks core.&lt;br /&gt;
&lt;br /&gt;
* '''[http://launchpad.net/products/codeblocks/ Translation]'''&lt;br /&gt;
:Code::Blocks uses Launchpad to coordinate translation efforts.&lt;br /&gt;
&lt;br /&gt;
* '''[[Coding style]]'''&lt;br /&gt;
:The source code formatting style used in the Code::Blocks' source.&lt;br /&gt;
&lt;br /&gt;
* '''[[Creating a custom lexer for Code::Blocks editor]]'''&lt;br /&gt;
:How to add support for new syntax lighting schemes.&lt;br /&gt;
&lt;br /&gt;
* '''[[Creating a patch to submit to BerliOS (Patch Tracker)]]'''&lt;br /&gt;
:Creating a diff file and then submitting it to the patch tracker.&lt;br /&gt;
&lt;br /&gt;
* '''[[Unicode Standards]]'''&lt;br /&gt;
:Information about unicode standards and how unicode is handled in Code::Blocks' source code.&lt;br /&gt;
&lt;br /&gt;
* '''[[Various development tips]]'''&lt;br /&gt;
:List of various development tips for Code::Blocks.&lt;br /&gt;
&lt;br /&gt;
* '''[[Scripting Code::Blocks]]'''&lt;br /&gt;
:Information about scripting Code::Blocks with [http://www.squirrel-lang.org/ Squirrel].&lt;br /&gt;
&lt;br /&gt;
* '''[[A short overview about Code::Blocks architecture]]'''&lt;br /&gt;
:Information about the architecture of Code::Blocks.&lt;br /&gt;
&lt;br /&gt;
* '''[[Code::Blocks SDK events]]'''&lt;br /&gt;
:Information about the Code::Blocks SDK events and how to work with them.&lt;br /&gt;
&lt;br /&gt;
* '''[[File formats description]]'''&lt;br /&gt;
:Description of the format of each file Code::Blocks produces.&lt;br /&gt;
&lt;br /&gt;
* '''[[Version control]]'''&lt;br /&gt;
:Tips and trick for working with our version control system.&lt;br /&gt;
&lt;br /&gt;
== Plug-In development ==&lt;br /&gt;
&lt;br /&gt;
* [[Creating a simple &amp;quot;Hello World&amp;quot; plugin]]&lt;br /&gt;
* [[Creating a Plug-in which modifies CB's Menus]]&lt;br /&gt;
* [[Creating a plugin that actually does something]]&lt;br /&gt;
* [[Linking the plugin to a Nightly Build]]&lt;br /&gt;
* [[Managing Plug-in Resources]]&lt;br /&gt;
&lt;br /&gt;
* [[Research on doing a Plug-in for embedded help in CB]]&lt;br /&gt;
&lt;br /&gt;
* [[wxSmith extensions]]&lt;br /&gt;
* [[Code::Completion Rewrite]] and [[Code Completion plugin]] and [[Code Completion Design]]&lt;br /&gt;
&lt;br /&gt;
== Scripting ==&lt;br /&gt;
&lt;br /&gt;
Using scripting to extend Code::Blocks' functionality&lt;br /&gt;
&lt;br /&gt;
* [[Wizard scripts|Creating a new project wizard]]&lt;br /&gt;
&lt;br /&gt;
== Debugging C::B ==&lt;br /&gt;
&lt;br /&gt;
When C::B crashed, it will generate a call-stack file &amp;quot;codeblocks.RPT&amp;quot;, at the crash point, this is a text file, you can open it, if your C::B contains the debug information, it will have file and line information about each call. If it is a stripped version, but you have the debug version of C::B, you can try to run the [/index.php/topic,13129.msg88254.html#msg88254 Debugging made easier], this is a address2line UI interface works under Windows.&lt;/div&gt;</summary>
		<author><name>Ollydbg</name></author>
	</entry>
</feed>