<?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=Mgimenez</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=Mgimenez"/>
	<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php/Special:Contributions/Mgimenez"/>
	<updated>2026-04-20T10:38:09Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.35.0</generator>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=Tools%2B_reference&amp;diff=9842</id>
		<title>Tools+ reference</title>
		<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php?title=Tools%2B_reference&amp;diff=9842"/>
		<updated>2025-03-03T09:15:15Z</updated>

		<summary type="html">&lt;p&gt;Mgimenez: /* Export makefile */ Make link absolute&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category: User Documentation]]&lt;br /&gt;
=Tool Creation=&lt;br /&gt;
[[File:ToolsSetup.png|right]]&lt;br /&gt;
Creating a new tool is fairly simple, and can be completed in a few simple steps. First open ''Tools(+)-&amp;gt;Configure Tools...'' to access the &amp;quot;User-defined Tools&amp;quot; dialog.&lt;br /&gt;
==Tool Name==&lt;br /&gt;
This is the name that will be displayed in the Tools(+) drop-down menu. It will also be displayed as the tab name for tools that redirect to the Tools output window.&lt;br /&gt;
==Command Line==&lt;br /&gt;
Any valid command line function and switches can be placed here. Variable substitution is also accepted. The following list contains the more useful variables; see [[variable expansion]] for the full list.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;$relfile&amp;lt;/code&amp;gt;,&amp;lt;code&amp;gt;$file&amp;lt;/code&amp;gt;: respectively the relative and absolute name of a selected file&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;$reldir&amp;lt;/code&amp;gt;,&amp;lt;code&amp;gt;$dir&amp;lt;/code&amp;gt;: respectively the relative and absolute name of a selected directory&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;$relpath&amp;lt;/code&amp;gt;,&amp;lt;code&amp;gt;$path&amp;lt;/code&amp;gt;: the relative and absolute name of the selected file or directory&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;$mpaths&amp;lt;/code&amp;gt;: a list of selected files or directories (absolute paths only)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;$fname&amp;lt;/code&amp;gt;,&amp;lt;code&amp;gt;$fext&amp;lt;/code&amp;gt;: the name without extension and the extension without name of a selected file&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;$inputstr{prompt}&amp;lt;/code&amp;gt;: prompts the user to enter a string of text which is substituted into the command line&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;$if(condition){true clause}{false clause}&amp;lt;/code&amp;gt;: resolves to &amp;lt;code&amp;gt;false clause&amp;lt;/code&amp;gt; if &amp;lt;code&amp;gt;condition&amp;lt;/code&amp;gt; is empty, 0, or false; otherwise &amp;lt;code&amp;gt;true clause&amp;lt;/code&amp;gt;&lt;br /&gt;
==File Types==&lt;br /&gt;
Wildcard expressions separated by semicolons will restrict population of the right click menu of a file, directory, or multiple paths in the Project Tree, File Explorer, or Editor Pane to the specified type(s). Leave blank to handle all file/directory types.&lt;br /&gt;
==Working Directory==&lt;br /&gt;
The directory from which the command is executed.  Code::Blocks variables, project variables, and global variables are available. Also,&lt;br /&gt;
# If you have specified &amp;lt;code&amp;gt;$dir&amp;lt;/code&amp;gt; in the command line then you can use &amp;lt;code&amp;gt;$dir&amp;lt;/code&amp;gt; here also.&lt;br /&gt;
# &amp;lt;code&amp;gt;$parentdir&amp;lt;/code&amp;gt; is available for &amp;lt;code&amp;gt;$relfile&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;$file&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;$reldir&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;$dir&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;$relpath&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;$path&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;$fname&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;$fext&amp;lt;/code&amp;gt; and is the absolute path of the directory containing the item.&lt;br /&gt;
==Tools Menu Path==&lt;br /&gt;
[[File:ToolsMenuPath.png|right]]&lt;br /&gt;
Controls the placement of the command in the Tools(+) menu, giving the option of adding submenues (multiple levels are allowed).&lt;br /&gt;
: Submenu/Tool1&lt;br /&gt;
: Submenu/Tool2&lt;br /&gt;
: Tool3&lt;br /&gt;
Will create this structure.&lt;br /&gt;
&lt;br /&gt;
The command name will be used if this entry is blank. If the first character is a period, the command will be hidden.&lt;br /&gt;
==Context Menu Path==&lt;br /&gt;
[[File:ToolsContextPath.png|right]]&lt;br /&gt;
This controls the command's placement in the right-click menu of the Projects and Files tabs of the Management pane. The same rules of structure with the Tools Menu Path apply here.&lt;br /&gt;
&lt;br /&gt;
Please note that the command will not show up in the context menu unless the Command Line contains one or more of the following: &amp;lt;code&amp;gt;$relfile&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;$file&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;$reldir&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;$dir&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;$relpath&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;$path&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;$fname&amp;lt;/code&amp;gt;, and &amp;lt;code&amp;gt;$fext&amp;lt;/code&amp;gt;.&lt;br /&gt;
==Output to==&lt;br /&gt;
This determines where the output of the command will be redirected. The purpose and function of the command will determine which is best to select.&lt;br /&gt;
===Tools Output Window===&lt;br /&gt;
Tools that only output results command line (and require no input) generally use this setting. The program will be run invisibly and any output will be redirected to the appropriate tab of the Tools Output Window. The text '''&amp;lt;nowiki&amp;gt;[DONE]&amp;lt;/nowiki&amp;gt;''' will be added upon the tool's completion.&lt;br /&gt;
&lt;br /&gt;
[[File:ToolOutput.png]]&lt;br /&gt;
===Code::Blocks Console===&lt;br /&gt;
This will cause the program to be run through the executable '''cb_console_runner''' (the same program that is launched after '''Build and run'''). This is generally used for command line tools with more advanced user interactions, although GUI programs can also be used (especially if the program is unstable and/or also leaves messages in the standard output). Console runner will pause the window (prevent it from closing), display the run time, and the exit code when the program finishes.&lt;br /&gt;
===Standard Shell===&lt;br /&gt;
This is the same as placing the command in a batch or shell script, then running it. The program will run in whatever its default method is, and when it finishes, its window will close. This setting is useful for running a program (for example a file or web browser) that must remain open after Code::Blocks is closed.&lt;br /&gt;
==Notes==&lt;br /&gt;
As the Tools+ plugin is not yet complete, some functionality - specifically Menu Priority and Environment Variables - are not available.&lt;br /&gt;
&lt;br /&gt;
If the Tools Output window is open when Code::Blocks is closed, it may trigger Code::Blocks to crash.&lt;br /&gt;
=Example Tools=&lt;br /&gt;
===Open file browser to selected file===&lt;br /&gt;
* Windows Explorer&lt;br /&gt;
: &amp;lt;code&amp;gt;explorer /select,&amp;quot;$(PROJECTFILE)&amp;quot;&amp;lt;/code&amp;gt; (Tools Menu)&lt;br /&gt;
: &amp;lt;code&amp;gt;explorer /select,&amp;quot;$path&amp;quot;&amp;lt;/code&amp;gt; (Context Menu)&lt;br /&gt;
* Dolphin&lt;br /&gt;
: &amp;lt;code&amp;gt;dolphin --select &amp;quot;$(PROJECTFILE)&amp;quot;&amp;lt;/code&amp;gt; (Tools Menu)&lt;br /&gt;
: &amp;lt;code&amp;gt;dolphin --select &amp;quot;$path&amp;quot;&amp;lt;/code&amp;gt; (Context Menu)&lt;br /&gt;
''Note: the following three commands Context Menu only support folders (but not files). If you know how to script a conversion to cause ''&amp;lt;code&amp;gt;$path&amp;lt;/code&amp;gt;'' or ''&amp;lt;code&amp;gt;$file&amp;lt;/code&amp;gt;'' to return the parent directory, please add it here.''&lt;br /&gt;
* Nautilus&lt;br /&gt;
: &amp;lt;code&amp;gt;nautilus --no-desktop --browser &amp;quot;$(PROJECTDIR)&amp;quot;&amp;lt;/code&amp;gt; (Tools Menu)&lt;br /&gt;
: &amp;lt;code&amp;gt;nautilus --no-desktop --browser &amp;quot;$dir&amp;quot;&amp;lt;/code&amp;gt; (Context Menu)&lt;br /&gt;
* Thunar&lt;br /&gt;
: &amp;lt;code&amp;gt;thunar &amp;quot;$(PROJECTDIR)&amp;quot;&amp;lt;/code&amp;gt; (Tools Menu)&lt;br /&gt;
: &amp;lt;code&amp;gt;thunar &amp;quot;$dir&amp;quot;&amp;lt;/code&amp;gt; (Context Menu)&lt;br /&gt;
* PCMan File Manager&lt;br /&gt;
: &amp;lt;code&amp;gt;pcmanfm &amp;quot;$(PROJECTDIR)&amp;quot;&amp;lt;/code&amp;gt; (Tools Menu)&lt;br /&gt;
: &amp;lt;code&amp;gt;pcmanfm &amp;quot;$dir&amp;quot;&amp;lt;/code&amp;gt; (Context Menu)&lt;br /&gt;
===Update Subversion directory===&lt;br /&gt;
* Windows&lt;br /&gt;
: &amp;lt;code&amp;gt;&amp;quot;'''''path_to_svn'''''\bin\svn&amp;quot; update &amp;quot;$inputstr{Directory}&amp;quot;&amp;lt;/code&amp;gt; (Tools Menu)&lt;br /&gt;
: &amp;lt;code&amp;gt;&amp;quot;'''''path_to_svn'''''\bin\svn&amp;quot; update &amp;quot;$dir&amp;quot;&amp;lt;/code&amp;gt; (Context Menu and Tools Menu)&lt;br /&gt;
* Linux&lt;br /&gt;
: &amp;lt;code&amp;gt;svn update &amp;quot;$inputstr{Directory}&amp;quot;&amp;lt;/code&amp;gt; (Tools Menu)&lt;br /&gt;
: &amp;lt;code&amp;gt;svn update &amp;quot;$dir&amp;quot;&amp;lt;/code&amp;gt; (Context Menu and Tools Menu)&lt;br /&gt;
===Export makefile===&lt;br /&gt;
''Note: this uses the command line-tool cbp2make. Discussion: ''[https://wiki.codeblocks.org/index.php/topic,13675.0.html]'' Download: ''[https://sourceforge.net/projects/cbp2make/files/]&lt;br /&gt;
* Windows&lt;br /&gt;
: &amp;lt;code&amp;gt;&amp;quot;'''''path_to_cbp2make'''''\cbp2make&amp;quot; -in &amp;quot;$(PROJECTFILE)&amp;quot;&amp;lt;/code&amp;gt; (Tools Menu)&lt;br /&gt;
* Linux&lt;br /&gt;
: &amp;lt;code&amp;gt;&amp;quot;'''''path_to_cbp2make'''''/cbp2make&amp;quot; -in &amp;quot;$(PROJECTFILE)&amp;quot;&amp;lt;/code&amp;gt; (Tools Menu)&lt;br /&gt;
&lt;br /&gt;
===Compress active project to archive===&lt;br /&gt;
* Windows&lt;br /&gt;
** 7z or zip&lt;br /&gt;
: &amp;lt;code&amp;gt;&amp;quot;'''''path_to_7z'''''\7z&amp;quot; a -t$if(zip == $inputstr{7z or zip?}){zip -mm=Deflate -mmt=on -mx9 -mfb=128 -mpass=10}{7z -m0=LZMA -mx9 -md=64m -mfb=64 -ms=on} -sccUTF-8 &amp;quot;-w$(PROJECTDIR)..&amp;quot; &amp;quot;$(PROJECTDIR)..\$(PROJECT_NAME)&amp;quot; &amp;quot;$(PROJECTDIR)*&amp;quot;&amp;lt;/code&amp;gt; (Tools Menu)&lt;br /&gt;
:* tar.gz or tar.bz2 ''(Note: works in ''Tools Output Window'' and ''Standard Shell'', but not ''Code::Blocks Console''.)''&lt;br /&gt;
: &amp;lt;code&amp;gt;cmd /c &amp;quot;&amp;quot;'''''path_to_7z'''''\7z&amp;quot; a -ttar -mx0 -sccUTF-8 &amp;quot;-w$(PROJECTDIR)..&amp;quot; &amp;quot;$(PROJECTDIR)..\$(PROJECT_NAME)&amp;quot; &amp;quot;$(PROJECTDIR)*&amp;quot; &amp;amp;&amp;amp; &amp;quot;'''''path_to_7z'''''\7z&amp;quot; a -t$if(gz == $inputstr{gz or bz2?}){gzip -mx9 -mfb=128 -mpass=10 -sccUTF-8 &amp;quot;-w$(PROJECTDIR)..&amp;quot; &amp;quot;$(PROJECTDIR)..\$(PROJECT_NAME).tar.gz}{bzip2 -mmt=on -mx9 -md=900k -mpass=7 -sccUTF-8 &amp;quot;-w$(PROJECTDIR)..&amp;quot; &amp;quot;$(PROJECTDIR)..\$(PROJECT_NAME).tar.bz2}&amp;quot; &amp;quot;$(PROJECTDIR)..\$(PROJECT_NAME).tar&amp;quot; &amp;amp;&amp;amp; cmd /c del &amp;quot;$(PROJECTDIR)..\$(PROJECT_NAME).tar&amp;quot;&amp;quot;&amp;lt;/code&amp;gt; (Tools Menu)&lt;br /&gt;
* Linux&lt;br /&gt;
** 7z or zip&lt;br /&gt;
: &amp;lt;code&amp;gt;7z a -t$if(zip == $inputstr{7z or zip?}){zip -mm=Deflate -mmt=on -mx9 -mfb=128 -mpass=10}{7z -m0=LZMA -mx9 -md=64m -mfb=64 -ms=on} -sccUTF-8 &amp;quot;-w$(PROJECTDIR)..&amp;quot; &amp;quot;$(PROJECTDIR)../$(PROJECT_NAME)&amp;quot; &amp;quot;$(PROJECTDIR)*&amp;quot;&amp;lt;/code&amp;gt; (Tools Menu)&lt;br /&gt;
:* tar.gz or tar.bz2&lt;br /&gt;
: &amp;lt;code&amp;gt;tar -cf &amp;quot;$(PROJECTDIR)../$(PROJECT_NAME).tar.$if(gz == $inputstr{gz or bz2?}){gz&amp;quot; -I 'gzip}{bz2&amp;quot; -I 'bzip2} -9' &amp;quot;$(PROJECTDIR)*&amp;quot;&amp;lt;/code&amp;gt; (Tools Menu)&lt;/div&gt;</summary>
		<author><name>Mgimenez</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=Code::Blocks_command_line_arguments&amp;diff=9821</id>
		<title>Code::Blocks command line arguments</title>
		<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php?title=Code::Blocks_command_line_arguments&amp;diff=9821"/>
		<updated>2024-11-05T13:18:14Z</updated>

		<summary type="html">&lt;p&gt;Mgimenez: /* Command line arguments */ Add missing arguments and remove duplicated ones&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category: User Documentation]]&lt;br /&gt;
== Using command line arguments ==&lt;br /&gt;
&lt;br /&gt;
=== Windows ===&lt;br /&gt;
&lt;br /&gt;
# Find the Code::Blocks shortcut in the Desktop or Start menu.&lt;br /&gt;
# Right click on the icon and select Properties.&lt;br /&gt;
# Select the Shortcut tab.&lt;br /&gt;
# Append the command line arguments you want to use to the end of the Target text (behind the quote mark).&lt;br /&gt;
# Run Code::Blocks by using the shortcut you edited.&lt;br /&gt;
&lt;br /&gt;
'''Example'''&lt;br /&gt;
&lt;br /&gt;
 &amp;quot;C:\Program Files\CodeBlocks\codeblocks.exe&amp;quot; /na /nd&lt;br /&gt;
&lt;br /&gt;
=== *nix ===&lt;br /&gt;
&lt;br /&gt;
# Launch a terminal client, such as XTerm, Gnome Terminal or Konsole.&lt;br /&gt;
# Type &amp;quot;codeblocks&amp;quot; and then append the command line arguments you want to use.&lt;br /&gt;
&lt;br /&gt;
Note: Code::Blocks can not run on a real console, X11 must be running and you must use a graphical terminal emulator.&lt;br /&gt;
&lt;br /&gt;
'''Example'''&lt;br /&gt;
&lt;br /&gt;
 codeblocks --no-splash-screen --debug-log&lt;br /&gt;
&lt;br /&gt;
== Command line arguments ==&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;3&amp;quot; cellspacing=&amp;quot;0&amp;quot; style=&amp;quot;border: 1px solid gray; border-collapse: collapse;&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
|- style=&amp;quot;background: #ececec; border: 1px solid gray&amp;quot;&lt;br /&gt;
!&lt;br /&gt;
! Argument&lt;br /&gt;
! Function&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|Windows&lt;br /&gt;
|Windows(MSYS2, WSL)&lt;br /&gt;
Linux, Unix, MacOS&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|''&amp;lt;filename&amp;gt;''&lt;br /&gt;
| Specifies the project *.cbp filename or workspace *.workspace filename. For instance ''&amp;lt;filename&amp;gt;'' may be ''c:\some\where\a\project.cbp''. Place this argument at end of command line, just before output redirection if any.&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|'''/h''', '''/?'''&lt;br /&gt;
|'''--help''', '''--?'''&lt;br /&gt;
| Shows a help message about the command line arguments.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|'''--safe-mode'''&lt;br /&gt;
|Load in safe mode (all plugins will be disabled).&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|'''/na'''&lt;br /&gt;
|'''--no-check-associations'''&lt;br /&gt;
| Don't perform any file association checks (Windows only).&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|'''/nd'''&lt;br /&gt;
|'''--no-dde'''&lt;br /&gt;
| Don't start a [http://en.wikipedia.org/wiki/Dynamic_Data_Exchange DDE] server (Windows only).&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|'''/ns'''&lt;br /&gt;
|'''--no-splash-screen'''&lt;br /&gt;
| Hides the splash screen when the application is loading.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|'''--multiple-instance'''&lt;br /&gt;
|Allow running multiple instances.&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|'''/d'''&lt;br /&gt;
|'''--debug-log'''&lt;br /&gt;
| Display application's debug log.&lt;br /&gt;
|-&lt;br /&gt;
|'''/nc'''&lt;br /&gt;
|'''--no-crash-handler'''&lt;br /&gt;
|Do not use the crash handler (useful for debugging C::B).&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|'''/v'''&lt;br /&gt;
|'''--verbose'''&lt;br /&gt;
| Show more debugging messages.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|'''--prefix''='''''&amp;lt;nowiki/&amp;gt;''&amp;lt;str&amp;gt;''&lt;br /&gt;
| Sets the shared data directory prefix.&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|'''--user-data-dir'''=&amp;lt;str&amp;gt;&lt;br /&gt;
| Specify an alternative directory for user settings and user installed plugins&lt;br /&gt;
|-&lt;br /&gt;
|'''/p''' str&lt;br /&gt;
|'''--personality='''''&amp;lt;str&amp;gt;'', '''--profile''='''''&amp;lt;nowiki/&amp;gt;''&amp;lt;str&amp;gt;''&lt;br /&gt;
| Sets the [[Personalities|personality]] to use. You can use ''ask'' as the parameter to list available personalities.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|'''--no-log'''&lt;br /&gt;
|Turn off the application log.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|'''--log-to-file'''&lt;br /&gt;
|Redirect application log to a file.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|'''--debug-log-to-file'''&lt;br /&gt;
|Redirect application debug log to a file.&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|'''/S''' name&lt;br /&gt;
|'''--set'''=name&lt;br /&gt;
|Set &amp;lt;nowiki&amp;gt;''&amp;lt;/nowiki&amp;gt;name&amp;lt;nowiki&amp;gt;''&amp;lt;/nowiki&amp;gt; to current active set for global variables (after [r13245]).&lt;br /&gt;
|-&lt;br /&gt;
|'''/D''' str&lt;br /&gt;
|&lt;br /&gt;
|If ''str'' = &amp;quot;&amp;lt;set&amp;gt;.uservar.mem=val&amp;quot;, set the member ''mem'' of uservariable ''uservar'' in ''set'' to value ''val''. This overrides the current set value (after [r13245]).&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|'''--rebuild'''&lt;br /&gt;
| Clean and build the project / workspace.&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|'''--build'''&lt;br /&gt;
| Build the project / workspace.&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|'''--clean'''&lt;br /&gt;
| Clean the project/workspace&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|'''--target''='''''&amp;lt;nowiki/&amp;gt;''&amp;lt;str&amp;gt;''&lt;br /&gt;
| Sets target for batch build,  for example --target=&amp;quot;Release&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|'''--no-batch-window-close'''&lt;br /&gt;
| Keeps the batch log window visible after the batch build has completed.&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|'''--batch-build-notify'''&lt;br /&gt;
| Shows a message after the batch build has completed.&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|'''--script'''=&amp;lt;str&amp;gt;&lt;br /&gt;
| specify a script file to run after loading&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|'''--file='''&amp;lt;filename&amp;gt;[:line]&lt;br /&gt;
| Open file in Code::Blocks and optionally jump to a specific line.&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|'''--dbg-config'''=&amp;lt;str&amp;gt;&lt;br /&gt;
| Selects the debugger config used for attaching.&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|'''--dbg-attach'''=&amp;lt;str&amp;gt;&lt;br /&gt;
|''str'' is passed to debugger plugin which is used for attaching to a process.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|'''&amp;gt;''' ''&amp;lt;build log file&amp;gt;''&lt;br /&gt;
| Placed in the very last position of command line, this may be used to redirect standard output to log file, this is not a codeblock option as such, but just a DOS/*nix shell usual standard output redirection&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Mgimenez</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=Internationalization&amp;diff=9806</id>
		<title>Internationalization</title>
		<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php?title=Internationalization&amp;diff=9806"/>
		<updated>2024-10-01T11:08:27Z</updated>

		<summary type="html">&lt;p&gt;Mgimenez: /* Create and use the .mo file */ Enhance intructions&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Developer Documentation]]&lt;br /&gt;
&lt;br /&gt;
This article is about how to realize and use localized C:B.&lt;br /&gt;
&lt;br /&gt;
Original article written by heromyth.&lt;br /&gt;
&lt;br /&gt;
Reviewed by gd_on.&lt;br /&gt;
&lt;br /&gt;
== Get the English POT file ==&lt;br /&gt;
&lt;br /&gt;
The url of the english POT file is at:&lt;br /&gt;
&lt;br /&gt;
for the '''original site''' (''but obsolete'') : https://translations.launchpad.net/codeblocks/trunk/+pots/codeblocks&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
for a '''new site''' : https://translations.launchpad.net/codeblocks-gd&lt;br /&gt;
&lt;br /&gt;
More information can be seen at: https://forums.codeblocks.org/index.php/topic,10204.msg70638.html.&lt;br /&gt;
&lt;br /&gt;
or : &lt;br /&gt;
&lt;br /&gt;
https://forums.codeblocks.org/index.php/topic,1022.msg159075.html#msg159075&lt;br /&gt;
 &lt;br /&gt;
Of course, you can run extract.cmd (shown below) to generate the POT file. It extracts all the text chains from .cpp files and .xrc file, for the main core and the contribs plugins. It also extract strings from compiler's xml files and descriptions fields found in manifest*.xml from plugins. You can place it in a subdirectory of your codeblocks_src (created by svn for example), as src\i18n or a specific src\My_i18n.&lt;br /&gt;
&lt;br /&gt;
This tool uses several unix-like tools as find, rm, grep, xargs, xgettext, msgcat, sed. Some of them are available with many MinGW distributions or Msys2.&lt;br /&gt;
&lt;br /&gt;
'''Note''' : you '''must''' use the unix-like find.exe, ''not'' the Windows one : they have not the same syntax. So, the unix-like find.exe must be found in your PATH, before the Windows one!&lt;br /&gt;
&lt;br /&gt;
The tool wxrc is used in these command files. You can find the source in wxWidgets/utils and build it.&lt;br /&gt;
&lt;br /&gt;
For your convenience, some unix tools (extracted from msys2) and a wxrc.exe (statically linked with wxWidgets 3.2.1, 64 bit) can be downloaded from a git repository [https://github.com/gerard-durand/codeblocks_gd_extract_tools/tree/master/Unix_Tools Unix-Tools]&lt;br /&gt;
&lt;br /&gt;
The content of '''extract.cmd''' is below (or you can download it from a git repository [https://github.com/gerard-durand/codeblocks_gd_extract_tools Extract-Tools] containing a copy of unix tools and wxrc):&lt;br /&gt;
&lt;br /&gt;
 rem ======= Begin of extract.cmd =======&lt;br /&gt;
   &lt;br /&gt;
 echo off&lt;br /&gt;
 echo ****************************&lt;br /&gt;
 echo * creating core .pot files *&lt;br /&gt;
 echo ****************************&lt;br /&gt;
 echo * &lt;br /&gt;
 find ../sdk ../src | grep -F .cpp | grep -v svn-base | grep -v .svn | grep -v .cpp.org | xargs xgettext --keyword=_ -o codeblocks1.pot 2&amp;gt; log.txt&lt;br /&gt;
 find ../sdk ../src ../include | grep -F .h  | grep -v svn-base | grep -v .svn | grep -v .h.org | grep -v html | xargs xgettext --keyword=_ -o codeblocks2.pot 2&amp;gt;&amp;gt; log.txt&lt;br /&gt;
 find ../scripts | grep -F .script | grep -v svn-base | grep -v .svn | xargs xgettext --keyword=_ -o codeblocks3.pot 2&amp;gt;&amp;gt; log.txt&lt;br /&gt;
 find ../plugins/scriptedwizard/resources | grep -F .script | grep -v svn-base | grep -v .svn | xargs xgettext --keyword=_ -o codeblocks4.pot 2&amp;gt;&amp;gt; log.txt&lt;br /&gt;
 find codeblocks1.pot &amp;gt;  files.txt&lt;br /&gt;
 find codeblocks2.pot &amp;gt;&amp;gt; files.txt&lt;br /&gt;
 find codeblocks3.pot &amp;gt;&amp;gt; files.txt&lt;br /&gt;
 find codeblocks4.pot &amp;gt;&amp;gt; files.txt&lt;br /&gt;
 &lt;br /&gt;
 find ../plugins | grep -v contrib | grep -F .cpp | grep -v .svn | grep -v svn-base | grep -v .patch | xargs xgettext --keyword=_ -o  coreplugins1.pot 2&amp;gt;&amp;gt; log.txt&lt;br /&gt;
 find ../plugins | grep -v contrib | grep -F .h   | grep -v .svn | grep -v svn-base | grep -v html   | xargs xgettext --keyword=_ -o coreplugins2.pot 2&amp;gt;&amp;gt; log.txt&lt;br /&gt;
 find coreplugins1.pot &amp;gt;&amp;gt; files.txt&lt;br /&gt;
 find coreplugins2.pot &amp;gt;&amp;gt; files.txt&lt;br /&gt;
 &lt;br /&gt;
 echo *&lt;br /&gt;
 echo *******************************&lt;br /&gt;
 echo * creating contrib .pot files *&lt;br /&gt;
 echo *******************************&lt;br /&gt;
 echo *&lt;br /&gt;
 &lt;br /&gt;
 find ../plugins/contrib	| grep -F .cpp | grep -v .svn | grep -v svn-base &amp;gt; file_c.txt&lt;br /&gt;
 find ../plugins/contrib | grep -F .h   | grep -v .svn | grep -v svn-base | grep -v html | grep -v .gch &amp;gt;&amp;gt; file_c.txt&lt;br /&gt;
 xgettext -f file_c.txt --keyword=_ -o  contribplugins.pot 2&amp;gt;&amp;gt; log.txt&lt;br /&gt;
 find contribplugins.pot &amp;gt;&amp;gt; files.txt&lt;br /&gt;
 &lt;br /&gt;
 echo *&lt;br /&gt;
 echo ***************************************&lt;br /&gt;
 echo * creating .cpp files from .xrc files *&lt;br /&gt;
 echo ***************************************&lt;br /&gt;
 echo *&lt;br /&gt;
 find ../src/resources | grep -F .xrc | grep -v .svn | grep -v svn-base | xargs wxrc -g -o src_xrc.cpp 2&amp;gt;&amp;gt; log.txt&lt;br /&gt;
 find ../sdk/resources | grep -F .xrc | grep -v .svn | grep -v svn-base | xargs wxrc -g -o sdk_xrc.cpp 2&amp;gt;&amp;gt; log.txt&lt;br /&gt;
 find ../plugins | grep -F .xrc | grep -v .svn | grep -v svn-base | xargs wxrc -g -o plugins_xrc2.cpp 2&amp;gt;&amp;gt; log.txt&lt;br /&gt;
 REM Why next lines? modifications in recent wxrc? string modif? Only one line (1515) in compiler_options.xrc has a problem, though the same syntax in a previous line (1151) is OK !&lt;br /&gt;
 sed -i 's/\&amp;quot;Compiling &amp;lt;file&amp;gt;...\&amp;quot;/\\\&amp;quot;Compiling &amp;lt;file&amp;gt;...\\\&amp;quot;/g' plugins_xrc2.cpp&lt;br /&gt;
 REM Eliminate a truncated string containing only &amp;quot;At &amp;quot;.&lt;br /&gt;
 sed -i 's/\&amp;quot;else\&amp;quot;/\\\&amp;quot;else\\\&amp;quot;/g' plugins_xrc2.cpp&lt;br /&gt;
 REM In .xrc files, there is no way to indicate that a string is translatable or not. So those following grep - v try to eliminate some lines.&lt;br /&gt;
 grep -v msp430x plugins_xrc2.cpp | grep -v dragon_ | grep -v msp430x | grep -v cc430x | grep -v jtag1 | grep -v jtag2 | grep -v jtagm | grep -v atxmega | grep -v atmega | grep -v attiny | grep -v at86 | grep -v at90 | grep -v AT90 | grep -v TC1 &amp;gt; plugins_xrc.cpp&lt;br /&gt;
 &lt;br /&gt;
 del plugins_xrc2.cpp&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 echo *&lt;br /&gt;
 echo *************************************************&lt;br /&gt;
 echo * creating .pot files from those local new .cpp *&lt;br /&gt;
 echo *************************************************&lt;br /&gt;
 echo *&lt;br /&gt;
 find . | grep -F .cpp | xargs xgettext --keyword=_ -o xrc.pot 2&amp;gt;&amp;gt; log.txt&lt;br /&gt;
 sed &amp;quot;s/\$\$*/\$/g&amp;quot; xrc.pot &amp;gt; xrc.pox&lt;br /&gt;
 sed 's/\\\\\\\\/\\\\/g' xrc.pox &amp;gt; xrc.pot&lt;br /&gt;
 find xrc.pot &amp;gt;&amp;gt; files.txt&lt;br /&gt;
 &lt;br /&gt;
 REM Extracting strings from files as .xml, .xrc need more work because there is nothing to speify than a string is translatable or not.&lt;br /&gt;
 REM May also need additionnal filters if the serached string is on several lines.&lt;br /&gt;
 &lt;br /&gt;
 echo *&lt;br /&gt;
 echo *************************************************&lt;br /&gt;
 echo * extracting strings from .xml compilers files  *&lt;br /&gt;
 echo *************************************************&lt;br /&gt;
 echo *&lt;br /&gt;
 find ../plugins/compilergcc/resources/compilers | grep -F .xml | xargs grep -F &amp;quot;CodeBlocks_compiler name&amp;quot; &amp;gt; src_xml.cpp 2&amp;gt;&amp;gt; log.txt&lt;br /&gt;
 find ../plugins/compilergcc/resources/compilers | grep -F .xml | xargs grep -F &amp;quot;Option name&amp;quot;   &amp;gt;&amp;gt;  src_xml.cpp 2&amp;gt;&amp;gt; log.txt&lt;br /&gt;
 find ../plugins/compilergcc/resources/compilers | grep -F .xml | xargs grep -F &amp;quot;Category name&amp;quot; &amp;gt;&amp;gt;  src_xml.cpp 2&amp;gt;&amp;gt; log.txt&lt;br /&gt;
 find ../plugins/compilergcc/resources/compilers | grep -F .xml | xargs grep -F &amp;quot;checkMessage&amp;quot;  &amp;gt;&amp;gt;  src_xml.cpp 2&amp;gt;&amp;gt; log.txt&lt;br /&gt;
 REM In .xml files, there is no way to indicate that a string is translatable or not. So those following grep - v try to eliminate some lines.&lt;br /&gt;
 grep -v mabi src_xml.cpp | grep -v mno | grep -v apcs | grep -v mtpcs | grep -v mshed | grep -v msoft | grep -v mhard | grep -v mfpe | grep -v msched | grep -v mlong | grep -v mpic | grep -v mcirrus | grep -v mcalle | grep -v mpoke | grep -v mwords | grep -v &amp;quot;MSP430 1&amp;quot; | grep -v &amp;quot;MSP430 2&amp;quot; | grep -v &amp;quot;MSP430 3&amp;quot; | grep -v &amp;quot;MSP430 4&amp;quot; | grep -v &amp;quot;MSP430 5&amp;quot; | grep -v &amp;quot;MSP430 6&amp;quot; | grep -v &amp;quot;MSP430 E&amp;quot; | grep -v &amp;quot;MSP430 W&amp;quot; | grep -v &amp;quot;MSP430 MS&amp;quot; | grep -v &amp;quot;MSP430 G4&amp;quot; | grep -v &amp;quot;CC430 5&amp;quot; | grep -v &amp;quot;CC430 6&amp;quot; | grep -v ATmega | grep -v Atmega | grep -v atmega | grep -v ATXmega | grep -v AT90 | grep -v AT43 | grep -v AT86 | grep -v AT76 | grep -v ATA | grep -v ata | grep -v ATtiny | grep -v Attiny | grep -v attiny | grep -v mcpu | grep -v TC1 &amp;gt; src_xml2.cpp&lt;br /&gt;
 xgettext -a -o xml.pox src_xml2.cpp&lt;br /&gt;
 sed &amp;quot;s/&amp;amp;quot;/\\\\&amp;quot;&amp;quot;/g&amp;quot; xml.pox &amp;gt; xml1.pot&lt;br /&gt;
 find xml1.pot &amp;gt;&amp;gt; files.txt&lt;br /&gt;
 &lt;br /&gt;
 echo *&lt;br /&gt;
 echo *************************************************&amp;quot;&lt;br /&gt;
 echo * extracting strings from manifest*.xml files   *&amp;quot;&lt;br /&gt;
 echo *************************************************&amp;quot;&lt;br /&gt;
 echo *&lt;br /&gt;
 &lt;br /&gt;
 REM On Windows, the find option -name manifest*.xml is not (still) accepted (msys2 version), so the output is filtered with 2 -F options.&lt;br /&gt;
 &lt;br /&gt;
 find ../plugins | grep -F manifest | grep -F .xml | grep -v svn-base | grep -v .svn | xargs grep -F &amp;quot;title&amp;quot;  &amp;gt;&amp;gt;  src_xml_title.cpp 2&amp;gt;&amp;gt; log.txt&lt;br /&gt;
 xgettext -a -s -o xml2_a.pot src_xml_title.cpp&lt;br /&gt;
 find xml2_a.pot &amp;gt;&amp;gt; files.txt&lt;br /&gt;
 REM The find for &amp;quot;title&amp;quot; does not work correctly for &amp;quot;description&amp;quot; if the string expands on several lines ! Only the first line is kept =&amp;gt; the extracted text is truncated.&lt;br /&gt;
 REM With the following version, the string begin with &amp;quot;description&amp;quot; line and ends on &amp;quot;author&amp;quot; line =&amp;gt; this implies than the order of the fields are the same in all manifests.&lt;br /&gt;
 REM More, if in manifest*.xml, in the description string, there is a CR/LF, it should be kept in the original string, because even if poedit &amp;quot;complains&amp;quot; the translation takes it into account.&lt;br /&gt;
 find ../plugins | grep -F manifest | grep -F .xml | grep -v svn-base | grep -v .svn | xargs sed -n -e &amp;quot;/description/,/&amp;gt;/p&amp;quot; | sed '/author/d' | sed &amp;quot;:a;N;$!ba;s/\n/\\\n/g&amp;quot; | sed 's/&amp;quot;&amp;quot;//g' | sed &amp;quot;s/&amp;amp;quot;/\\\\&amp;quot;&amp;quot;/g&amp;quot; | sed &amp;quot;s/&amp;amp;amp;/\&amp;amp;/g&amp;quot; &amp;gt; src_xml_desc.cpp     2&amp;gt;&amp;gt; log.txt&lt;br /&gt;
 xgettext -a -s -o xml2_b.pot src_xml_desc.cpp&lt;br /&gt;
 find xml2_b.pot &amp;gt;&amp;gt; files.txt&lt;br /&gt;
 &lt;br /&gt;
 REM for keyword thanksTo&lt;br /&gt;
 find ../plugins | grep -F manifest | grep -F .xml | grep -v svn-base | grep -v .svn | xargs sed -n -e &amp;quot;/thanksTo/,/&amp;gt;/p&amp;quot; | sed '/license/d'   | sed &amp;quot;:a;N;$!ba;s/\n/\\\n/g&amp;quot; | sed 's/&amp;quot;&amp;quot;//g' | sed &amp;quot;s/&amp;amp;quot;/\\\\&amp;quot;&amp;quot;/g&amp;quot; | sed &amp;quot;s/&amp;amp;amp;/\&amp;amp;/g&amp;quot; &amp;gt;  src_xml_thanks.cpp  2&amp;gt;&amp;gt; log.txt&lt;br /&gt;
 xgettext -a -s -o xml2_c.pot src_xml_thanks.cpp&lt;br /&gt;
 find xml2_c.pot &amp;gt;&amp;gt; files.txt&lt;br /&gt;
 &lt;br /&gt;
 REM for keyword authort: need to modify manifest.xml in wxSmithAUI because author contains characters with accents.&lt;br /&gt;
 REM Add the = sign to avoid authorEmail and/or authorWeb lines which does not need to be translated&lt;br /&gt;
 find ../plugins | grep -F manifest | grep -F .xml | grep -v svn-base | grep -v .svn | xargs sed -n -e &amp;quot;/author=/,/&amp;gt;/p&amp;quot; | sed '/authorEmail/d' | sed &amp;quot;:a;N;$!ba;s/\n/\\\n/g&amp;quot; | sed 's/&amp;quot;&amp;quot;//g' | sed &amp;quot;s/&amp;amp;quot;/\\\\&amp;quot;&amp;quot;/g&amp;quot; | sed &amp;quot;s/&amp;amp;amp;/\&amp;amp;/g&amp;quot; &amp;gt;  src_xml_author.cpp 2&amp;gt;&amp;gt; log.txt&lt;br /&gt;
 xgettext -a -s -o xml2_d.pot src_xml_author.cpp&lt;br /&gt;
 find xml2_d.pot &amp;gt;&amp;gt; files.txt&lt;br /&gt;
 &lt;br /&gt;
 REM for keyword license (single line); include the = sign to be sure that lines containing the word license in a sentence are not kept.&lt;br /&gt;
 find ../plugins | grep -F manifest | grep -F .xml | grep -v svn-base | grep -v .svn | xargs grep -F &amp;quot;license=&amp;quot;  &amp;gt;&amp;gt;  src_xml_lic.cpp 2&amp;gt;&amp;gt; log.txt&lt;br /&gt;
 xgettext -a -s -o xml2_e.pot src_xml_lic.cpp&lt;br /&gt;
 find xml2_e.pot &amp;gt;&amp;gt; files.txt&lt;br /&gt;
 &lt;br /&gt;
 echo *&lt;br /&gt;
 echo **********************************&lt;br /&gt;
 echo * Merging and sorting .pot files *&lt;br /&gt;
 echo **********************************&lt;br /&gt;
 echo *&lt;br /&gt;
 msgcat -s -f files.txt -o All_codeblocks.pox 2&amp;gt;&amp;gt; log.txt&lt;br /&gt;
 rm -f *.pot *.cpp files.txt file_c.txt&lt;br /&gt;
 sed &amp;quot;s/#, c-format//g&amp;quot; All_codeblocks.pox &amp;gt; All_codeblocks.pot&lt;br /&gt;
 &lt;br /&gt;
 rm -f *.pox&lt;br /&gt;
 &lt;br /&gt;
 echo *&lt;br /&gt;
 echo ***************&lt;br /&gt;
 echo * The END*!!! *&lt;br /&gt;
 echo ***************&lt;br /&gt;
 echo on&lt;br /&gt;
 &lt;br /&gt;
 rem ======= End of extract.cmd =======&lt;br /&gt;
&lt;br /&gt;
== The tools for translation ==&lt;br /&gt;
&lt;br /&gt;
Usually, we use the poEdit tool which can be downloaded [http://www.poedit.net/download.php here].&lt;br /&gt;
&lt;br /&gt;
Of course, you can do the translation directly on [https://translations.launchpad.net/codeblocks-gd Launchpad].&lt;br /&gt;
&lt;br /&gt;
You'll find on Launchpad, two available downloads : a .po file, that you can use to edit or modify it, and a .mo file, a compiled ready to use in Code::Blocks. It's name may be quite long, but it does not matter. Only the extension is important.&lt;br /&gt;
&lt;br /&gt;
== Translating with poEdit ==&lt;br /&gt;
&lt;br /&gt;
Rename or copy All_codeblocks.pot into All_codeblocks.po. Use poEdit to open the file All_codeblocks.po. Change a few settings like:&lt;br /&gt;
&lt;br /&gt;
[File]-&amp;gt;[Preferences]-&amp;gt;[Personalize]&lt;br /&gt;
&lt;br /&gt;
[Catalog]-&amp;gt;[Settings]-&amp;gt;[Project info]-&amp;gt;[Team/email/Language/Charset]&lt;br /&gt;
&lt;br /&gt;
If Code::Blocks is compiled with Unicode, the charset should be set to utf-8; If Code::Blocks is compiled with ANSI, the charset should be set to your own language charset like gb2312, koi8-r etc.&lt;br /&gt;
&lt;br /&gt;
After these settings are done, you can start translating. Don't be fooled, it's a long work! During the process, of course, you can use your translation at any time.&lt;br /&gt;
&lt;br /&gt;
You can also download the .po file from Launchpad, work on it with poedit locally on your machine, and re-upload it on Launchpad to update and share your work. &lt;br /&gt;
&lt;br /&gt;
'''Note:''' It may be necessary to approve this work, and sometimes to validate your own translations (or wait for someone else to validate them).&lt;br /&gt;
&lt;br /&gt;
== Create and use the .mo file ==&lt;br /&gt;
&lt;br /&gt;
Pressing Ctrl+S in poEdit, you can get a *.mo file like All_codeblocks.mo which is what we need. To use All_codeblocks.mo, we just place it into C:\Program Files\CodeBlocks\share\CodeBlocks\locale\&amp;lt;lang&amp;gt;\. My language is French and I have installed C::B into C:\, so I place All_codeblocks.mo into C:\Program Files\CodeBlocks\share\CodeBlocks\locale\fr_FR.&lt;br /&gt;
&lt;br /&gt;
If you want to use All_codeblocks.mo under Linux or Unix, you just place it into /usr/X11R6/share/locale/&amp;lt;lang&amp;gt;/LC_MESSAGES/ or in the share/locale/&amp;lt;lang&amp;lt; sub-directory of your codeblocks installation, as in Windows (may be something like /usr/share/codeblocks/locale/&amp;lt;lang&amp;gt; (for me &amp;lt;lang&amp;gt; is fr_FR). Create sub-directories if necessary.&lt;br /&gt;
&lt;br /&gt;
Details about internationalization using wxWidgets can be found in the wxWidgets docs.&lt;br /&gt;
&lt;br /&gt;
You will also need the wxWidgets' *.mo file for your language. Download the *.po file from [https://github.com/wxWidgets/wxWidgets/tree/master/locale here] and generate the *.mo file (using poEdit), or get the *.mo file directly from the wxWidgets' release used when compiling C::B. Copy this file to the folder specified above.&lt;br /&gt;
&lt;br /&gt;
== Let Code::Blocks support your language ==&lt;br /&gt;
&lt;br /&gt;
In Code::Blocks menu, Settings, Environment, View, you'll find a check-box for Internationalization. If you check it, you'll normally find your language in the dropdown list.&lt;/div&gt;</summary>
		<author><name>Mgimenez</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=Internationalization&amp;diff=9805</id>
		<title>Internationalization</title>
		<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php?title=Internationalization&amp;diff=9805"/>
		<updated>2024-10-01T11:06:47Z</updated>

		<summary type="html">&lt;p&gt;Mgimenez: /* Create and use the .mo file */ Remark the wxWidgets' .mo file is also needed&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Developer Documentation]]&lt;br /&gt;
&lt;br /&gt;
This article is about how to realize and use localized C:B.&lt;br /&gt;
&lt;br /&gt;
Original article written by heromyth.&lt;br /&gt;
&lt;br /&gt;
Reviewed by gd_on.&lt;br /&gt;
&lt;br /&gt;
== Get the English POT file ==&lt;br /&gt;
&lt;br /&gt;
The url of the english POT file is at:&lt;br /&gt;
&lt;br /&gt;
for the '''original site''' (''but obsolete'') : https://translations.launchpad.net/codeblocks/trunk/+pots/codeblocks&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
for a '''new site''' : https://translations.launchpad.net/codeblocks-gd&lt;br /&gt;
&lt;br /&gt;
More information can be seen at: https://forums.codeblocks.org/index.php/topic,10204.msg70638.html.&lt;br /&gt;
&lt;br /&gt;
or : &lt;br /&gt;
&lt;br /&gt;
https://forums.codeblocks.org/index.php/topic,1022.msg159075.html#msg159075&lt;br /&gt;
 &lt;br /&gt;
Of course, you can run extract.cmd (shown below) to generate the POT file. It extracts all the text chains from .cpp files and .xrc file, for the main core and the contribs plugins. It also extract strings from compiler's xml files and descriptions fields found in manifest*.xml from plugins. You can place it in a subdirectory of your codeblocks_src (created by svn for example), as src\i18n or a specific src\My_i18n.&lt;br /&gt;
&lt;br /&gt;
This tool uses several unix-like tools as find, rm, grep, xargs, xgettext, msgcat, sed. Some of them are available with many MinGW distributions or Msys2.&lt;br /&gt;
&lt;br /&gt;
'''Note''' : you '''must''' use the unix-like find.exe, ''not'' the Windows one : they have not the same syntax. So, the unix-like find.exe must be found in your PATH, before the Windows one!&lt;br /&gt;
&lt;br /&gt;
The tool wxrc is used in these command files. You can find the source in wxWidgets/utils and build it.&lt;br /&gt;
&lt;br /&gt;
For your convenience, some unix tools (extracted from msys2) and a wxrc.exe (statically linked with wxWidgets 3.2.1, 64 bit) can be downloaded from a git repository [https://github.com/gerard-durand/codeblocks_gd_extract_tools/tree/master/Unix_Tools Unix-Tools]&lt;br /&gt;
&lt;br /&gt;
The content of '''extract.cmd''' is below (or you can download it from a git repository [https://github.com/gerard-durand/codeblocks_gd_extract_tools Extract-Tools] containing a copy of unix tools and wxrc):&lt;br /&gt;
&lt;br /&gt;
 rem ======= Begin of extract.cmd =======&lt;br /&gt;
   &lt;br /&gt;
 echo off&lt;br /&gt;
 echo ****************************&lt;br /&gt;
 echo * creating core .pot files *&lt;br /&gt;
 echo ****************************&lt;br /&gt;
 echo * &lt;br /&gt;
 find ../sdk ../src | grep -F .cpp | grep -v svn-base | grep -v .svn | grep -v .cpp.org | xargs xgettext --keyword=_ -o codeblocks1.pot 2&amp;gt; log.txt&lt;br /&gt;
 find ../sdk ../src ../include | grep -F .h  | grep -v svn-base | grep -v .svn | grep -v .h.org | grep -v html | xargs xgettext --keyword=_ -o codeblocks2.pot 2&amp;gt;&amp;gt; log.txt&lt;br /&gt;
 find ../scripts | grep -F .script | grep -v svn-base | grep -v .svn | xargs xgettext --keyword=_ -o codeblocks3.pot 2&amp;gt;&amp;gt; log.txt&lt;br /&gt;
 find ../plugins/scriptedwizard/resources | grep -F .script | grep -v svn-base | grep -v .svn | xargs xgettext --keyword=_ -o codeblocks4.pot 2&amp;gt;&amp;gt; log.txt&lt;br /&gt;
 find codeblocks1.pot &amp;gt;  files.txt&lt;br /&gt;
 find codeblocks2.pot &amp;gt;&amp;gt; files.txt&lt;br /&gt;
 find codeblocks3.pot &amp;gt;&amp;gt; files.txt&lt;br /&gt;
 find codeblocks4.pot &amp;gt;&amp;gt; files.txt&lt;br /&gt;
 &lt;br /&gt;
 find ../plugins | grep -v contrib | grep -F .cpp | grep -v .svn | grep -v svn-base | grep -v .patch | xargs xgettext --keyword=_ -o  coreplugins1.pot 2&amp;gt;&amp;gt; log.txt&lt;br /&gt;
 find ../plugins | grep -v contrib | grep -F .h   | grep -v .svn | grep -v svn-base | grep -v html   | xargs xgettext --keyword=_ -o coreplugins2.pot 2&amp;gt;&amp;gt; log.txt&lt;br /&gt;
 find coreplugins1.pot &amp;gt;&amp;gt; files.txt&lt;br /&gt;
 find coreplugins2.pot &amp;gt;&amp;gt; files.txt&lt;br /&gt;
 &lt;br /&gt;
 echo *&lt;br /&gt;
 echo *******************************&lt;br /&gt;
 echo * creating contrib .pot files *&lt;br /&gt;
 echo *******************************&lt;br /&gt;
 echo *&lt;br /&gt;
 &lt;br /&gt;
 find ../plugins/contrib	| grep -F .cpp | grep -v .svn | grep -v svn-base &amp;gt; file_c.txt&lt;br /&gt;
 find ../plugins/contrib | grep -F .h   | grep -v .svn | grep -v svn-base | grep -v html | grep -v .gch &amp;gt;&amp;gt; file_c.txt&lt;br /&gt;
 xgettext -f file_c.txt --keyword=_ -o  contribplugins.pot 2&amp;gt;&amp;gt; log.txt&lt;br /&gt;
 find contribplugins.pot &amp;gt;&amp;gt; files.txt&lt;br /&gt;
 &lt;br /&gt;
 echo *&lt;br /&gt;
 echo ***************************************&lt;br /&gt;
 echo * creating .cpp files from .xrc files *&lt;br /&gt;
 echo ***************************************&lt;br /&gt;
 echo *&lt;br /&gt;
 find ../src/resources | grep -F .xrc | grep -v .svn | grep -v svn-base | xargs wxrc -g -o src_xrc.cpp 2&amp;gt;&amp;gt; log.txt&lt;br /&gt;
 find ../sdk/resources | grep -F .xrc | grep -v .svn | grep -v svn-base | xargs wxrc -g -o sdk_xrc.cpp 2&amp;gt;&amp;gt; log.txt&lt;br /&gt;
 find ../plugins | grep -F .xrc | grep -v .svn | grep -v svn-base | xargs wxrc -g -o plugins_xrc2.cpp 2&amp;gt;&amp;gt; log.txt&lt;br /&gt;
 REM Why next lines? modifications in recent wxrc? string modif? Only one line (1515) in compiler_options.xrc has a problem, though the same syntax in a previous line (1151) is OK !&lt;br /&gt;
 sed -i 's/\&amp;quot;Compiling &amp;lt;file&amp;gt;...\&amp;quot;/\\\&amp;quot;Compiling &amp;lt;file&amp;gt;...\\\&amp;quot;/g' plugins_xrc2.cpp&lt;br /&gt;
 REM Eliminate a truncated string containing only &amp;quot;At &amp;quot;.&lt;br /&gt;
 sed -i 's/\&amp;quot;else\&amp;quot;/\\\&amp;quot;else\\\&amp;quot;/g' plugins_xrc2.cpp&lt;br /&gt;
 REM In .xrc files, there is no way to indicate that a string is translatable or not. So those following grep - v try to eliminate some lines.&lt;br /&gt;
 grep -v msp430x plugins_xrc2.cpp | grep -v dragon_ | grep -v msp430x | grep -v cc430x | grep -v jtag1 | grep -v jtag2 | grep -v jtagm | grep -v atxmega | grep -v atmega | grep -v attiny | grep -v at86 | grep -v at90 | grep -v AT90 | grep -v TC1 &amp;gt; plugins_xrc.cpp&lt;br /&gt;
 &lt;br /&gt;
 del plugins_xrc2.cpp&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 echo *&lt;br /&gt;
 echo *************************************************&lt;br /&gt;
 echo * creating .pot files from those local new .cpp *&lt;br /&gt;
 echo *************************************************&lt;br /&gt;
 echo *&lt;br /&gt;
 find . | grep -F .cpp | xargs xgettext --keyword=_ -o xrc.pot 2&amp;gt;&amp;gt; log.txt&lt;br /&gt;
 sed &amp;quot;s/\$\$*/\$/g&amp;quot; xrc.pot &amp;gt; xrc.pox&lt;br /&gt;
 sed 's/\\\\\\\\/\\\\/g' xrc.pox &amp;gt; xrc.pot&lt;br /&gt;
 find xrc.pot &amp;gt;&amp;gt; files.txt&lt;br /&gt;
 &lt;br /&gt;
 REM Extracting strings from files as .xml, .xrc need more work because there is nothing to speify than a string is translatable or not.&lt;br /&gt;
 REM May also need additionnal filters if the serached string is on several lines.&lt;br /&gt;
 &lt;br /&gt;
 echo *&lt;br /&gt;
 echo *************************************************&lt;br /&gt;
 echo * extracting strings from .xml compilers files  *&lt;br /&gt;
 echo *************************************************&lt;br /&gt;
 echo *&lt;br /&gt;
 find ../plugins/compilergcc/resources/compilers | grep -F .xml | xargs grep -F &amp;quot;CodeBlocks_compiler name&amp;quot; &amp;gt; src_xml.cpp 2&amp;gt;&amp;gt; log.txt&lt;br /&gt;
 find ../plugins/compilergcc/resources/compilers | grep -F .xml | xargs grep -F &amp;quot;Option name&amp;quot;   &amp;gt;&amp;gt;  src_xml.cpp 2&amp;gt;&amp;gt; log.txt&lt;br /&gt;
 find ../plugins/compilergcc/resources/compilers | grep -F .xml | xargs grep -F &amp;quot;Category name&amp;quot; &amp;gt;&amp;gt;  src_xml.cpp 2&amp;gt;&amp;gt; log.txt&lt;br /&gt;
 find ../plugins/compilergcc/resources/compilers | grep -F .xml | xargs grep -F &amp;quot;checkMessage&amp;quot;  &amp;gt;&amp;gt;  src_xml.cpp 2&amp;gt;&amp;gt; log.txt&lt;br /&gt;
 REM In .xml files, there is no way to indicate that a string is translatable or not. So those following grep - v try to eliminate some lines.&lt;br /&gt;
 grep -v mabi src_xml.cpp | grep -v mno | grep -v apcs | grep -v mtpcs | grep -v mshed | grep -v msoft | grep -v mhard | grep -v mfpe | grep -v msched | grep -v mlong | grep -v mpic | grep -v mcirrus | grep -v mcalle | grep -v mpoke | grep -v mwords | grep -v &amp;quot;MSP430 1&amp;quot; | grep -v &amp;quot;MSP430 2&amp;quot; | grep -v &amp;quot;MSP430 3&amp;quot; | grep -v &amp;quot;MSP430 4&amp;quot; | grep -v &amp;quot;MSP430 5&amp;quot; | grep -v &amp;quot;MSP430 6&amp;quot; | grep -v &amp;quot;MSP430 E&amp;quot; | grep -v &amp;quot;MSP430 W&amp;quot; | grep -v &amp;quot;MSP430 MS&amp;quot; | grep -v &amp;quot;MSP430 G4&amp;quot; | grep -v &amp;quot;CC430 5&amp;quot; | grep -v &amp;quot;CC430 6&amp;quot; | grep -v ATmega | grep -v Atmega | grep -v atmega | grep -v ATXmega | grep -v AT90 | grep -v AT43 | grep -v AT86 | grep -v AT76 | grep -v ATA | grep -v ata | grep -v ATtiny | grep -v Attiny | grep -v attiny | grep -v mcpu | grep -v TC1 &amp;gt; src_xml2.cpp&lt;br /&gt;
 xgettext -a -o xml.pox src_xml2.cpp&lt;br /&gt;
 sed &amp;quot;s/&amp;amp;quot;/\\\\&amp;quot;&amp;quot;/g&amp;quot; xml.pox &amp;gt; xml1.pot&lt;br /&gt;
 find xml1.pot &amp;gt;&amp;gt; files.txt&lt;br /&gt;
 &lt;br /&gt;
 echo *&lt;br /&gt;
 echo *************************************************&amp;quot;&lt;br /&gt;
 echo * extracting strings from manifest*.xml files   *&amp;quot;&lt;br /&gt;
 echo *************************************************&amp;quot;&lt;br /&gt;
 echo *&lt;br /&gt;
 &lt;br /&gt;
 REM On Windows, the find option -name manifest*.xml is not (still) accepted (msys2 version), so the output is filtered with 2 -F options.&lt;br /&gt;
 &lt;br /&gt;
 find ../plugins | grep -F manifest | grep -F .xml | grep -v svn-base | grep -v .svn | xargs grep -F &amp;quot;title&amp;quot;  &amp;gt;&amp;gt;  src_xml_title.cpp 2&amp;gt;&amp;gt; log.txt&lt;br /&gt;
 xgettext -a -s -o xml2_a.pot src_xml_title.cpp&lt;br /&gt;
 find xml2_a.pot &amp;gt;&amp;gt; files.txt&lt;br /&gt;
 REM The find for &amp;quot;title&amp;quot; does not work correctly for &amp;quot;description&amp;quot; if the string expands on several lines ! Only the first line is kept =&amp;gt; the extracted text is truncated.&lt;br /&gt;
 REM With the following version, the string begin with &amp;quot;description&amp;quot; line and ends on &amp;quot;author&amp;quot; line =&amp;gt; this implies than the order of the fields are the same in all manifests.&lt;br /&gt;
 REM More, if in manifest*.xml, in the description string, there is a CR/LF, it should be kept in the original string, because even if poedit &amp;quot;complains&amp;quot; the translation takes it into account.&lt;br /&gt;
 find ../plugins | grep -F manifest | grep -F .xml | grep -v svn-base | grep -v .svn | xargs sed -n -e &amp;quot;/description/,/&amp;gt;/p&amp;quot; | sed '/author/d' | sed &amp;quot;:a;N;$!ba;s/\n/\\\n/g&amp;quot; | sed 's/&amp;quot;&amp;quot;//g' | sed &amp;quot;s/&amp;amp;quot;/\\\\&amp;quot;&amp;quot;/g&amp;quot; | sed &amp;quot;s/&amp;amp;amp;/\&amp;amp;/g&amp;quot; &amp;gt; src_xml_desc.cpp     2&amp;gt;&amp;gt; log.txt&lt;br /&gt;
 xgettext -a -s -o xml2_b.pot src_xml_desc.cpp&lt;br /&gt;
 find xml2_b.pot &amp;gt;&amp;gt; files.txt&lt;br /&gt;
 &lt;br /&gt;
 REM for keyword thanksTo&lt;br /&gt;
 find ../plugins | grep -F manifest | grep -F .xml | grep -v svn-base | grep -v .svn | xargs sed -n -e &amp;quot;/thanksTo/,/&amp;gt;/p&amp;quot; | sed '/license/d'   | sed &amp;quot;:a;N;$!ba;s/\n/\\\n/g&amp;quot; | sed 's/&amp;quot;&amp;quot;//g' | sed &amp;quot;s/&amp;amp;quot;/\\\\&amp;quot;&amp;quot;/g&amp;quot; | sed &amp;quot;s/&amp;amp;amp;/\&amp;amp;/g&amp;quot; &amp;gt;  src_xml_thanks.cpp  2&amp;gt;&amp;gt; log.txt&lt;br /&gt;
 xgettext -a -s -o xml2_c.pot src_xml_thanks.cpp&lt;br /&gt;
 find xml2_c.pot &amp;gt;&amp;gt; files.txt&lt;br /&gt;
 &lt;br /&gt;
 REM for keyword authort: need to modify manifest.xml in wxSmithAUI because author contains characters with accents.&lt;br /&gt;
 REM Add the = sign to avoid authorEmail and/or authorWeb lines which does not need to be translated&lt;br /&gt;
 find ../plugins | grep -F manifest | grep -F .xml | grep -v svn-base | grep -v .svn | xargs sed -n -e &amp;quot;/author=/,/&amp;gt;/p&amp;quot; | sed '/authorEmail/d' | sed &amp;quot;:a;N;$!ba;s/\n/\\\n/g&amp;quot; | sed 's/&amp;quot;&amp;quot;//g' | sed &amp;quot;s/&amp;amp;quot;/\\\\&amp;quot;&amp;quot;/g&amp;quot; | sed &amp;quot;s/&amp;amp;amp;/\&amp;amp;/g&amp;quot; &amp;gt;  src_xml_author.cpp 2&amp;gt;&amp;gt; log.txt&lt;br /&gt;
 xgettext -a -s -o xml2_d.pot src_xml_author.cpp&lt;br /&gt;
 find xml2_d.pot &amp;gt;&amp;gt; files.txt&lt;br /&gt;
 &lt;br /&gt;
 REM for keyword license (single line); include the = sign to be sure that lines containing the word license in a sentence are not kept.&lt;br /&gt;
 find ../plugins | grep -F manifest | grep -F .xml | grep -v svn-base | grep -v .svn | xargs grep -F &amp;quot;license=&amp;quot;  &amp;gt;&amp;gt;  src_xml_lic.cpp 2&amp;gt;&amp;gt; log.txt&lt;br /&gt;
 xgettext -a -s -o xml2_e.pot src_xml_lic.cpp&lt;br /&gt;
 find xml2_e.pot &amp;gt;&amp;gt; files.txt&lt;br /&gt;
 &lt;br /&gt;
 echo *&lt;br /&gt;
 echo **********************************&lt;br /&gt;
 echo * Merging and sorting .pot files *&lt;br /&gt;
 echo **********************************&lt;br /&gt;
 echo *&lt;br /&gt;
 msgcat -s -f files.txt -o All_codeblocks.pox 2&amp;gt;&amp;gt; log.txt&lt;br /&gt;
 rm -f *.pot *.cpp files.txt file_c.txt&lt;br /&gt;
 sed &amp;quot;s/#, c-format//g&amp;quot; All_codeblocks.pox &amp;gt; All_codeblocks.pot&lt;br /&gt;
 &lt;br /&gt;
 rm -f *.pox&lt;br /&gt;
 &lt;br /&gt;
 echo *&lt;br /&gt;
 echo ***************&lt;br /&gt;
 echo * The END*!!! *&lt;br /&gt;
 echo ***************&lt;br /&gt;
 echo on&lt;br /&gt;
 &lt;br /&gt;
 rem ======= End of extract.cmd =======&lt;br /&gt;
&lt;br /&gt;
== The tools for translation ==&lt;br /&gt;
&lt;br /&gt;
Usually, we use the poEdit tool which can be downloaded [http://www.poedit.net/download.php here].&lt;br /&gt;
&lt;br /&gt;
Of course, you can do the translation directly on [https://translations.launchpad.net/codeblocks-gd Launchpad].&lt;br /&gt;
&lt;br /&gt;
You'll find on Launchpad, two available downloads : a .po file, that you can use to edit or modify it, and a .mo file, a compiled ready to use in Code::Blocks. It's name may be quite long, but it does not matter. Only the extension is important.&lt;br /&gt;
&lt;br /&gt;
== Translating with poEdit ==&lt;br /&gt;
&lt;br /&gt;
Rename or copy All_codeblocks.pot into All_codeblocks.po. Use poEdit to open the file All_codeblocks.po. Change a few settings like:&lt;br /&gt;
&lt;br /&gt;
[File]-&amp;gt;[Preferences]-&amp;gt;[Personalize]&lt;br /&gt;
&lt;br /&gt;
[Catalog]-&amp;gt;[Settings]-&amp;gt;[Project info]-&amp;gt;[Team/email/Language/Charset]&lt;br /&gt;
&lt;br /&gt;
If Code::Blocks is compiled with Unicode, the charset should be set to utf-8; If Code::Blocks is compiled with ANSI, the charset should be set to your own language charset like gb2312, koi8-r etc.&lt;br /&gt;
&lt;br /&gt;
After these settings are done, you can start translating. Don't be fooled, it's a long work! During the process, of course, you can use your translation at any time.&lt;br /&gt;
&lt;br /&gt;
You can also download the .po file from Launchpad, work on it with poedit locally on your machine, and re-upload it on Launchpad to update and share your work. &lt;br /&gt;
&lt;br /&gt;
'''Note:''' It may be necessary to approve this work, and sometimes to validate your own translations (or wait for someone else to validate them).&lt;br /&gt;
&lt;br /&gt;
== Create and use the .mo file ==&lt;br /&gt;
&lt;br /&gt;
Pressing Ctrl+S in poEdit, you can get a *.mo file like All_codeblocks.mo which is what we need. To use All_codeblocks.mo, we just place it into C:\Program Files\CodeBlocks\share\CodeBlocks\locale\&amp;lt;lang&amp;gt;\. My language is French and I have installed C::B into C:\, so I place All_codeblocks.mo into C:\Program Files\CodeBlocks\share\CodeBlocks\locale\fr_FR.&lt;br /&gt;
&lt;br /&gt;
If you want to use All_codeblocks.mo under Linux or Unix, you just place it into /usr/X11R6/share/locale/&amp;lt;lang&amp;gt;/LC_MESSAGES/ or in the share/locale/&amp;lt;lang&amp;lt; sub-directory of your codeblocks installation, as in Windows (may be something like /usr/share/codeblocks/locale/&amp;lt;lang&amp;gt; (for me &amp;lt;lang&amp;gt; is fr_FR). Create sub-directories if necessary.&lt;br /&gt;
&lt;br /&gt;
Details about internationalization using wxWidgets can be found in the wxWidgets docs.&lt;br /&gt;
&lt;br /&gt;
You will also need the wxWidgets' *.mo file for your language. Download the *.po file from [https://github.com/wxWidgets/wxWidgets/tree/master/locale here] and generate the *.mo file (using poEdit), or get the *.mo file directly from the wxWidgets' release used when compiling C::B.&lt;br /&gt;
&lt;br /&gt;
== Let Code::Blocks support your language ==&lt;br /&gt;
&lt;br /&gt;
In Code::Blocks menu, Settings, Environment, View, you'll find a check-box for Internationalization. If you check it, you'll normally find your language in the dropdown list.&lt;/div&gt;</summary>
		<author><name>Mgimenez</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=Installing_Code::Blocks_from_source_on_Windows&amp;diff=9784</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=9784"/>
		<updated>2024-01-02T13:10:58Z</updated>

		<summary type="html">&lt;p&gt;Mgimenez: /* wxWidgets */ Fix typo&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;
=== 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>Mgimenez</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=Installing_Code::Blocks_from_source_on_Windows&amp;diff=9783</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=9783"/>
		<updated>2024-01-02T09:43:28Z</updated>

		<summary type="html">&lt;p&gt;Mgimenez: /* Generate Production Output */ Remark src must be the current directory when running update&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;
Ypu 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;
=== 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>Mgimenez</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=Installing_Code::Blocks_from_source_on_Windows&amp;diff=9782</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=9782"/>
		<updated>2024-01-02T09:39:58Z</updated>

		<summary type="html">&lt;p&gt;Mgimenez: /* Open project */ Remark instructions are valid for wx3.2&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;
Ypu 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;
=== 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;
Run &amp;lt;tt&amp;gt;update_31.bat&amp;lt;/tt&amp;gt; (located in the &amp;lt;tt&amp;gt;src&amp;lt;/tt&amp;gt; directory). 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>Mgimenez</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=Installing_Code::Blocks_from_source_on_Windows&amp;diff=9781</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=9781"/>
		<updated>2024-01-02T09:35:30Z</updated>

		<summary type="html">&lt;p&gt;Mgimenez: /* wxWidgets */ Specify minimal wx supported version&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;
Ypu 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;
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;
=== 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;
Run &amp;lt;tt&amp;gt;update_31.bat&amp;lt;/tt&amp;gt; (located in the &amp;lt;tt&amp;gt;src&amp;lt;/tt&amp;gt; directory). 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>Mgimenez</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=Installing_Code::Blocks_from_source_on_Windows&amp;diff=9780</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=9780"/>
		<updated>2024-01-02T09:32:09Z</updated>

		<summary type="html">&lt;p&gt;Mgimenez: /* ZIP */ Remark that some toolchains include zip.exe&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;
At this moment the latest wxWidgets stable release is 3.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;
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;
=== 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;
Run &amp;lt;tt&amp;gt;update_31.bat&amp;lt;/tt&amp;gt; (located in the &amp;lt;tt&amp;gt;src&amp;lt;/tt&amp;gt; directory). 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>Mgimenez</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=Installing_Code::Blocks_from_source_on_Windows&amp;diff=9779</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=9779"/>
		<updated>2024-01-02T09:29:26Z</updated>

		<summary type="html">&lt;p&gt;Mgimenez: /* wxWidgets */ Update links and wxWidgets version&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;
At this moment the latest wxWidgets stable release is 3.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.  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;
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;
=== 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;
Run &amp;lt;tt&amp;gt;update_31.bat&amp;lt;/tt&amp;gt; (located in the &amp;lt;tt&amp;gt;src&amp;lt;/tt&amp;gt; directory). 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>Mgimenez</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=Installing_Code::Blocks_from_source_on_Windows&amp;diff=9778</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=9778"/>
		<updated>2024-01-02T08:33:53Z</updated>

		<summary type="html">&lt;p&gt;Mgimenez: /* Configure Build Options */ Remove colon&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 ➡ [http://www.wxwidgets.org/ wxWidgets.org]&lt;br /&gt;
&lt;br /&gt;
Download: [https://github.com/wxWidgets/wxWidgets/releases/download/v3.1.5/wxWidgets-3.1.5.zip wxWidgets-3.1.5.zip]&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.  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;
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;
=== 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;
Run &amp;lt;tt&amp;gt;update_31.bat&amp;lt;/tt&amp;gt; (located in the &amp;lt;tt&amp;gt;src&amp;lt;/tt&amp;gt; directory). 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>Mgimenez</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=Installing_Code::Blocks_from_source_on_Windows&amp;diff=9777</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=9777"/>
		<updated>2024-01-02T08:32:08Z</updated>

		<summary type="html">&lt;p&gt;Mgimenez: /* Code::Blocks Sources */ Remove colon&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 ➡ [http://www.wxwidgets.org/ wxWidgets.org]&lt;br /&gt;
&lt;br /&gt;
Download: [https://github.com/wxWidgets/wxWidgets/releases/download/v3.1.5/wxWidgets-3.1.5.zip wxWidgets-3.1.5.zip]&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.  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;
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;
=== 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;
Run &amp;lt;tt&amp;gt;update_31.bat&amp;lt;/tt&amp;gt; (located in the &amp;lt;tt&amp;gt;src&amp;lt;/tt&amp;gt; directory). 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>Mgimenez</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=Installing_Code::Blocks_from_source_on_Windows&amp;diff=9776</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=9776"/>
		<updated>2024-01-02T08:30:02Z</updated>

		<summary type="html">&lt;p&gt;Mgimenez: /* MinGW Compiler */ Remove colon&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 ➡ [http://www.wxwidgets.org/ wxWidgets.org]&lt;br /&gt;
&lt;br /&gt;
Download: [https://github.com/wxWidgets/wxWidgets/releases/download/v3.1.5/wxWidgets-3.1.5.zip wxWidgets-3.1.5.zip]&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.  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;
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;
=== 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;
Run &amp;lt;tt&amp;gt;update_31.bat&amp;lt;/tt&amp;gt; (located in the &amp;lt;tt&amp;gt;src&amp;lt;/tt&amp;gt; directory). 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>Mgimenez</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=Installing_Code::Blocks_from_source_on_Windows&amp;diff=9775</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=9775"/>
		<updated>2024-01-02T08:29:16Z</updated>

		<summary type="html">&lt;p&gt;Mgimenez: /* Bootstrap Code::Blocks */ Remove colon&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 ➡ [http://www.wxwidgets.org/ wxWidgets.org]&lt;br /&gt;
&lt;br /&gt;
Download: [https://github.com/wxWidgets/wxWidgets/releases/download/v3.1.5/wxWidgets-3.1.5.zip wxWidgets-3.1.5.zip]&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.  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;
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;
=== 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;
Run &amp;lt;tt&amp;gt;update_31.bat&amp;lt;/tt&amp;gt; (located in the &amp;lt;tt&amp;gt;src&amp;lt;/tt&amp;gt; directory). 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>Mgimenez</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=Installing_Code::Blocks_from_source_on_Windows&amp;diff=9774</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=9774"/>
		<updated>2023-12-13T08:35:00Z</updated>

		<summary type="html">&lt;p&gt;Mgimenez: /* Configure Build Options */ Removed misleading information about 64-bit compilation&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 ➡ [http://www.wxwidgets.org/ wxWidgets.org]&lt;br /&gt;
&lt;br /&gt;
Download: [https://github.com/wxWidgets/wxWidgets/releases/download/v3.1.5/wxWidgets-3.1.5.zip wxWidgets-3.1.5.zip]&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.  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;
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;
=== 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;
Run &amp;lt;tt&amp;gt;update_31.bat&amp;lt;/tt&amp;gt; (located in the &amp;lt;tt&amp;gt;src&amp;lt;/tt&amp;gt; directory). 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>Mgimenez</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=Compiling_wxWidgets_(MSW)_2.8.12_on_Windows_using_makefile.gcc&amp;diff=9773</id>
		<title>Compiling wxWidgets (MSW) 2.8.12 on Windows using makefile.gcc</title>
		<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php?title=Compiling_wxWidgets_(MSW)_2.8.12_on_Windows_using_makefile.gcc&amp;diff=9773"/>
		<updated>2023-11-16T15:30:07Z</updated>

		<summary type="html">&lt;p&gt;Mgimenez: Mention Direct2D and newer wxWidgets versions.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&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;
The same instructions are valid for newer versions of wxWidgets, just replace 2.8.12 with the version you are using (p.e. 3.2.3).&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.8.12 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.8.12\wxMSW-2.8.12&amp;quot; or &amp;quot;C:\wxWidgets-2.8.12\wxWidgets-2.8.12&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;
'''NOTE:''' If you intend to compile C::B itself with this wxWidgets version then you must edit &amp;lt;WXWIN&amp;gt;\include\wx\msw\setup_0.h (or setup.h if the former does not exist), locate the line defining wxUSE_GRAPHICS_DIRECT2D and change the assigned value to 1. Do not start compilation before changing this or you will waste a lot of time fixing this.&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 /D &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;
'''NOTE:''' the &amp;lt;code&amp;gt;/D&amp;lt;/code&amp;gt; flag after &amp;lt;code&amp;gt;cd&amp;lt;/code&amp;gt; may be omitted from all commands; it simply allows command prompt to change drives if necessary.&lt;br /&gt;
&lt;br /&gt;
== Building wxWidgets ==&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;MINGW&amp;gt;\mingw32\bin&amp;lt;/tt&amp;gt;&lt;br /&gt;
'''NOTE:''' This is normally SET PATH=C:\MingGW\bin;C:\MingGW\mingw32\bin&lt;br /&gt;
&lt;br /&gt;
Now clean up the source:&lt;br /&gt;
 mingw32-make -f makefile.gcc MONOLITHIC=1 SHARED=1 UNICODE=1 BUILD=release clean&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;
When everything is clean you can start compiling wxWidgets:&lt;br /&gt;
 mingw32-make -f makefile.gcc  MONOLITHIC=1 SHARED=1 UNICODE=1 BUILD=release&lt;br /&gt;
&lt;br /&gt;
'''NOTE:''' These options are the officially-supported Code::Blocks options. 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 building 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;
== Errors while building wxWidgets ==&lt;br /&gt;
Navigate to the folder build/msw inside wxWidgets directory. In this folder is a text file named config.gcc which you can edit with notepad to control the build options. There are two lines to note, CFLAGS ?= and CXXFLAGS ?=. 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;
If your compiler errors out, usually referencing monotree.dll or similar:&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;/div&gt;</summary>
		<author><name>Mgimenez</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=Managing_Plug-in_Resources&amp;diff=9772</id>
		<title>Managing Plug-in Resources</title>
		<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php?title=Managing_Plug-in_Resources&amp;diff=9772"/>
		<updated>2023-11-16T15:16:14Z</updated>

		<summary type="html">&lt;p&gt;Mgimenez: /* Prerequisites */ CHange text also&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Plugin development]]&lt;br /&gt;
&lt;br /&gt;
==Prerequisites==&lt;br /&gt;
&lt;br /&gt;
You may want to read the tutorial [[Creating a simple &amp;quot;Hello_World&amp;quot; plugin]] before starting this tutorial&lt;br /&gt;
&lt;br /&gt;
This tutorial assumes you have a working version of Code::Blocks installed and some knowledge of how to deal with projects, in particular how to compile them. To use the Code::Blocks SDK you must also have a working version of wxWidgets installed. For more information see &lt;br /&gt;
[[Compiling wxWidgets (MSW) 2.8.12 on Windows using makefile.gcc|Compiling wxWidgets (MSW) 2.8.12 on Windows using makefile.gcc]]&lt;br /&gt;
&lt;br /&gt;
''' REVISE THIS...'''To develop Code::Blocks plugins you will also need a copy of the Code::Blocks SDK, which can be found on the Code::Blocks [https://www.codeblocks.org/downloads.shtml download page]. Install this to somewhere sensible that you will remember later on. Personally I keep the SDK in a folder called CodeBlocks\sdk (which contains the include/ and lib/ from in the zip). This means that the header files refered to in the tutorial would be found under ''Codeblocks\sdk\include'', so ''cbPlugin.h'' is ''Codeblocks\sdk\include\cbPlugin.h'' for example.&lt;br /&gt;
&lt;br /&gt;
==Overview==&lt;br /&gt;
&lt;br /&gt;
This tutorial will show you how to package and access Resources (toolbars, forms, dialogs and bitmaps) and other static data in your plug-in.&lt;br /&gt;
&lt;br /&gt;
==Plugin File Structure==&lt;br /&gt;
&lt;br /&gt;
Every plugin in its undeployed state is simply a nested file structure in compressed archive form (zip). The typical structure of a plugin (which we'll call &amp;quot;myplugin&amp;quot; in this tutorial) is as follows:&lt;br /&gt;
&lt;br /&gt;
 +myplugin.cbplugin&lt;br /&gt;
  +myplugin.dll&lt;br /&gt;
  +myplugin.png&lt;br /&gt;
  +myplugin-off.png&lt;br /&gt;
  +myplugin.zip&lt;br /&gt;
   +manifest.xml&lt;br /&gt;
   +XML Based Resources&lt;br /&gt;
  +Extra Files&lt;br /&gt;
&lt;br /&gt;
The essential components of this structure are created automatically when you build a plugin project created with the CB Plugin Wizard. What are these files?&lt;br /&gt;
&lt;br /&gt;
* '''myplugin.cbplugin''': this is simply a zip archive containing all of the plugins files and resources. It is given a cbplugin extension to make it easy for the Code::Blocks plugin installer to recognize.&lt;br /&gt;
* '''myplugin.dll''' (or _libmy-plugin.so_ on linux): the compiled shared library containing you plugins executable content &lt;br /&gt;
* '''myplugin.png''': this is an 80x80 bitmap displayed by default in the image list in &amp;quot;Environment Settings&amp;quot; when the plugins configuration has the focus (for plugins that have a configuaration panel). ''This file is optional''&lt;br /&gt;
* '''myplugin-off.png''': this is an 80x80 bitmap displayed by default in the image list in &amp;quot;Environment Settings&amp;quot; when the plugins configuration does not have the focus(for plugins that have a configuaration panel). ''This file is optional''&lt;br /&gt;
* '''myplugin.zip''': a compressed archive file containing the file manifest.xml and resources&lt;br /&gt;
* '''manifest.xml''': a file containing information about the plugin. (see the [[Creating a simple &amp;quot;Hello_World&amp;quot; plugin]])&lt;br /&gt;
* '''XML Based Resources''': One or more wxWidgets XML based resource files (XRC files) such as toolbars, dialogs and forms. You can also place binary bitmap images in this archive if they are accompanied by an XRC descriptor file. ''XML Resources are optional''&lt;br /&gt;
* '''Extra Files''': Place other static, non-XRC resources here. You should keep these files to a mimimum because they are copied to the shared space of the users Code::Blocks installation. ''These files are optional''&lt;br /&gt;
&lt;br /&gt;
In this tutorial we will discuss the use of XML Based Resources and Extra Files&lt;br /&gt;
&lt;br /&gt;
===Tutorial: Creating a New Plugin and Examining Its Structure===&lt;br /&gt;
&lt;br /&gt;
We will use this tutorial to demonstrate concepts associated with plugin resource management throughout the article. Before you start, make sure you have installed wxWidgets, compiled a recent nightly build or have a current Code::Blocks release with a copy of the SDK installed. (TODO: Links to relevant instructions)&lt;br /&gt;
&lt;br /&gt;
1. Select file -&amp;gt; new -&amp;gt; project&lt;br /&gt;
&lt;br /&gt;
2. Select projects, code::blocks plugin, then click &amp;quot;GO&amp;quot;&lt;br /&gt;
&lt;br /&gt;
3. Project title &amp;quot;Plugin_XRC_Example&amp;quot;, then click &amp;quot;Next&amp;quot;&lt;br /&gt;
&lt;br /&gt;
4. Plugin Name &amp;quot;XRC_Example&amp;quot;, Plugin Type &amp;quot;Generic&amp;quot;, Check &amp;quot;Creates Menu Entries&amp;quot;, then click &amp;quot;Next&amp;quot;&lt;br /&gt;
&lt;br /&gt;
5. Click Next/Finish on the remaining items (I'm assuming you will use wxWidgets 2.8.X, the GCC compiler)&lt;br /&gt;
&lt;br /&gt;
6. You should now have a new plugin project. Compile and make sure it works correctly. Specifically you should see in the build log window:&lt;br /&gt;
&lt;br /&gt;
 Running target post-build steps&lt;br /&gt;
 zip -j9 XRC_Example.zip manifest.xml&lt;br /&gt;
  adding: manifest.xml (188 bytes security) (deflated 52%)&lt;br /&gt;
 zip -j9 XRC_Example.cbplugin XRC_Example.dll XRC_Example.zip&lt;br /&gt;
  adding: XRC_Example.dll&lt;br /&gt;
  (188 bytes security) (deflated 83%)&lt;br /&gt;
  adding: XRC_Example.zip (188 bytes security) (deflated 8%)&lt;br /&gt;
&lt;br /&gt;
As you can see, Code::Blocks automatically creates a minimal XRC_Example.cbplugin file for you. If you have a GUI Archive tool such as 7-zip or WinZIP, you should be able to browse to your project, open XRC_Example.cbplugin with your archive tool and confirm it conforms to the minimal structure. In the remainder of the tutorial we will add additional resources to this simple plugin.&lt;br /&gt;
&lt;br /&gt;
==Working with XML Based wxWidgets Resources==&lt;br /&gt;
&lt;br /&gt;
===What is XRC and why would I want to use it?===&lt;br /&gt;
&lt;br /&gt;
XRC is a standardized way of describing wxWidgets forms (including panels and dialogs), menus, toolbars and bitmap lists in a human readable XML format. A simple example is the XRC file for the compiler toolbar (found in the CB source at: &amp;lt;tt&amp;gt;src/plugins/compilergcc/resources/compiler_toolbar.xrc&amp;lt;/tt&amp;gt;):&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;?xml version=&amp;quot;1.0&amp;quot; ?&amp;gt;&lt;br /&gt;
 &amp;lt;resource&amp;gt;&lt;br /&gt;
   &amp;lt;object class=&amp;quot;wxToolBarAddOn&amp;quot; name=&amp;quot;compiler_toolbar&amp;quot;&amp;gt;&lt;br /&gt;
     &amp;lt;object class=&amp;quot;tool&amp;quot; name=&amp;quot;idCompilerMenuCompile&amp;quot;&amp;gt;&lt;br /&gt;
       &amp;lt;tooltip&amp;gt;Build&amp;lt;/tooltip&amp;gt;&lt;br /&gt;
       &amp;lt;longhelp&amp;gt;Build the active project&amp;lt;/longhelp&amp;gt;&lt;br /&gt;
       &amp;lt;bitmap&amp;gt;images/compile.png&amp;lt;/bitmap&amp;gt;&lt;br /&gt;
     &amp;lt;/object&amp;gt;&lt;br /&gt;
     &amp;lt;object class=&amp;quot;tool&amp;quot; name=&amp;quot;idCompilerMenuRun&amp;quot;&amp;gt;&lt;br /&gt;
       &amp;lt;tooltip&amp;gt;Run&amp;lt;/tooltip&amp;gt;&lt;br /&gt;
       &amp;lt;longhelp&amp;gt;Run the active project&amp;lt;/longhelp&amp;gt;&lt;br /&gt;
       &amp;lt;bitmap&amp;gt;images/run.png&amp;lt;/bitmap&amp;gt;&lt;br /&gt;
     &amp;lt;/object&amp;gt;&lt;br /&gt;
 ...&lt;br /&gt;
 ...&lt;br /&gt;
 ...&lt;br /&gt;
     &amp;lt;object class=&amp;quot;separator&amp;quot;/&amp;gt;&lt;br /&gt;
     &amp;lt;object class=&amp;quot;wxStaticText&amp;quot; name=&amp;quot;idToolTargetLabel&amp;quot;&amp;gt;&lt;br /&gt;
       &amp;lt;label&amp;gt;Build target:&amp;lt;/label&amp;gt;&lt;br /&gt;
     &amp;lt;/object&amp;gt;&lt;br /&gt;
     &amp;lt;object class=&amp;quot;wxChoice&amp;quot; name=&amp;quot;idToolTarget&amp;quot;&amp;gt;&lt;br /&gt;
       &amp;lt;content/&amp;gt;&lt;br /&gt;
         &amp;lt;size&amp;gt;160,-1&amp;lt;/size&amp;gt;&lt;br /&gt;
     &amp;lt;/object&amp;gt;&lt;br /&gt;
   &amp;lt;/object&amp;gt;&lt;br /&gt;
 &amp;lt;/resource&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As you can see, this file specifies that it is an XML file in the first line, that it contains resources denoted by the &amp;lt;resource&amp;gt; and &amp;lt;/resource&amp;gt; tags in the second and last lines respectively. Within the resource tags, the XRC file specifies a sequence of objects laid out in a hierarchical structure. Each object belongs to a class (specified with the attribute class, and corresponding to a wxWidgets form or control class) and has a unique identifier. In this file there is only one base level object, named &amp;quot;compiler_toolbar&amp;quot; derived from the Code::Blocks class &amp;quot;wxToolBarAddOn&amp;quot;, a Code::Blocks extension of the wxWidgets type &amp;quot;wxToolbar&amp;quot;. Note that base level objects are restricted to a handful of types, namely:&lt;br /&gt;
&lt;br /&gt;
* Frames&lt;br /&gt;
* Dialogs&lt;br /&gt;
* Panels&lt;br /&gt;
* MenuBars&lt;br /&gt;
* Menus&lt;br /&gt;
* Toolbars&lt;br /&gt;
* Bitmaps&lt;br /&gt;
* Icons&lt;br /&gt;
&lt;br /&gt;
In contrast, the objects owned by base level objects run the entire gamut of wxWidgets controls. In the case of the Compiler toolbar, it owns a sequence of standard bitmap toolbar buttons (idCompilerMenuCompile, idCompilerMenuRun etc), a static text control (idToolTargetLabel) and a choice box (idToolTarget). Panels and dialogs will also contain layout objects derived from classes such as &amp;lt;tt&amp;gt;wxSizer&amp;lt;/tt&amp;gt;. In addition to the basic class and name attributes, base and lower level objects in an XRC file will specify additional detail about their structure, such as associated images, sizing and layout (basically giving you the same control over the intialization of an object as if you had executed its constructor in your c++ code).&lt;br /&gt;
&lt;br /&gt;
While somewhat verbose, the XML-based XRC file is far more readable than the terse 50+ lines of equivalent C++ code required to create a toolbar, load its images and assign unique ids. XRC files can be loaded and displayed in a few lines of C++. You still retain the ability to access individual controls loaded from the XRC. We'll deal with these issues shortly.&lt;br /&gt;
&lt;br /&gt;
In addition to its readability, XRC offers the advantage of separating form layout (contained in the XRC file) from form logic (coded into your plugin binary). XRC files are loaded each time you start your plugin, which allows you to make changes to the layout of a form without the need to recompile you plugin.&lt;br /&gt;
&lt;br /&gt;
A definitive description of the XRC syntax is described in the wxWidgets wiki at http://www.wxwidgets.org/wiki/index.php/Using_XML_Resources_with_XRC&lt;br /&gt;
&lt;br /&gt;
===Creating XRC files for use in your plugin===&lt;br /&gt;
&lt;br /&gt;
While you can create your own XRC widget layouts by coding the XML in a simple text editor, it is far easier to use a GUI program to create the layout, XML and accompanying C++ code for you. For example, in Code::Blocks you can use the [[WxSmith plugin#WxSmith plugin|wxSmith plugin]] to design your XRC forms and accompanying C++ classes for your plugin. wxFormBuilder (TODO: link) is another alternative.&lt;br /&gt;
&lt;br /&gt;
====Tutorial Continued: Creation of an XRC Panel using wxSmith====&lt;br /&gt;
&lt;br /&gt;
Now we will add a simple XRC-based panel to our plugin using wxSmith:&lt;br /&gt;
&lt;br /&gt;
7. Select wxSmith -&amp;gt; Add panel&lt;br /&gt;
&lt;br /&gt;
8. Use the class name &amp;quot;TaskPanel&amp;quot;, check &amp;quot;XRC file&amp;quot;, then press OK&lt;br /&gt;
&lt;br /&gt;
9. The management window should now show a &amp;quot;Resources&amp;quot; tab and open a new editor window displaying an empty panel with a toolbar containing widgets below it. (TODO: screen shot)&lt;br /&gt;
&lt;br /&gt;
10. From the widget toolbar, select &amp;quot;Layout&amp;quot; tab, then choose wxBoxSizer and click anywhere in the panel. After you click the panel, it will be resized and you should see a border indicating the presence of a sizer. A Box Sizer is a container for widgets, that lays out the widgets in either a horizontal or vertical layout. (TODO: Link to more info on sizers)&lt;br /&gt;
&lt;br /&gt;
11. From the widget toolbar, select &amp;quot;Standard&amp;quot; tab, then choose wxComboBox and click within the sizer. This adds a ComboBox to the sizer&lt;br /&gt;
&lt;br /&gt;
12. Choose wxTextCtrl and click within the sizer. This adds a Text Control to the sizer (it should be located to the right of the combo box)&lt;br /&gt;
&lt;br /&gt;
13. In the resources tab, click on the wxBoxSizer entry in the widget tree. Properties for the Box Sizer should appear in the bottom half of this tab. Change the orientation property to wxVertical.&lt;br /&gt;
&lt;br /&gt;
14. Now click on the wxTextCtrl entry in the widget tree, open the styles property and check &amp;quot;wxTE_MULTILINE&amp;quot;. Also check the &amp;quot;Expand&amp;quot; property, which will expand the control to the full width of the panel.&lt;br /&gt;
&lt;br /&gt;
15. Now click on the wxComboBox entry in the widget tree, change the proportion property to zero. This tells the Box Sizer to only expand the Text Control when the size of the panel changes (the Text Control has a positive proportion). Also check the &amp;quot;Expand&amp;quot; property.&lt;br /&gt;
&lt;br /&gt;
16. Save your work. This will save the panel and create the XRC file &amp;quot;TaskPanel.xrc&amp;quot; and C++ header and sources TaskPanel.cpp/TaskPanel.h. You should now have a panel that looks like the following screen shot: &lt;br /&gt;
&lt;br /&gt;
[[File:Prewiew.png]]&lt;br /&gt;
&lt;br /&gt;
17. Close the wxSmith editor.&lt;br /&gt;
&lt;br /&gt;
===Working with XRC files in your plugin===&lt;br /&gt;
&lt;br /&gt;
After you have created your XRC file defining your objects, you will want to be able to use them in your plugin. To do this, we generally want to create a new C++ class associated with each resource object. In the constructor of each class we will use wxWidgets resource loader to find, load and create an instance of the object. Optionally we will associate the widgets contained within each object with member variables.&lt;br /&gt;
&lt;br /&gt;
wxWidgets library offers a global XRC manager &amp;lt;tt&amp;gt;wxXmlResource&amp;lt;/tt&amp;gt; and a number of convenience functions and macros for working with objects defined in XRC files. In general, for each object defined in XRC you will:&lt;br /&gt;
&lt;br /&gt;
* Define a C++ class that corresponds to the object (e.g. Create a class derived from wxDialog for each Dialog defined in the XRC)&lt;br /&gt;
* Call wxXmlResource::Get()-&amp;gt;LoadXXXX(this, parent, &amp;quot;object_name&amp;quot;, [class_derived_from]) in the constructor of your class (where LoadXXXX will be one of LoadBitmap, LoadDialog, LoadPanel, LoadObject etc)&lt;br /&gt;
* Access controls of the object using the macro: XRCCTRL(this, &amp;quot;control_name&amp;quot;, controlclass)  (or alternatively using XRCID and the FindWindow(XRCID(&amp;quot;control_name&amp;quot;)) method (see the next part of the tutorial below))&lt;br /&gt;
* Use the XRCID(&amp;quot;control_name&amp;quot;) macro to refer to an object's controls in Event tables. For example: EVT_TEXT(XRCID(&amp;quot;ID_TEXTCTRL1&amp;quot;), TaskPanel::TextChange)&lt;br /&gt;
&lt;br /&gt;
TODO: wxWidgets links for more info&lt;br /&gt;
&lt;br /&gt;
==== Tutorial Continued: Associate XRC Objects and Controls with C++ Classes and Members ====&lt;br /&gt;
In this part of the tutorial, we will see how wxSmith maps XRC objects to C++ Classes.&lt;br /&gt;
&lt;br /&gt;
18. It will be helpful to add the XRC file to the project (if it wasn't added already). Select project -&amp;gt; add file and select &amp;quot;TaskPanel.xrc&amp;quot;&lt;br /&gt;
&lt;br /&gt;
19. From the management pane, choose &amp;quot;Projects&amp;quot; tab, expand the resources folder of the project and you should see the newly added XRC file&lt;br /&gt;
&lt;br /&gt;
20. Let's take a look at the contents of the XRC file. Right click on the XRC file, select open with, internal editor. The contents of the file should look something like:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot; ?&amp;gt;&lt;br /&gt;
 &amp;lt;resource xmlns=&amp;quot;http://www.wxwidgets.org/wxxrc&amp;quot;&amp;gt;&lt;br /&gt;
 	&amp;lt;object class=&amp;quot;wxPanel&amp;quot; name=&amp;quot;TaskPanel&amp;quot;&amp;gt;&lt;br /&gt;
 		&amp;lt;object class=&amp;quot;wxBoxSizer&amp;quot;&amp;gt;&lt;br /&gt;
 			&amp;lt;orient&amp;gt;wxVERTICAL&amp;lt;/orient&amp;gt;&lt;br /&gt;
 			&amp;lt;object class=&amp;quot;sizeritem&amp;quot;&amp;gt;&lt;br /&gt;
 				&amp;lt;object class=&amp;quot;wxComboBox&amp;quot; name=&amp;quot;ID_COMBOBOX1&amp;quot; /&amp;gt;&lt;br /&gt;
 				&amp;lt;flag&amp;gt;wxALL|wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL&amp;lt;/flag&amp;gt;&lt;br /&gt;
 				&amp;lt;border&amp;gt;5&amp;lt;/border&amp;gt;&lt;br /&gt;
 			&amp;lt;/object&amp;gt;&lt;br /&gt;
 			&amp;lt;object class=&amp;quot;sizeritem&amp;quot;&amp;gt;&lt;br /&gt;
 				&amp;lt;object class=&amp;quot;wxTextCtrl&amp;quot; name=&amp;quot;ID_TEXTCTRL1&amp;quot;&amp;gt;&lt;br /&gt;
 					&amp;lt;value&amp;gt;Text&amp;lt;/value&amp;gt;&lt;br /&gt;
 					&amp;lt;style&amp;gt;wxTE_MULTILINE&amp;lt;/style&amp;gt;&lt;br /&gt;
 				&amp;lt;/object&amp;gt;&lt;br /&gt;
 				&amp;lt;flag&amp;gt;wxALL|wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL&amp;lt;/flag&amp;gt;&lt;br /&gt;
 				&amp;lt;border&amp;gt;5&amp;lt;/border&amp;gt;&lt;br /&gt;
 				&amp;lt;option&amp;gt;1&amp;lt;/option&amp;gt;&lt;br /&gt;
 			&amp;lt;/object&amp;gt;&lt;br /&gt;
 		&amp;lt;/object&amp;gt;&lt;br /&gt;
 	&amp;lt;/object&amp;gt;&lt;br /&gt;
 &amp;lt;/resource&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We see our base object is a wxPanel called TaskPanel and it contains a box sizer with two widgets &amp;quot;ID_COMBOBOX1&amp;quot; and &amp;quot;ID_TEXTCTRL1&amp;quot;. Close the XRC file.&lt;br /&gt;
&lt;br /&gt;
21. wxSmith will already have added TaskPanel.cpp and TaskPanel.h to your project. &lt;br /&gt;
TaskPanel.h defines a minimal TaskPanel class (I've taken the liberty of trimming some of the file contents) and defines pointers to the two controls in the Panel&lt;br /&gt;
&lt;br /&gt;
 class TaskPanel: public wxPanel&lt;br /&gt;
 {&lt;br /&gt;
 	public:&lt;br /&gt;
 		TaskPanel(wxWindow* parent);&lt;br /&gt;
 		virtual ~TaskPanel();&lt;br /&gt;
 		//(*Declarations(TaskPanel)&lt;br /&gt;
 		wxComboBox* ComboBox1;&lt;br /&gt;
 		wxTextCtrl* TextCtrl1;&lt;br /&gt;
 		//*)&lt;br /&gt;
 		DECLARE_EVENT_TABLE()&lt;br /&gt;
 };&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Open TaskPanel.cpp and you should see the following implementations:&lt;br /&gt;
&lt;br /&gt;
 BEGIN_EVENT_TABLE(TaskPanel,wxPanel)&lt;br /&gt;
 	//(*EventTable(TaskPanel)&lt;br /&gt;
 	//*)&lt;br /&gt;
 END_EVENT_TABLE()&lt;br /&gt;
 &lt;br /&gt;
 TaskPanel::TaskPanel(wxWindow* parent)&lt;br /&gt;
 {&lt;br /&gt;
 	//(*Initialize(TaskPanel)&lt;br /&gt;
 	wxXmlResource::Get()-&amp;gt;LoadObject(this,parent,_T(&amp;quot;TaskPanel&amp;quot;),_T(&amp;quot;wxPanel&amp;quot;));&lt;br /&gt;
 	ComboBox1 = (wxComboBox*)FindWindow(XRCID(&amp;quot;ID_COMBOBOX1&amp;quot;));&lt;br /&gt;
 	TextCtrl1 = (wxTextCtrl*)FindWindow(XRCID(&amp;quot;ID_TEXTCTRL1&amp;quot;));&lt;br /&gt;
 	//*)&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 TaskPanel::~TaskPanel()&lt;br /&gt;
 {&lt;br /&gt;
 	//(*Destroy(TaskPanel)&lt;br /&gt;
 	//*)&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
The good news is wxSmith takes care of the hard work involved in creating a class corresponding to your XML object and its controls. This is all done in the TaskPanel constructor. The line &lt;br /&gt;
&lt;br /&gt;
 wxXmlResource::Get()-&amp;gt;LoadObject(this,parent,_T(&amp;quot;TaskPanel&amp;quot;),_T(&amp;quot;wxPanel&amp;quot;));&lt;br /&gt;
&lt;br /&gt;
will search among the codeblocks resources (including all plugin resources) for an XRC object named &amp;lt;tt&amp;gt;TaskPanel&amp;lt;/tt&amp;gt; and create an instance of it derived from the wxPanel class. The call to LoadObject is used in place of a call to the wxPanel constructor ('''make sure that if you edit this code you do not call the wxPanel constructor. Moreover, do not edit inside the comment blocks //(* and //*) as these are wxSmith controlled portions of your code and will be overwritten each time you save your GUI Layouts in the wxSmith editor''')&lt;br /&gt;
The next two lines&lt;br /&gt;
&lt;br /&gt;
 ComboBox1 = (wxComboBox*)FindWindow(XRCID(&amp;quot;ID_COMBOBOX1&amp;quot;));&lt;br /&gt;
 TextCtrl1 = (wxTextCtrl*)FindWindow(XRCID(&amp;quot;ID_TEXTCTRL1&amp;quot;));&lt;br /&gt;
&lt;br /&gt;
create member pointers to the Combo Box and Text Control widgets, making it easy for you to refer to those widgets in your programming logic. Notice that there is no need to release anything in the TaskPanel class destructor.&lt;br /&gt;
&lt;br /&gt;
====&amp;quot;But what if I don't want to use wxSmith?&amp;quot;====&lt;br /&gt;
&lt;br /&gt;
No problem. Other GUI builders can also create the necessary code to define and instantiate your XRC objects as C++ Classes, which should closely correspond to the code generated by wxSmith. You will need to manually add the XRC objects and C++ files that were created by these builders to your plugin project.&lt;br /&gt;
&lt;br /&gt;
If you don't want to use automatically generated code at all, that's fine too, but you will then need to create the Class by hand using appropriate calls to LoadDialog, LoadPanel, LoadObject and friends.&lt;br /&gt;
&lt;br /&gt;
====Tutorial Continued: Programming your XRC objects and controls====&lt;br /&gt;
&lt;br /&gt;
CONTENT COMING SOON&lt;br /&gt;
&lt;br /&gt;
====Tutorial Continued: Adding the XRC file to your cbplugin bundle====&lt;br /&gt;
&lt;br /&gt;
CONTENT COMING SOON&lt;br /&gt;
&lt;br /&gt;
==Working with Extra Files==&lt;br /&gt;
&lt;br /&gt;
MORE CONTENT COMING SOON...&lt;br /&gt;
&lt;br /&gt;
==Further Information==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It is essential to learn how wxWidgets works if you seriously plan on working on plugins, since most of Code::Blocks depends on it, and you will find it easier to add and manipulate components if you have a firm grasp of its principles. More information on this can be found in the wxWidgets [http://www.wxwidgets.org/docs.htm documentation]. Another good place to learn from is the source code from the existing Code::Blocks plugins, which can be downloaded along with the rest of the Code::Blocks source code from the [https://www.codeblocks.org/downloads.shtml download page].&lt;/div&gt;</summary>
		<author><name>Mgimenez</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=Managing_Plug-in_Resources&amp;diff=9771</id>
		<title>Managing Plug-in Resources</title>
		<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php?title=Managing_Plug-in_Resources&amp;diff=9771"/>
		<updated>2023-11-16T15:14:48Z</updated>

		<summary type="html">&lt;p&gt;Mgimenez: /* Prerequisites */ Change link from 2.8.6 to to 2.8.12&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Plugin development]]&lt;br /&gt;
&lt;br /&gt;
==Prerequisites==&lt;br /&gt;
&lt;br /&gt;
You may want to read the tutorial [[Creating a simple &amp;quot;Hello_World&amp;quot; plugin]] before starting this tutorial&lt;br /&gt;
&lt;br /&gt;
This tutorial assumes you have a working version of Code::Blocks installed and some knowledge of how to deal with projects, in particular how to compile them. To use the Code::Blocks SDK you must also have a working version of wxWidgets installed. For more information see &lt;br /&gt;
[[Compiling wxWidgets (MSW) 2.8.12 on Windows using makefile.gcc|Compiling wxWidgets 2.8.6 to develop Code::Blocks]]&lt;br /&gt;
&lt;br /&gt;
''' REVISE THIS...'''To develop Code::Blocks plugins you will also need a copy of the Code::Blocks SDK, which can be found on the Code::Blocks [https://www.codeblocks.org/downloads.shtml download page]. Install this to somewhere sensible that you will remember later on. Personally I keep the SDK in a folder called CodeBlocks\sdk (which contains the include/ and lib/ from in the zip). This means that the header files refered to in the tutorial would be found under ''Codeblocks\sdk\include'', so ''cbPlugin.h'' is ''Codeblocks\sdk\include\cbPlugin.h'' for example.&lt;br /&gt;
&lt;br /&gt;
==Overview==&lt;br /&gt;
&lt;br /&gt;
This tutorial will show you how to package and access Resources (toolbars, forms, dialogs and bitmaps) and other static data in your plug-in.&lt;br /&gt;
&lt;br /&gt;
==Plugin File Structure==&lt;br /&gt;
&lt;br /&gt;
Every plugin in its undeployed state is simply a nested file structure in compressed archive form (zip). The typical structure of a plugin (which we'll call &amp;quot;myplugin&amp;quot; in this tutorial) is as follows:&lt;br /&gt;
&lt;br /&gt;
 +myplugin.cbplugin&lt;br /&gt;
  +myplugin.dll&lt;br /&gt;
  +myplugin.png&lt;br /&gt;
  +myplugin-off.png&lt;br /&gt;
  +myplugin.zip&lt;br /&gt;
   +manifest.xml&lt;br /&gt;
   +XML Based Resources&lt;br /&gt;
  +Extra Files&lt;br /&gt;
&lt;br /&gt;
The essential components of this structure are created automatically when you build a plugin project created with the CB Plugin Wizard. What are these files?&lt;br /&gt;
&lt;br /&gt;
* '''myplugin.cbplugin''': this is simply a zip archive containing all of the plugins files and resources. It is given a cbplugin extension to make it easy for the Code::Blocks plugin installer to recognize.&lt;br /&gt;
* '''myplugin.dll''' (or _libmy-plugin.so_ on linux): the compiled shared library containing you plugins executable content &lt;br /&gt;
* '''myplugin.png''': this is an 80x80 bitmap displayed by default in the image list in &amp;quot;Environment Settings&amp;quot; when the plugins configuration has the focus (for plugins that have a configuaration panel). ''This file is optional''&lt;br /&gt;
* '''myplugin-off.png''': this is an 80x80 bitmap displayed by default in the image list in &amp;quot;Environment Settings&amp;quot; when the plugins configuration does not have the focus(for plugins that have a configuaration panel). ''This file is optional''&lt;br /&gt;
* '''myplugin.zip''': a compressed archive file containing the file manifest.xml and resources&lt;br /&gt;
* '''manifest.xml''': a file containing information about the plugin. (see the [[Creating a simple &amp;quot;Hello_World&amp;quot; plugin]])&lt;br /&gt;
* '''XML Based Resources''': One or more wxWidgets XML based resource files (XRC files) such as toolbars, dialogs and forms. You can also place binary bitmap images in this archive if they are accompanied by an XRC descriptor file. ''XML Resources are optional''&lt;br /&gt;
* '''Extra Files''': Place other static, non-XRC resources here. You should keep these files to a mimimum because they are copied to the shared space of the users Code::Blocks installation. ''These files are optional''&lt;br /&gt;
&lt;br /&gt;
In this tutorial we will discuss the use of XML Based Resources and Extra Files&lt;br /&gt;
&lt;br /&gt;
===Tutorial: Creating a New Plugin and Examining Its Structure===&lt;br /&gt;
&lt;br /&gt;
We will use this tutorial to demonstrate concepts associated with plugin resource management throughout the article. Before you start, make sure you have installed wxWidgets, compiled a recent nightly build or have a current Code::Blocks release with a copy of the SDK installed. (TODO: Links to relevant instructions)&lt;br /&gt;
&lt;br /&gt;
1. Select file -&amp;gt; new -&amp;gt; project&lt;br /&gt;
&lt;br /&gt;
2. Select projects, code::blocks plugin, then click &amp;quot;GO&amp;quot;&lt;br /&gt;
&lt;br /&gt;
3. Project title &amp;quot;Plugin_XRC_Example&amp;quot;, then click &amp;quot;Next&amp;quot;&lt;br /&gt;
&lt;br /&gt;
4. Plugin Name &amp;quot;XRC_Example&amp;quot;, Plugin Type &amp;quot;Generic&amp;quot;, Check &amp;quot;Creates Menu Entries&amp;quot;, then click &amp;quot;Next&amp;quot;&lt;br /&gt;
&lt;br /&gt;
5. Click Next/Finish on the remaining items (I'm assuming you will use wxWidgets 2.8.X, the GCC compiler)&lt;br /&gt;
&lt;br /&gt;
6. You should now have a new plugin project. Compile and make sure it works correctly. Specifically you should see in the build log window:&lt;br /&gt;
&lt;br /&gt;
 Running target post-build steps&lt;br /&gt;
 zip -j9 XRC_Example.zip manifest.xml&lt;br /&gt;
  adding: manifest.xml (188 bytes security) (deflated 52%)&lt;br /&gt;
 zip -j9 XRC_Example.cbplugin XRC_Example.dll XRC_Example.zip&lt;br /&gt;
  adding: XRC_Example.dll&lt;br /&gt;
  (188 bytes security) (deflated 83%)&lt;br /&gt;
  adding: XRC_Example.zip (188 bytes security) (deflated 8%)&lt;br /&gt;
&lt;br /&gt;
As you can see, Code::Blocks automatically creates a minimal XRC_Example.cbplugin file for you. If you have a GUI Archive tool such as 7-zip or WinZIP, you should be able to browse to your project, open XRC_Example.cbplugin with your archive tool and confirm it conforms to the minimal structure. In the remainder of the tutorial we will add additional resources to this simple plugin.&lt;br /&gt;
&lt;br /&gt;
==Working with XML Based wxWidgets Resources==&lt;br /&gt;
&lt;br /&gt;
===What is XRC and why would I want to use it?===&lt;br /&gt;
&lt;br /&gt;
XRC is a standardized way of describing wxWidgets forms (including panels and dialogs), menus, toolbars and bitmap lists in a human readable XML format. A simple example is the XRC file for the compiler toolbar (found in the CB source at: &amp;lt;tt&amp;gt;src/plugins/compilergcc/resources/compiler_toolbar.xrc&amp;lt;/tt&amp;gt;):&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;?xml version=&amp;quot;1.0&amp;quot; ?&amp;gt;&lt;br /&gt;
 &amp;lt;resource&amp;gt;&lt;br /&gt;
   &amp;lt;object class=&amp;quot;wxToolBarAddOn&amp;quot; name=&amp;quot;compiler_toolbar&amp;quot;&amp;gt;&lt;br /&gt;
     &amp;lt;object class=&amp;quot;tool&amp;quot; name=&amp;quot;idCompilerMenuCompile&amp;quot;&amp;gt;&lt;br /&gt;
       &amp;lt;tooltip&amp;gt;Build&amp;lt;/tooltip&amp;gt;&lt;br /&gt;
       &amp;lt;longhelp&amp;gt;Build the active project&amp;lt;/longhelp&amp;gt;&lt;br /&gt;
       &amp;lt;bitmap&amp;gt;images/compile.png&amp;lt;/bitmap&amp;gt;&lt;br /&gt;
     &amp;lt;/object&amp;gt;&lt;br /&gt;
     &amp;lt;object class=&amp;quot;tool&amp;quot; name=&amp;quot;idCompilerMenuRun&amp;quot;&amp;gt;&lt;br /&gt;
       &amp;lt;tooltip&amp;gt;Run&amp;lt;/tooltip&amp;gt;&lt;br /&gt;
       &amp;lt;longhelp&amp;gt;Run the active project&amp;lt;/longhelp&amp;gt;&lt;br /&gt;
       &amp;lt;bitmap&amp;gt;images/run.png&amp;lt;/bitmap&amp;gt;&lt;br /&gt;
     &amp;lt;/object&amp;gt;&lt;br /&gt;
 ...&lt;br /&gt;
 ...&lt;br /&gt;
 ...&lt;br /&gt;
     &amp;lt;object class=&amp;quot;separator&amp;quot;/&amp;gt;&lt;br /&gt;
     &amp;lt;object class=&amp;quot;wxStaticText&amp;quot; name=&amp;quot;idToolTargetLabel&amp;quot;&amp;gt;&lt;br /&gt;
       &amp;lt;label&amp;gt;Build target:&amp;lt;/label&amp;gt;&lt;br /&gt;
     &amp;lt;/object&amp;gt;&lt;br /&gt;
     &amp;lt;object class=&amp;quot;wxChoice&amp;quot; name=&amp;quot;idToolTarget&amp;quot;&amp;gt;&lt;br /&gt;
       &amp;lt;content/&amp;gt;&lt;br /&gt;
         &amp;lt;size&amp;gt;160,-1&amp;lt;/size&amp;gt;&lt;br /&gt;
     &amp;lt;/object&amp;gt;&lt;br /&gt;
   &amp;lt;/object&amp;gt;&lt;br /&gt;
 &amp;lt;/resource&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As you can see, this file specifies that it is an XML file in the first line, that it contains resources denoted by the &amp;lt;resource&amp;gt; and &amp;lt;/resource&amp;gt; tags in the second and last lines respectively. Within the resource tags, the XRC file specifies a sequence of objects laid out in a hierarchical structure. Each object belongs to a class (specified with the attribute class, and corresponding to a wxWidgets form or control class) and has a unique identifier. In this file there is only one base level object, named &amp;quot;compiler_toolbar&amp;quot; derived from the Code::Blocks class &amp;quot;wxToolBarAddOn&amp;quot;, a Code::Blocks extension of the wxWidgets type &amp;quot;wxToolbar&amp;quot;. Note that base level objects are restricted to a handful of types, namely:&lt;br /&gt;
&lt;br /&gt;
* Frames&lt;br /&gt;
* Dialogs&lt;br /&gt;
* Panels&lt;br /&gt;
* MenuBars&lt;br /&gt;
* Menus&lt;br /&gt;
* Toolbars&lt;br /&gt;
* Bitmaps&lt;br /&gt;
* Icons&lt;br /&gt;
&lt;br /&gt;
In contrast, the objects owned by base level objects run the entire gamut of wxWidgets controls. In the case of the Compiler toolbar, it owns a sequence of standard bitmap toolbar buttons (idCompilerMenuCompile, idCompilerMenuRun etc), a static text control (idToolTargetLabel) and a choice box (idToolTarget). Panels and dialogs will also contain layout objects derived from classes such as &amp;lt;tt&amp;gt;wxSizer&amp;lt;/tt&amp;gt;. In addition to the basic class and name attributes, base and lower level objects in an XRC file will specify additional detail about their structure, such as associated images, sizing and layout (basically giving you the same control over the intialization of an object as if you had executed its constructor in your c++ code).&lt;br /&gt;
&lt;br /&gt;
While somewhat verbose, the XML-based XRC file is far more readable than the terse 50+ lines of equivalent C++ code required to create a toolbar, load its images and assign unique ids. XRC files can be loaded and displayed in a few lines of C++. You still retain the ability to access individual controls loaded from the XRC. We'll deal with these issues shortly.&lt;br /&gt;
&lt;br /&gt;
In addition to its readability, XRC offers the advantage of separating form layout (contained in the XRC file) from form logic (coded into your plugin binary). XRC files are loaded each time you start your plugin, which allows you to make changes to the layout of a form without the need to recompile you plugin.&lt;br /&gt;
&lt;br /&gt;
A definitive description of the XRC syntax is described in the wxWidgets wiki at http://www.wxwidgets.org/wiki/index.php/Using_XML_Resources_with_XRC&lt;br /&gt;
&lt;br /&gt;
===Creating XRC files for use in your plugin===&lt;br /&gt;
&lt;br /&gt;
While you can create your own XRC widget layouts by coding the XML in a simple text editor, it is far easier to use a GUI program to create the layout, XML and accompanying C++ code for you. For example, in Code::Blocks you can use the [[WxSmith plugin#WxSmith plugin|wxSmith plugin]] to design your XRC forms and accompanying C++ classes for your plugin. wxFormBuilder (TODO: link) is another alternative.&lt;br /&gt;
&lt;br /&gt;
====Tutorial Continued: Creation of an XRC Panel using wxSmith====&lt;br /&gt;
&lt;br /&gt;
Now we will add a simple XRC-based panel to our plugin using wxSmith:&lt;br /&gt;
&lt;br /&gt;
7. Select wxSmith -&amp;gt; Add panel&lt;br /&gt;
&lt;br /&gt;
8. Use the class name &amp;quot;TaskPanel&amp;quot;, check &amp;quot;XRC file&amp;quot;, then press OK&lt;br /&gt;
&lt;br /&gt;
9. The management window should now show a &amp;quot;Resources&amp;quot; tab and open a new editor window displaying an empty panel with a toolbar containing widgets below it. (TODO: screen shot)&lt;br /&gt;
&lt;br /&gt;
10. From the widget toolbar, select &amp;quot;Layout&amp;quot; tab, then choose wxBoxSizer and click anywhere in the panel. After you click the panel, it will be resized and you should see a border indicating the presence of a sizer. A Box Sizer is a container for widgets, that lays out the widgets in either a horizontal or vertical layout. (TODO: Link to more info on sizers)&lt;br /&gt;
&lt;br /&gt;
11. From the widget toolbar, select &amp;quot;Standard&amp;quot; tab, then choose wxComboBox and click within the sizer. This adds a ComboBox to the sizer&lt;br /&gt;
&lt;br /&gt;
12. Choose wxTextCtrl and click within the sizer. This adds a Text Control to the sizer (it should be located to the right of the combo box)&lt;br /&gt;
&lt;br /&gt;
13. In the resources tab, click on the wxBoxSizer entry in the widget tree. Properties for the Box Sizer should appear in the bottom half of this tab. Change the orientation property to wxVertical.&lt;br /&gt;
&lt;br /&gt;
14. Now click on the wxTextCtrl entry in the widget tree, open the styles property and check &amp;quot;wxTE_MULTILINE&amp;quot;. Also check the &amp;quot;Expand&amp;quot; property, which will expand the control to the full width of the panel.&lt;br /&gt;
&lt;br /&gt;
15. Now click on the wxComboBox entry in the widget tree, change the proportion property to zero. This tells the Box Sizer to only expand the Text Control when the size of the panel changes (the Text Control has a positive proportion). Also check the &amp;quot;Expand&amp;quot; property.&lt;br /&gt;
&lt;br /&gt;
16. Save your work. This will save the panel and create the XRC file &amp;quot;TaskPanel.xrc&amp;quot; and C++ header and sources TaskPanel.cpp/TaskPanel.h. You should now have a panel that looks like the following screen shot: &lt;br /&gt;
&lt;br /&gt;
[[File:Prewiew.png]]&lt;br /&gt;
&lt;br /&gt;
17. Close the wxSmith editor.&lt;br /&gt;
&lt;br /&gt;
===Working with XRC files in your plugin===&lt;br /&gt;
&lt;br /&gt;
After you have created your XRC file defining your objects, you will want to be able to use them in your plugin. To do this, we generally want to create a new C++ class associated with each resource object. In the constructor of each class we will use wxWidgets resource loader to find, load and create an instance of the object. Optionally we will associate the widgets contained within each object with member variables.&lt;br /&gt;
&lt;br /&gt;
wxWidgets library offers a global XRC manager &amp;lt;tt&amp;gt;wxXmlResource&amp;lt;/tt&amp;gt; and a number of convenience functions and macros for working with objects defined in XRC files. In general, for each object defined in XRC you will:&lt;br /&gt;
&lt;br /&gt;
* Define a C++ class that corresponds to the object (e.g. Create a class derived from wxDialog for each Dialog defined in the XRC)&lt;br /&gt;
* Call wxXmlResource::Get()-&amp;gt;LoadXXXX(this, parent, &amp;quot;object_name&amp;quot;, [class_derived_from]) in the constructor of your class (where LoadXXXX will be one of LoadBitmap, LoadDialog, LoadPanel, LoadObject etc)&lt;br /&gt;
* Access controls of the object using the macro: XRCCTRL(this, &amp;quot;control_name&amp;quot;, controlclass)  (or alternatively using XRCID and the FindWindow(XRCID(&amp;quot;control_name&amp;quot;)) method (see the next part of the tutorial below))&lt;br /&gt;
* Use the XRCID(&amp;quot;control_name&amp;quot;) macro to refer to an object's controls in Event tables. For example: EVT_TEXT(XRCID(&amp;quot;ID_TEXTCTRL1&amp;quot;), TaskPanel::TextChange)&lt;br /&gt;
&lt;br /&gt;
TODO: wxWidgets links for more info&lt;br /&gt;
&lt;br /&gt;
==== Tutorial Continued: Associate XRC Objects and Controls with C++ Classes and Members ====&lt;br /&gt;
In this part of the tutorial, we will see how wxSmith maps XRC objects to C++ Classes.&lt;br /&gt;
&lt;br /&gt;
18. It will be helpful to add the XRC file to the project (if it wasn't added already). Select project -&amp;gt; add file and select &amp;quot;TaskPanel.xrc&amp;quot;&lt;br /&gt;
&lt;br /&gt;
19. From the management pane, choose &amp;quot;Projects&amp;quot; tab, expand the resources folder of the project and you should see the newly added XRC file&lt;br /&gt;
&lt;br /&gt;
20. Let's take a look at the contents of the XRC file. Right click on the XRC file, select open with, internal editor. The contents of the file should look something like:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot; ?&amp;gt;&lt;br /&gt;
 &amp;lt;resource xmlns=&amp;quot;http://www.wxwidgets.org/wxxrc&amp;quot;&amp;gt;&lt;br /&gt;
 	&amp;lt;object class=&amp;quot;wxPanel&amp;quot; name=&amp;quot;TaskPanel&amp;quot;&amp;gt;&lt;br /&gt;
 		&amp;lt;object class=&amp;quot;wxBoxSizer&amp;quot;&amp;gt;&lt;br /&gt;
 			&amp;lt;orient&amp;gt;wxVERTICAL&amp;lt;/orient&amp;gt;&lt;br /&gt;
 			&amp;lt;object class=&amp;quot;sizeritem&amp;quot;&amp;gt;&lt;br /&gt;
 				&amp;lt;object class=&amp;quot;wxComboBox&amp;quot; name=&amp;quot;ID_COMBOBOX1&amp;quot; /&amp;gt;&lt;br /&gt;
 				&amp;lt;flag&amp;gt;wxALL|wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL&amp;lt;/flag&amp;gt;&lt;br /&gt;
 				&amp;lt;border&amp;gt;5&amp;lt;/border&amp;gt;&lt;br /&gt;
 			&amp;lt;/object&amp;gt;&lt;br /&gt;
 			&amp;lt;object class=&amp;quot;sizeritem&amp;quot;&amp;gt;&lt;br /&gt;
 				&amp;lt;object class=&amp;quot;wxTextCtrl&amp;quot; name=&amp;quot;ID_TEXTCTRL1&amp;quot;&amp;gt;&lt;br /&gt;
 					&amp;lt;value&amp;gt;Text&amp;lt;/value&amp;gt;&lt;br /&gt;
 					&amp;lt;style&amp;gt;wxTE_MULTILINE&amp;lt;/style&amp;gt;&lt;br /&gt;
 				&amp;lt;/object&amp;gt;&lt;br /&gt;
 				&amp;lt;flag&amp;gt;wxALL|wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL&amp;lt;/flag&amp;gt;&lt;br /&gt;
 				&amp;lt;border&amp;gt;5&amp;lt;/border&amp;gt;&lt;br /&gt;
 				&amp;lt;option&amp;gt;1&amp;lt;/option&amp;gt;&lt;br /&gt;
 			&amp;lt;/object&amp;gt;&lt;br /&gt;
 		&amp;lt;/object&amp;gt;&lt;br /&gt;
 	&amp;lt;/object&amp;gt;&lt;br /&gt;
 &amp;lt;/resource&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We see our base object is a wxPanel called TaskPanel and it contains a box sizer with two widgets &amp;quot;ID_COMBOBOX1&amp;quot; and &amp;quot;ID_TEXTCTRL1&amp;quot;. Close the XRC file.&lt;br /&gt;
&lt;br /&gt;
21. wxSmith will already have added TaskPanel.cpp and TaskPanel.h to your project. &lt;br /&gt;
TaskPanel.h defines a minimal TaskPanel class (I've taken the liberty of trimming some of the file contents) and defines pointers to the two controls in the Panel&lt;br /&gt;
&lt;br /&gt;
 class TaskPanel: public wxPanel&lt;br /&gt;
 {&lt;br /&gt;
 	public:&lt;br /&gt;
 		TaskPanel(wxWindow* parent);&lt;br /&gt;
 		virtual ~TaskPanel();&lt;br /&gt;
 		//(*Declarations(TaskPanel)&lt;br /&gt;
 		wxComboBox* ComboBox1;&lt;br /&gt;
 		wxTextCtrl* TextCtrl1;&lt;br /&gt;
 		//*)&lt;br /&gt;
 		DECLARE_EVENT_TABLE()&lt;br /&gt;
 };&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Open TaskPanel.cpp and you should see the following implementations:&lt;br /&gt;
&lt;br /&gt;
 BEGIN_EVENT_TABLE(TaskPanel,wxPanel)&lt;br /&gt;
 	//(*EventTable(TaskPanel)&lt;br /&gt;
 	//*)&lt;br /&gt;
 END_EVENT_TABLE()&lt;br /&gt;
 &lt;br /&gt;
 TaskPanel::TaskPanel(wxWindow* parent)&lt;br /&gt;
 {&lt;br /&gt;
 	//(*Initialize(TaskPanel)&lt;br /&gt;
 	wxXmlResource::Get()-&amp;gt;LoadObject(this,parent,_T(&amp;quot;TaskPanel&amp;quot;),_T(&amp;quot;wxPanel&amp;quot;));&lt;br /&gt;
 	ComboBox1 = (wxComboBox*)FindWindow(XRCID(&amp;quot;ID_COMBOBOX1&amp;quot;));&lt;br /&gt;
 	TextCtrl1 = (wxTextCtrl*)FindWindow(XRCID(&amp;quot;ID_TEXTCTRL1&amp;quot;));&lt;br /&gt;
 	//*)&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 TaskPanel::~TaskPanel()&lt;br /&gt;
 {&lt;br /&gt;
 	//(*Destroy(TaskPanel)&lt;br /&gt;
 	//*)&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
The good news is wxSmith takes care of the hard work involved in creating a class corresponding to your XML object and its controls. This is all done in the TaskPanel constructor. The line &lt;br /&gt;
&lt;br /&gt;
 wxXmlResource::Get()-&amp;gt;LoadObject(this,parent,_T(&amp;quot;TaskPanel&amp;quot;),_T(&amp;quot;wxPanel&amp;quot;));&lt;br /&gt;
&lt;br /&gt;
will search among the codeblocks resources (including all plugin resources) for an XRC object named &amp;lt;tt&amp;gt;TaskPanel&amp;lt;/tt&amp;gt; and create an instance of it derived from the wxPanel class. The call to LoadObject is used in place of a call to the wxPanel constructor ('''make sure that if you edit this code you do not call the wxPanel constructor. Moreover, do not edit inside the comment blocks //(* and //*) as these are wxSmith controlled portions of your code and will be overwritten each time you save your GUI Layouts in the wxSmith editor''')&lt;br /&gt;
The next two lines&lt;br /&gt;
&lt;br /&gt;
 ComboBox1 = (wxComboBox*)FindWindow(XRCID(&amp;quot;ID_COMBOBOX1&amp;quot;));&lt;br /&gt;
 TextCtrl1 = (wxTextCtrl*)FindWindow(XRCID(&amp;quot;ID_TEXTCTRL1&amp;quot;));&lt;br /&gt;
&lt;br /&gt;
create member pointers to the Combo Box and Text Control widgets, making it easy for you to refer to those widgets in your programming logic. Notice that there is no need to release anything in the TaskPanel class destructor.&lt;br /&gt;
&lt;br /&gt;
====&amp;quot;But what if I don't want to use wxSmith?&amp;quot;====&lt;br /&gt;
&lt;br /&gt;
No problem. Other GUI builders can also create the necessary code to define and instantiate your XRC objects as C++ Classes, which should closely correspond to the code generated by wxSmith. You will need to manually add the XRC objects and C++ files that were created by these builders to your plugin project.&lt;br /&gt;
&lt;br /&gt;
If you don't want to use automatically generated code at all, that's fine too, but you will then need to create the Class by hand using appropriate calls to LoadDialog, LoadPanel, LoadObject and friends.&lt;br /&gt;
&lt;br /&gt;
====Tutorial Continued: Programming your XRC objects and controls====&lt;br /&gt;
&lt;br /&gt;
CONTENT COMING SOON&lt;br /&gt;
&lt;br /&gt;
====Tutorial Continued: Adding the XRC file to your cbplugin bundle====&lt;br /&gt;
&lt;br /&gt;
CONTENT COMING SOON&lt;br /&gt;
&lt;br /&gt;
==Working with Extra Files==&lt;br /&gt;
&lt;br /&gt;
MORE CONTENT COMING SOON...&lt;br /&gt;
&lt;br /&gt;
==Further Information==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It is essential to learn how wxWidgets works if you seriously plan on working on plugins, since most of Code::Blocks depends on it, and you will find it easier to add and manipulate components if you have a firm grasp of its principles. More information on this can be found in the wxWidgets [http://www.wxwidgets.org/docs.htm documentation]. Another good place to learn from is the source code from the existing Code::Blocks plugins, which can be downloaded along with the rest of the Code::Blocks source code from the [https://www.codeblocks.org/downloads.shtml download page].&lt;/div&gt;</summary>
		<author><name>Mgimenez</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=Installing_Code::Blocks&amp;diff=9768</id>
		<title>Installing Code::Blocks</title>
		<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php?title=Installing_Code::Blocks&amp;diff=9768"/>
		<updated>2023-11-13T14:35:39Z</updated>

		<summary type="html">&lt;p&gt;Mgimenez: /* Mac OS X */ Added information about Macports working with all versions&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Installing Code::Blocks]]&lt;br /&gt;
__TOC__&lt;br /&gt;
* [[Compiled packages of Code::Blocks]]&lt;br /&gt;
&lt;br /&gt;
== MS Windows ==&lt;br /&gt;
&lt;br /&gt;
* [[Installing the latest official version of Code::Blocks on Windows]]&lt;br /&gt;
* [[Installing Code::Blocks nightly build on Windows]]&lt;br /&gt;
* [[Installing Code::Blocks from source on Windows]]&lt;br /&gt;
&lt;br /&gt;
== Linux ==&lt;br /&gt;
&lt;br /&gt;
* [[Installing Code::Blocks from source on Linux]] (applies to all distros)&lt;br /&gt;
&lt;br /&gt;
=== Ubuntu ===&lt;br /&gt;
&lt;br /&gt;
:* [[Installing Code::Blocks nightly build on Ubuntu]]&lt;br /&gt;
&lt;br /&gt;
=== Debian ===&lt;br /&gt;
&lt;br /&gt;
:* [http://apt.jenslody.de/ Installing Code::Blocks nightly build on Debian]&lt;br /&gt;
&lt;br /&gt;
=== Fedora ===&lt;br /&gt;
&lt;br /&gt;
:* [[Installing Code::Blocks nightly build on Fedora]]&lt;br /&gt;
&lt;br /&gt;
=== Blag ===&lt;br /&gt;
&lt;br /&gt;
:* [[Installing Code::Blocks nightly build on Blag]]&lt;br /&gt;
&lt;br /&gt;
=== Gentoo ===&lt;br /&gt;
&lt;br /&gt;
:* [[Installing Code::Blocks from source on Gentoo]]&lt;br /&gt;
&lt;br /&gt;
=== Platypux ===&lt;br /&gt;
&lt;br /&gt;
:* [[Installing Code::Blocks with LZM binary on Platypux]]&lt;br /&gt;
&lt;br /&gt;
=== Arch Linux ===&lt;br /&gt;
&lt;br /&gt;
:* [[Installing Code::Blocks from source on Arch Linux]]&lt;br /&gt;
&lt;br /&gt;
=== Mageia 7 ===&lt;br /&gt;
&lt;br /&gt;
:* [[Installing Code::Blocks from source on Mageia 7]]&lt;br /&gt;
&lt;br /&gt;
=== RPM based distributions ===&lt;br /&gt;
&lt;br /&gt;
Such as: Red Hat Linux, Yellow Dog Linux, Fedora Core, CentOS, etc. etc.&lt;br /&gt;
&lt;br /&gt;
:* [[Installing Code::Blocks nightly build on RPM based distributions]]&lt;br /&gt;
:* [[Installing Code::Blocks from source on RPM based distributions]]&lt;br /&gt;
&lt;br /&gt;
== BSD ==&lt;br /&gt;
&lt;br /&gt;
=== FreeBSD ===&lt;br /&gt;
&lt;br /&gt;
:* [[Installing Code::Blocks from source on FreeBSD]]&lt;br /&gt;
&lt;br /&gt;
=== OpenBSD ===&lt;br /&gt;
:* http://openports.se/devel/codeblocks&lt;br /&gt;
&lt;br /&gt;
== Solaris ==&lt;br /&gt;
&lt;br /&gt;
* [[Installing Code::Blocks from source on Solaris]]&lt;br /&gt;
&lt;br /&gt;
== Mac OS X ==&lt;br /&gt;
&lt;br /&gt;
* [[Installing the latest official version of Code::Blocks on Mac OS X]]&lt;br /&gt;
&lt;br /&gt;
* [[Installing Code::Blocks nightly build on Mac OS X]]&lt;br /&gt;
&lt;br /&gt;
* [[Installing Code::Blocks from source on Mac OS X]]&lt;br /&gt;
&lt;br /&gt;
You can use also use [https://www.macports.org/ Macports] to install Code::Blocks on MacOS X upto Sonoma.&lt;br /&gt;
&lt;br /&gt;
== Derivatives ==&lt;br /&gt;
&lt;br /&gt;
* [http://codeblocks.codecutter.org/ Code::Blocks EDU-Portable] - portable installation configured for learners and instructors of C/C++.&lt;br /&gt;
&lt;br /&gt;
* [http://darmar.vgtu.lt/ Code::Blocks IDE for Fortran] - additional features for Fortran oriented programmers.&lt;br /&gt;
&lt;br /&gt;
==Working on Code::Blocks sources from within Code::Blocks!==&lt;br /&gt;
&lt;br /&gt;
The following applies for all platforms where you have Code::Blocks installed and working.&lt;br /&gt;
&lt;br /&gt;
After correct install of Code::Blocks you will find two folders under .../trunk/src , one named &amp;quot;devel30&amp;quot; and another one named &amp;quot;output30&amp;quot; (the number depends on wxWidgets version).&lt;br /&gt;
&lt;br /&gt;
These two folders will contain the same files and directory structure and you can use the IDE from either of these two directories. This structure has been created so that you can work in Code::Blocks while editing Code::Blocks' sources ;).&lt;br /&gt;
&lt;br /&gt;
Basically, you'll be using the &amp;quot;output30/CodeBlocks.exe&amp;quot; executable. Code::Blocks' project settings are such that all output goes under &amp;quot;devel30&amp;quot;, so you can edit Code::Blocks' sources inside Code::Blocks and, when pressing &amp;quot;Run&amp;quot;, it will run the &amp;quot;devel30/CodeBlocks.exe&amp;quot; executable ;). This way, you can't ruin the main executable you're using (under &amp;quot;output30&amp;quot;). When your changes satisfy you and all works well, quit Code::Blocks, open a console, change to the src directory and run &amp;quot;update30.bat&amp;quot; (Windows) or &amp;quot;./update30&amp;quot; (Linux) from command line. Then re-launch &amp;quot;output30/CodeBlocks.exe&amp;quot;. You'll be working on your brand new IDE!.&lt;/div&gt;</summary>
		<author><name>Mgimenez</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=Compiler_file&amp;diff=9757</id>
		<title>Compiler file</title>
		<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php?title=Compiler_file&amp;diff=9757"/>
		<updated>2023-05-26T09:53:33Z</updated>

		<summary type="html">&lt;p&gt;Mgimenez: /* See also */ Make link absolute&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Code::Blocks Documentation]]&lt;br /&gt;
[[Category:Developer Documentation]]&lt;br /&gt;
Format for defining compiler interfaces using only XML (in conjunction with [[Compiler options file]]s).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;CodeBlocks_compiler name=&amp;quot;Digital Mars Compiler&amp;quot;&lt;br /&gt;
                     id=&amp;quot;dmc&amp;quot;&lt;br /&gt;
                     weight=&amp;quot;24&amp;quot;&lt;br /&gt;
                     platform=&amp;quot;windows&amp;quot;&amp;gt;&lt;br /&gt;
[...]&lt;br /&gt;
&amp;lt;/CodeBlocks_compiler&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
I am a Code::Blocks compiler file.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;name=&amp;quot;&amp;lt;/tt&amp;gt;&amp;lt;txt&amp;gt;&amp;lt;tt&amp;gt;&amp;quot;&amp;lt;/tt&amp;gt;&lt;br /&gt;
* &amp;lt;txt&amp;gt; is the descriptive name that will be shown to the user for this compiler.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;id=&amp;quot;&amp;lt;/tt&amp;gt;&amp;lt;id&amp;gt;&amp;lt;tt&amp;gt;&amp;quot;&amp;lt;/tt&amp;gt;&lt;br /&gt;
* Lowercase sequence of letters, numbers, underscores, and/or hyphens (it must, however, start with a letter) which is used internally to represent this compiler.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;weight=&amp;quot;&amp;lt;/tt&amp;gt;&amp;lt;num&amp;gt;&amp;lt;tt&amp;gt;&amp;quot;&amp;lt;/tt&amp;gt; (optional)&lt;br /&gt;
* Determines the order in the compiler drop-down menu that this compiler will be listed; lower numbers are listed sooner (keep &amp;lt;num&amp;gt; between 0 and 100).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tt&amp;gt;platform=&amp;quot;&amp;lt;/tt&amp;gt;&amp;lt;os&amp;gt;&amp;lt;tt&amp;gt;&amp;quot;&amp;lt;/tt&amp;gt; (optional). Only load this compiler if the current operating system is &amp;lt;os&amp;gt;. &amp;lt;os&amp;gt; is one of:&lt;br /&gt;
* &amp;lt;tt&amp;gt;windows&lt;br /&gt;
* macosx&lt;br /&gt;
* linux&lt;br /&gt;
* freebsd&lt;br /&gt;
* netbsd&lt;br /&gt;
* openbsd&lt;br /&gt;
* darwin&lt;br /&gt;
* solaris&lt;br /&gt;
* unix&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
All of the following routines are used during auto-detection.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Conditional &amp;lt;tt&amp;gt;&amp;lt;if&amp;gt;[...]&amp;lt;/if&amp;gt;&amp;lt;else&amp;gt;[...]&amp;lt;/else&amp;gt;&amp;lt;/tt&amp;gt; statements are available in the same form as in [[Compiler options file]]s.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;Path type=&amp;quot;master&amp;quot;&amp;gt;&lt;br /&gt;
[...]&lt;br /&gt;
&amp;lt;/Path&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;type=&amp;quot;&amp;lt;/tt&amp;gt;&amp;lt;tp&amp;gt;&amp;lt;tt&amp;gt;&amp;quot;&amp;lt;/tt&amp;gt; Determines what variable the results of the contained detection routine(s) will be stored in. &amp;lt;tp&amp;gt; is one of:&lt;br /&gt;
* &amp;lt;tt&amp;gt;master&lt;br /&gt;
* extra&lt;br /&gt;
* include&lt;br /&gt;
* resource&lt;br /&gt;
* lib&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;Search envVar=&amp;quot;PATH&amp;quot;&lt;br /&gt;
        for=&amp;quot;C&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Searches all paths in the given environment variable.&lt;br /&gt;
* If &amp;lt;tt&amp;gt;for&amp;lt;/tt&amp;gt; is not specified, any path that exists will be added to the current &amp;lt;tt&amp;gt;&amp;lt;Path type=&amp;quot;...&amp;quot;&amp;gt;&amp;lt;/tt&amp;gt;.&lt;br /&gt;
* If &amp;lt;tt&amp;gt;for&amp;lt;/tt&amp;gt; is given, the corresponding executable name will be replaced (if applicable; see &amp;lt;tt&amp;gt;&amp;lt;if exec=&amp;quot;...&amp;quot;&amp;gt;&amp;lt;/if&amp;gt;&amp;lt;/tt&amp;gt; blocks). If the specified file exists on any of the paths in the environment variable, those path(s) will be added.&lt;br /&gt;
If you do not have a &amp;lt;Search envVar= then the compiler auto detection code will not set the masterpath and cause compiler issues.&lt;br /&gt;
&lt;br /&gt;
(If the current path type is &amp;lt;tt&amp;gt;master&amp;lt;/tt&amp;gt;, any trailing &amp;lt;tt&amp;gt;bin&amp;lt;/tt&amp;gt; directories will be stripped.)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;Search path=&amp;quot;C:\MinGW&amp;quot;&lt;br /&gt;
        for=&amp;quot;C&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Same functionality as &amp;lt;tt&amp;gt;&amp;lt;Search envVar=&amp;quot;...&amp;quot;&amp;gt;&amp;lt;/tt&amp;gt; except that this tests a hard-coded path.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;Search path=&amp;quot;C:\WinAVR*&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Wildcards are allowed in &amp;lt;tt&amp;gt;&amp;lt;Search path=&amp;quot;...&amp;quot;&amp;gt;&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;Search registry=&amp;quot;HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Uninstall\SDCC&amp;quot;&lt;br /&gt;
        value=&amp;quot;InstallLocation&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Read a Windows registry key. If &amp;lt;tt&amp;gt;value&amp;lt;/tt&amp;gt; is found in the registry key, and it is a valid folder, it will be added to the current &amp;lt;tt&amp;gt;&amp;lt;Path type=&amp;quot;...&amp;quot;&amp;gt;&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;Fallback path=&amp;quot;/usr/local&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
If the current &amp;lt;tt&amp;gt;&amp;lt;Path type=&amp;quot;...&amp;quot;&amp;gt;&amp;lt;/tt&amp;gt; is empty, add this path to it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;Add&amp;gt;&amp;lt;master/&amp;gt;&amp;lt;separator/&amp;gt;lib&amp;lt;/Add&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Add a path to the current &amp;lt;tt&amp;gt;&amp;lt;Path type=&amp;quot;...&amp;quot;&amp;gt;&amp;lt;/tt&amp;gt;.&lt;br /&gt;
* &amp;lt;tt&amp;gt;&amp;lt;master/&amp;gt;&amp;lt;/tt&amp;gt; is replaced by the contents of the master path.&lt;br /&gt;
* &amp;lt;tt&amp;gt;&amp;lt;separator/&amp;gt;&amp;lt;/tt&amp;gt; is replaced by the system's native file path separator.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;Add cFlag=&amp;quot;-O&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Enable a compiler flag.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;Add lFlag=&amp;quot;-s&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Enable a linker flag.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;Add lib=&amp;quot;pthread&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Add a library.&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
* [[Compiler options file]]&lt;br /&gt;
* [https://forums.codeblocks.org/index.php/topic,16463.0.html XML based compilers]&lt;/div&gt;</summary>
		<author><name>Mgimenez</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=Off-site_documentation&amp;diff=9749</id>
		<title>Off-site documentation</title>
		<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php?title=Off-site_documentation&amp;diff=9749"/>
		<updated>2023-03-20T13:06:02Z</updated>

		<summary type="html">&lt;p&gt;Mgimenez: /* General */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category: Code::Blocks Documentation]]&lt;br /&gt;
This page is for links to '''off-site documentation''' i.e. information that has not yet been (or cannot be) added to the Wiki but exists in the Web.&lt;br /&gt;
&lt;br /&gt;
== General ==&lt;br /&gt;
&lt;br /&gt;
* French programming site, [http://loulou.developpez.com Developpez.com], has a  [http://loulou.developpez.com/tutoriels/cpp/codeblocks/ tutorial about using Code::Blocks] (French only, [http://translate.google.com/translate?u=http%3A%2F%2Floulou.developpez.com%2Ftutoriels%2Fcpp%2Fcodeblocks%2F&amp;amp;langpair=fr%7Cen&amp;amp;hl=en&amp;amp;ie=UTF-8&amp;amp;oe=UTF-8&amp;amp;prev=%2Flanguage_tools English translation] by Google Translate).&lt;br /&gt;
&lt;br /&gt;
* [http://www.sci.brooklyn.cuny.edu/~goetz/codeblocks/ Instruction manual for Code::Blocks] by the Dept. of Computer and Information Science of Brooklyn College of CUNY.&lt;br /&gt;
&lt;br /&gt;
* [http://onilink.byethost18.com/?tag=codeblocks Introduction to C++] - beginning C++ with Code::Blocks.&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/arnholm/cross-pi Cross-compiling with Code::Blocks for Raspberry PI.] - write-up and scripts to set up cross compilation with Code::Blocks from Ubuntu.&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/PBfordev/wxpbguide PB’s Guide to Starting with wxWidgets on Microsoft Windows with MinGW and Code::Blocks]&lt;br /&gt;
&lt;br /&gt;
* [https://sourceforge.net/p/codeblocks-gd-user-manual/code/ci/master/tree/htmlweb/manual_codeblocks_en.pdf Gerard Durand's user manual for Code::Blocks], available also in [https://sourceforge.net/p/codeblocks-gd-user-manual/code/ci/master/tree/htmlweb/manual_codeblocks_fr.pdf french]&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/arnholm/cpde_utils/blob/master/doc/toolchain/CodeBlocks_MSVC2019_setup.pdf Configuring MSVC2019 in Code::Blocks] by Carsten Arnholm.&lt;/div&gt;</summary>
		<author><name>Mgimenez</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=Off-site_documentation&amp;diff=9748</id>
		<title>Off-site documentation</title>
		<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php?title=Off-site_documentation&amp;diff=9748"/>
		<updated>2023-03-20T13:05:31Z</updated>

		<summary type="html">&lt;p&gt;Mgimenez: /* General */ Added MSVC2019 setup guide&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category: Code::Blocks Documentation]]&lt;br /&gt;
This page is for links to '''off-site documentation''' i.e. information that has not yet been (or cannot be) added to the Wiki but exists in the Web.&lt;br /&gt;
&lt;br /&gt;
== General ==&lt;br /&gt;
&lt;br /&gt;
* French programming site, [http://loulou.developpez.com Developpez.com], has a  [http://loulou.developpez.com/tutoriels/cpp/codeblocks/ tutorial about using Code::Blocks] (French only, [http://translate.google.com/translate?u=http%3A%2F%2Floulou.developpez.com%2Ftutoriels%2Fcpp%2Fcodeblocks%2F&amp;amp;langpair=fr%7Cen&amp;amp;hl=en&amp;amp;ie=UTF-8&amp;amp;oe=UTF-8&amp;amp;prev=%2Flanguage_tools English translation] by Google Translate).&lt;br /&gt;
&lt;br /&gt;
* [http://www.sci.brooklyn.cuny.edu/~goetz/codeblocks/ Instruction manual for Code::Blocks] by the Dept. of Computer and Information Science of Brooklyn College of CUNY.&lt;br /&gt;
&lt;br /&gt;
* [http://onilink.byethost18.com/?tag=codeblocks Introduction to C++] - beginning C++ with Code::Blocks.&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/arnholm/cross-pi Cross-compiling with Code::Blocks for Raspberry PI.] - write-up and scripts to set up cross compilation with Code::Blocks from Ubuntu.&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/PBfordev/wxpbguide PB’s Guide to Starting with wxWidgets on Microsoft Windows with MinGW and Code::Blocks]&lt;br /&gt;
&lt;br /&gt;
* [https://sourceforge.net/p/codeblocks-gd-user-manual/code/ci/master/tree/htmlweb/manual_codeblocks_en.pdf Gerard Durand's user manual for Code::Blocks], available also in [https://sourceforge.net/p/codeblocks-gd-user-manual/code/ci/master/tree/htmlweb/manual_codeblocks_fr.pdf french]&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/arnholm/cpde_utils/blob/master/doc/toolchain/CodeBlocks_MSVC2019_setup.pdf Configuring MSVC2019 in Code::Blocks by Carsten Arnholm]&lt;/div&gt;</summary>
		<author><name>Mgimenez</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=WxSmith_tutorial:_Accessing_items_in_resource&amp;diff=9726</id>
		<title>WxSmith tutorial: Accessing items in resource</title>
		<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php?title=WxSmith_tutorial:_Accessing_items_in_resource&amp;diff=9726"/>
		<updated>2022-12-30T13:03:34Z</updated>

		<summary type="html">&lt;p&gt;Mgimenez: /* Setting Up the Form */ Clarify growable property usage&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:wxSmith Documentation]]&lt;br /&gt;
= Accessing Components in a Form =&lt;br /&gt;
&lt;br /&gt;
Welcome to the next tutorial. This time I'll show you how to access items in a resource. I'll show you some basics - for example how to read data from text boxes, change labels, and some more advanced things like changing colours and fonts while the application is running. As usual we will start with an empty application. You shouldn't have any problems with it - all instructions are in the first tutorial.&lt;br /&gt;
&lt;br /&gt;
== Setting Up the Form ==&lt;br /&gt;
&lt;br /&gt;
In this tutorial we will work on items so let's add some:&lt;br /&gt;
&lt;br /&gt;
[[Image:wxs_tut06_001.png]]&lt;br /&gt;
&lt;br /&gt;
In this form, there is a wxBoxSizer, and in it a wxPanel, and on the panel, a wxFlexGridSizer with 2 columns, both growable (to achieve this enter “0,1” (without the quotes) in the Growable Cols property of the sizer, indicating columns 0 and 1). The following array shows which widgets are where in the window.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
wxStaticText 		wxButton&lt;br /&gt;
wxTextCtrl		wxButton&lt;br /&gt;
wxGauge			wxButton&lt;br /&gt;
wxStaticText		wxSlider&lt;br /&gt;
wxStaticText 		wxButton&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
	 &lt;br /&gt;
All widgets and the wxPanel behind them have their Expand property checked.&lt;br /&gt;
&lt;br /&gt;
Here is what we want to make the buttons do:&lt;br /&gt;
*The button in the first row will change the text in the static text left of it.&lt;br /&gt;
*The button in the second row will read whatever text the user has written into the TextCtrl left of it and display that text in a message box. &lt;br /&gt;
*The button in the third row will advance the gauge to the left of it by one tenth of the distance across the gauge, thus simulating a typical progress bar.  &lt;br /&gt;
*Moving the slider in the fourth row will change the size of the font in the static text just left of it. &lt;br /&gt;
* A click on the button in the bottom row will allow the user to change the color of the text in the StaticText control just left of it.&lt;br /&gt;
&lt;br /&gt;
== Accessing Components through their Member Functions ==&lt;br /&gt;
&lt;br /&gt;
If you add an item to the form in the editor, in most cases wxSmith will add a new member variable into the form's C++ class. All those members are listed in the header file, in our present case, the file ''Tutorial_6Main.h''. They are between wxSmith's special comments:  ''//(*Declarations...''  and   ''//*)''. The list  should look like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
...&lt;br /&gt;
class Tutorial_6Frame: public wxFrame&lt;br /&gt;
{&lt;br /&gt;
    ...&lt;br /&gt;
&lt;br /&gt;
        //(*Declarations(Tutorial_6Frame)&lt;br /&gt;
        wxSlider* Slider1;&lt;br /&gt;
        wxButton* Button4;&lt;br /&gt;
        wxStaticText* StaticText2;&lt;br /&gt;
        wxButton* Button1;&lt;br /&gt;
        wxGauge* Gauge1;&lt;br /&gt;
        wxStaticText* StaticText1;&lt;br /&gt;
        wxStaticText* StaticText3;&lt;br /&gt;
        wxButton* Button2;&lt;br /&gt;
        wxButton* Button3;&lt;br /&gt;
        wxStatusBar* StatusBar1;&lt;br /&gt;
        wxTextCtrl* TextCtrl1;&lt;br /&gt;
        //*)&lt;br /&gt;
    ...&lt;br /&gt;
};&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Each component which has such a member variable will also have the following properties:&lt;br /&gt;
* '''Var name''' - name of the used variable&lt;br /&gt;
* '''Is member''' - switch whether this item should be accessible through a class member variable&lt;br /&gt;
&lt;br /&gt;
So if you want to change the name used to access the item, '''Var name''' is the right property to change.&lt;br /&gt;
&lt;br /&gt;
wxSmith forces a few restrictions on variable names. The most obvious is that each variable name must be a valid C++ identifier, so you cannot use special characters or even spaces. Another limitation is that variable names must be unique.&lt;br /&gt;
&lt;br /&gt;
If the name is invalid, wxSmith will automatically replace it with a name that matches the criteria.&lt;br /&gt;
&lt;br /&gt;
== Changing the Label in wxStaticText ==&lt;br /&gt;
&lt;br /&gt;
Let's do a basic exercise. When we click the “Change label” button, we want the program to change the label of the first wxStaticText control to “Label changed”. To make it do so, double click on the button to generate an event handler and change the code to the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
void Tutorial_6Frame::OnButton1Click(wxCommandEvent&amp;amp; event)&lt;br /&gt;
{&lt;br /&gt;
    StaticText1-&amp;gt;SetLabel(_(&amp;quot;Label changed&amp;quot;));&lt;br /&gt;
    Layout();&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the first line of the function body, we used the '''SetLabel()''' function to change the text of the label. Because the length of the text changes, we must recalculate positions, which is done by calling the '''Layout()''' function.&lt;br /&gt;
&lt;br /&gt;
Static items (those which can't be changed by the user) usually have two functions: GetLabel and SetLabel which read and write content presented by this item.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You may wonder why we used some weird notation for the string:&lt;br /&gt;
 _(&amp;quot;Label changed&amp;quot;)&lt;br /&gt;
instead of a simple&lt;br /&gt;
 &amp;quot;Label changed&amp;quot;&lt;br /&gt;
&lt;br /&gt;
There are two advantages of this device:&lt;br /&gt;
* By adding _(...) around our string we prepare our application for the translation process. wxWidgets can help in developing multi-language applications. When a translation is being made, wxWidgets will automatically search for the translation of the phrase  &amp;quot;Label changed&amp;quot;  in a database of equivalent strings in the source and target languages. &lt;br /&gt;
&lt;br /&gt;
* wxWidgets may be provided in two versions: with Unicode support and without it (ANSI build). In the case of a Unicode version, we would have to use Unicode strings: '''L&amp;quot;Label changed&amp;quot;''' and in case of the ANSI version we would have to use standard string notation: '''&amp;quot;Label changed&amp;quot;'''. Using the '''_(...)''' macro insures that no matter what wxWidgets version is used, it will always produce the proper code.&lt;br /&gt;
&lt;br /&gt;
There's an alternative version of the string macro which works similarly to _(...) which is written in the form _T(...) or wxT(...). It works like the _() one but the string is never translated.&lt;br /&gt;
&lt;br /&gt;
== Reading the Value from wxTextCtrl ==&lt;br /&gt;
&lt;br /&gt;
Now let's read something that's written by the user. We will use the wxTextCtrl (with variable TextCtrl1) for this and show the text using a standard message box. Let's double click the '''Read text''' button and change the code to the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
void Tutorial_6Frame::OnButton2Click(wxCommandEvent&amp;amp; event)&lt;br /&gt;
{&lt;br /&gt;
    wxString Text = TextCtrl1-&amp;gt;GetValue();&lt;br /&gt;
    wxMessageBox(_(&amp;quot;User entered text:\n&amp;quot;) + Text);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the first line, we read the value from the TextCtrl and store it in a variable called Text and of the type wxString. wxString is the wxWidgets implementation of a string class and this library uses it as a base for string representation.&lt;br /&gt;
&lt;br /&gt;
In the second line, we call the '''wxMessageBox''' function which shows a standard message box just as if it were a modal dialog.&lt;br /&gt;
&lt;br /&gt;
Usually items which provide content entered by the user have two member functions: GetValue and SetValue. You can use them to read and write the content of such items.&lt;br /&gt;
&lt;br /&gt;
== Changing the value of wxGauge ==&lt;br /&gt;
&lt;br /&gt;
Now let's combine reading and writing of a component's value in one function. We will use wxGauge for this. We will use it's two member functions: GetValue and SetValue. I've written earlier that those functions usually exist in items where the user can enter some value. Well, that rule is not without exceptions as we will now see as we write the handler for the third button. Double click the button and fill in the handler as follows:&lt;br /&gt;
&lt;br /&gt;
 void Tutorial_6Frame::OnButton3Click(wxCommandEvent&amp;amp; event)&lt;br /&gt;
 {&lt;br /&gt;
     int NewValue = Gauge1-&amp;gt;GetValue()+10;&lt;br /&gt;
     if ( NewValue &amp;gt; 100 ) NewValue = 0;&lt;br /&gt;
     Gauge1-&amp;gt;SetValue(NewValue);&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
In the first line, we generate a new progress value by reading the current one and adding 10 to it. In the second line, we prevent the value from getting out of range. (By default, wxGauge has a range set to 0...100. These values can be changed in the Properties browser.) In the third line, we write the new value into the gauge.&lt;br /&gt;
&lt;br /&gt;
== Using the Value from wxSlider to Change Font Size ==&lt;br /&gt;
&lt;br /&gt;
Now let's do something more advanced. In our resource there is a wxSlider and text saying that it changes font size. We will change the font of this label. But we will have to update the font size in two steps:&lt;br /&gt;
&lt;br /&gt;
* As long as the user drags the slider we should change the font size only&lt;br /&gt;
* When the user finishes dragging we should layout the window because the size of the text changes&lt;br /&gt;
&lt;br /&gt;
wxSlider provides two events that can be used precisely for this purpose. The first is '''EVT_COMMAND_SCROLL_THUMB_TRACK''' which is fired while dragging the slider. The second is '''EVT_COMMAND_SCROLL_THUMB_RELEASE''' which is fired when the user finishes dragging.&lt;br /&gt;
&lt;br /&gt;
Because we are using events which are not default for the slider, double clicking on the slider will not work -- as it did with buttons -- to create a frame for the handler. We have to add the two handlers through the Properties browser. You can switch between editing standard properties and editing  events by clicking on buttons at the top of browser:&lt;br /&gt;
&lt;br /&gt;
[[Image:wxs_tut06_002.png]].&lt;br /&gt;
&lt;br /&gt;
When you have switched to events, search for the required events and choose '''Add new handler''' from the drop-down list.&lt;br /&gt;
&lt;br /&gt;
Here's the code for the '''EVT_COMMAND_SCROLL_THUMB_TRACK''' handler:&lt;br /&gt;
&lt;br /&gt;
 void Tutorial_6Frame::OnSlider1CmdScrollThumbTrack(wxScrollEvent&amp;amp; event)&lt;br /&gt;
 {&lt;br /&gt;
     wxFont Font = StaticText2-&amp;gt;GetFont();&lt;br /&gt;
     Font.SetPointSize( Slider1-&amp;gt;GetValue() );&lt;br /&gt;
     StaticText2-&amp;gt;SetFont(Font);&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Here we get the font used by the StaticText control by using the '''GetFont()''' function, change the font's size by using '''SetPointSize()''' and write the font back by using the '''SetFont()''' function. '''GetFont()''' and '''SetFont()''' are available for most components.&lt;br /&gt;
&lt;br /&gt;
Now let's code '''EVT_COMMAND_SCROLL_THUMB_RELEASE''':&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 void Tutorial_6Frame::OnSlider1CmdScrollThumbRelease(wxScrollEvent&amp;amp; event)&lt;br /&gt;
 {&lt;br /&gt;
     Layout();&lt;br /&gt;
     GetSizer()-&amp;gt;SetSizeHints(this);&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
In the first line, we adapt the positions of items to the new font size just as in the case of changing the label in wxStaticText. In the second line, we recalculate the minimal size of the window making sure that all items will have enough space.&lt;br /&gt;
&lt;br /&gt;
(''Use Panel1.GetSizer()-&amp;gt;SetSizeHints(this);for the second line in the above statement, where Panel1 is the name of the base panel in your frame.The original code, rather than resize to the new required size, just resizes to the original, default size.[[User:Ensnarer|Ensnarer]] 03.08.2015'')&lt;br /&gt;
&lt;br /&gt;
== Changing a Component's Color ==&lt;br /&gt;
&lt;br /&gt;
The last thing we will do in this tutorial is to change the color of some item. As in the case of fonts we will change the label on the left side of the '''Change''' button. Since we will use the standard event of this button, we can add an event handler by double-clicking on it. And here's the code:&lt;br /&gt;
&lt;br /&gt;
 void Tutorial_6Frame::OnButton4Click(wxCommandEvent&amp;amp; event)&lt;br /&gt;
 {&lt;br /&gt;
     wxColour OldColour = StaticText3-&amp;gt;GetForegroundColour();&lt;br /&gt;
     wxColour NewColour = wxGetColourFromUser(this,OldColour);&lt;br /&gt;
 &lt;br /&gt;
     if ( NewColour.IsOk() )&lt;br /&gt;
     {&lt;br /&gt;
         StaticText3-&amp;gt;SetForegroundColour(NewColour);&lt;br /&gt;
         Refresh();&lt;br /&gt;
     }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
(wxWidets originated in Edinburgh and therefore uses some quaint spellings going back to Anglo-Norman times.) At the beginning we read the current color into the variable '''OldColour'''. In the next line, we call the '''wxGetColourFromUser''' function which opens a dialog where the user can choose a colour. &lt;br /&gt;
&lt;br /&gt;
At the end, we set the new colour by using the '''SetForegroundColour''' function. Refresh is needed to change colour after setting it.&lt;br /&gt;
&lt;br /&gt;
If, however, you try to compile this code, you will get an error message telling you that  wxGetColourFromUser() is an unknown function. Since we put it in manually, we must also put in manually its header. So open the Tutorial_6Main.h file and add #include &amp;lt;wx/colordlg.h&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The NewColour.IsOk() call is used because if the user cancels the colour selection it will return false. &lt;br /&gt;
But on the Ubuntu Linux 11.10 installation of wxWidgets, the wxColour class did not have an IsOk() funtion, so in fact you must remove this call. According to wxWidgets documentation, the wxColour class '''does''' indeed have the IsOk() member function, but it was not found.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== More information ==&lt;br /&gt;
&lt;br /&gt;
We've reached the end of this tutorial. I showed only a few operations on typical components; there is much more you can do. For more details you can check wxWidgets' documentation available [http://www.wxwidgets.org/manuals/stable/wx_contents.html here].&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;'''[[WxSmith tutorial: Using wxPanel resources|Previous]] | [[WxSmith tutorials|Index]] | [[WxSmith tutorial: Creating items with custom paint and mouse handling|Next]]'''&amp;lt;/center&amp;gt;&lt;/div&gt;</summary>
		<author><name>Mgimenez</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=Main_Page&amp;diff=9725</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php?title=Main_Page&amp;diff=9725"/>
		<updated>2022-12-27T20:19:25Z</updated>

		<summary type="html">&lt;p&gt;Mgimenez: Further clarifying&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 edit pages, you must create an account on the [https://forums.codeblocks.org/ forums] and authenticate there. 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], [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://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>Mgimenez</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=Main_Page&amp;diff=9724</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php?title=Main_Page&amp;diff=9724"/>
		<updated>2022-12-27T20:18:35Z</updated>

		<summary type="html">&lt;p&gt;Mgimenez: Clarify login process&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 [https://forums.codeblocks.org/ forums] and authenticate there. 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], [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://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>Mgimenez</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=Main_Page&amp;diff=9723</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php?title=Main_Page&amp;diff=9723"/>
		<updated>2022-12-27T19:48:20Z</updated>

		<summary type="html">&lt;p&gt;Mgimenez: Make forum URL absolute&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 [https://forums.codeblocks.org/ 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], [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://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>Mgimenez</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=Off-site_documentation&amp;diff=9722</id>
		<title>Off-site documentation</title>
		<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php?title=Off-site_documentation&amp;diff=9722"/>
		<updated>2022-12-26T19:57:06Z</updated>

		<summary type="html">&lt;p&gt;Mgimenez: /* General */ Add links to PB's guide and gd_on's user manual&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category: Code::Blocks Documentation]]&lt;br /&gt;
This page is for links to '''off-site documentation''' i.e. information that has not yet been (or cannot be) added to the Wiki but exists in the Web.&lt;br /&gt;
&lt;br /&gt;
== General ==&lt;br /&gt;
&lt;br /&gt;
* French programming site, [http://loulou.developpez.com Developpez.com], has a  [http://loulou.developpez.com/tutoriels/cpp/codeblocks/ tutorial about using Code::Blocks] (French only, [http://translate.google.com/translate?u=http%3A%2F%2Floulou.developpez.com%2Ftutoriels%2Fcpp%2Fcodeblocks%2F&amp;amp;langpair=fr%7Cen&amp;amp;hl=en&amp;amp;ie=UTF-8&amp;amp;oe=UTF-8&amp;amp;prev=%2Flanguage_tools English translation] by Google Translate).&lt;br /&gt;
&lt;br /&gt;
* [http://www.sci.brooklyn.cuny.edu/~goetz/codeblocks/ Instruction manual for Code::Blocks] by the Dept. of Computer and Information Science of Brooklyn College of CUNY.&lt;br /&gt;
&lt;br /&gt;
* [http://onilink.byethost18.com/?tag=codeblocks Introduction to C++] - beginning C++ with Code::Blocks.&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/arnholm/cross-pi Cross-compiling with Code::Blocks for Raspberry PI.] - write-up and scripts to set up cross compilation with Code::Blocks from Ubuntu.&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/PBfordev/wxpbguide PB’s Guide to Starting with wxWidgets on Microsoft Windows with MinGW and Code::Blocks]&lt;br /&gt;
&lt;br /&gt;
* [https://sourceforge.net/p/codeblocks-gd-user-manual/code/ci/master/tree/htmlweb/manual_codeblocks_en.pdf Gerard Durand's user manual for Code::Blocks], available also in [https://sourceforge.net/p/codeblocks-gd-user-manual/code/ci/master/tree/htmlweb/manual_codeblocks_fr.pdf french]&lt;/div&gt;</summary>
		<author><name>Mgimenez</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=FAQ-Issues_and_Workarounds&amp;diff=9721</id>
		<title>FAQ-Issues and Workarounds</title>
		<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php?title=FAQ-Issues_and_Workarounds&amp;diff=9721"/>
		<updated>2022-12-26T19:45:54Z</updated>

		<summary type="html">&lt;p&gt;Mgimenez: /* Q: I cannot find any text in my Code::Blocks logs? */ Make forum URL absolute&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Code::Blocks Documentation]]&lt;br /&gt;
__TOC__&lt;br /&gt;
Return to '''[[FAQ]]'''.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==== Q: Sometime, in the text editor, space bar triggers Code Completion, how do I fix that? ====&lt;br /&gt;
&lt;br /&gt;
'''A:''' '''The problem is solved in the version 12.11.'''&lt;br /&gt;
&lt;br /&gt;
On Ubuntu 12.04 LTS, version 10.05 from the official repos makes this space bar problem, upgrading to codeblocks 12.11 solved the problem.&lt;br /&gt;
&lt;br /&gt;
For earlier versions, there are (at least) 3 working fixes :&lt;br /&gt;
* [[#setxkbmap_Solution: | setxkbmap]]&lt;br /&gt;
* [[#Hal_Solution_.28Ubuntu_8.10_and_above.29: | Hal]]&lt;br /&gt;
* [[#setxkbmap_Solution: | xorg.conf]]&lt;br /&gt;
&lt;br /&gt;
Information found [/index.php/topic,8291.0.html on the forum]&lt;br /&gt;
&lt;br /&gt;
===== ''setxkbmap Solution:'' =====&lt;br /&gt;
&lt;br /&gt;
run this command before running Code::Blocks (works fines for KUbuntu)&lt;br /&gt;
 setxkbmap  -option nbsp:none&lt;br /&gt;
if it's not enough you can try:&lt;br /&gt;
 setxkbmap  -option nbsp:none -model pc 105 -layout fr -variant latin 9&lt;br /&gt;
&lt;br /&gt;
===== ''Hal Solution (Ubuntu 8.10 and above):'' =====&lt;br /&gt;
&lt;br /&gt;
Note : Hal is now [https://wiki.ubuntu.com/Halsectomy deprecated]&lt;br /&gt;
&lt;br /&gt;
For Ubuntu (and other gnome desktops), another simple solution for the current user is to change a preference.&lt;br /&gt;
# Menu System =&amp;gt; Preferences =&amp;gt; Keyboard&lt;br /&gt;
# Select Tab Layout&lt;br /&gt;
# Edit &amp;quot;Layout Options...&amp;quot;&lt;br /&gt;
# Expand last option &amp;quot;Using space key to input non-breakable space character&amp;quot;&lt;br /&gt;
# Select the last choice &amp;quot;Usual Space at any level&amp;quot;&lt;br /&gt;
This is not system wide.&lt;br /&gt;
&lt;br /&gt;
A system wide solution would be to add an fdi file there (for instance)&lt;br /&gt;
 /etc/hal/fdi/policy/99-x11-key_space_fix.fdi&lt;br /&gt;
put the right thing in it (I did not succeed), unplug your keyboard, plug it again.&lt;br /&gt;
&lt;br /&gt;
===== ''Xorg Solution (prior Hal based distrib):'' =====&lt;br /&gt;
&lt;br /&gt;
as root, edit /etc/X11/xorg.conf and find something like :&lt;br /&gt;
&lt;br /&gt;
 Section &amp;quot;InputDevice&amp;quot;&lt;br /&gt;
        Identifier      &amp;quot;Generic Keyboard&amp;quot;&lt;br /&gt;
        Driver          &amp;quot;kbd&amp;quot;&lt;br /&gt;
        ...&lt;br /&gt;
        Option          &amp;quot;XkbVariant&amp;quot;    &amp;quot;oss&amp;quot;&lt;br /&gt;
 EndSection&lt;br /&gt;
&lt;br /&gt;
Try one of the following workarounds :&lt;br /&gt;
&lt;br /&gt;
1. you comment the line&lt;br /&gt;
         Option          &amp;quot;XkbVariant&amp;quot;    &amp;quot;oss&amp;quot;&lt;br /&gt;
like this&lt;br /&gt;
 #        Option          &amp;quot;XkbVariant&amp;quot;    &amp;quot;oss&amp;quot;&lt;br /&gt;
&lt;br /&gt;
2. you replace&lt;br /&gt;
 &amp;quot;XkbVariant&amp;quot;  &amp;quot;oss&amp;quot;&lt;br /&gt;
with&lt;br /&gt;
 &amp;quot;XkbVariant&amp;quot;  &amp;quot;latin9&amp;quot;   &lt;br /&gt;
&lt;br /&gt;
This works for Ubuntu '''prior 8.10''' (before hal)&lt;br /&gt;
&lt;br /&gt;
It seems that KUbuntu requires the following line:&lt;br /&gt;
    Option     &amp;quot;XkbOptions&amp;quot;  &amp;quot;nbsp:none&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==== Q: IDE is drawing the text from Right to Left? ====&lt;br /&gt;
&lt;br /&gt;
'''A:''' Uncheck &amp;quot;Settings -&amp;gt; Environment -&amp;gt; View -&amp;gt; Internationalization&amp;quot; and restart Code::Blocks&lt;br /&gt;
&lt;br /&gt;
==== Q: All the options in the debug menu are grayed out? ====&lt;br /&gt;
&lt;br /&gt;
'''A:''' Code::Blocks can only use integrated debugging on an active project.  Start a [[Creating a new project|new project]] and [[Creating a new project#Adding a pre-existing file|add the file]] to it. Also see [[debugging with Code::Blocks]].&lt;br /&gt;
&lt;br /&gt;
''Note: Code::Blocks currently only supports the GNU GDB and MSVC CDB debuggers.''&lt;br /&gt;
&lt;br /&gt;
==== Q: My project works everywhere except one computer? ====&lt;br /&gt;
&lt;br /&gt;
'''A:''' Some parts of Code::Blocks or the back-end compiler may not support non-ASCII characters (such as é) or possibly spaces. Try moving the project on the affected computer to a directory that contains neither of these in its path.&lt;br /&gt;
&lt;br /&gt;
==== Q: Syntax highlighting is broken; how do I fix it? ====&lt;br /&gt;
&lt;br /&gt;
'''A:''' Code::Blocks cannot know how to highlight your code unless it knows what lexer to use. This is normally automatically determined by the file extension, so it is important to save the file and name it correctly (for example, &amp;lt;tt&amp;gt;*.c&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;*.cpp&amp;lt;/tt&amp;gt; for C and C++ code). It is also possible to activate syntax highlighting on a temporary basis. Open ''Edit-&amp;gt;Highlight mode'' and select the language the current file is using. Alternatively add the extension to the lexer configuration in the editor options. This will permanently apply the chosen syntax highlighting for all files with this extension.&lt;br /&gt;
&lt;br /&gt;
==== Q: I posted on the forums that Code::Blocks was not working, but no one could help me? ====&lt;br /&gt;
&lt;br /&gt;
'''A:''' There is a distinct lack of crystal balls and divining mirrors here, so you may want to post some information. Using this [[FAQ-Compiling (general)#Q: How do I report a compilation problem on the forums?|template]] in your problem description would be a great help.&lt;br /&gt;
&lt;br /&gt;
==== Q: I cannot find any text in my Code::Blocks logs? ====&lt;br /&gt;
&lt;br /&gt;
'''A:''' On MS Windows, wxWidgets sometimes does not show the content of logs at first; scrolling in the log will bring the text to visibility. Please note that this is a known wxWidgets bug in wxWidgets v2.8.x. See more details in [https://forums.codeblocks.org/index.php/topic,15940.msg108421.html#msg108421 refresh issue in wx2.8.12]&lt;br /&gt;
&lt;br /&gt;
==== Q: Scrolling causes gray areas/distortions to obscure my code in the editor? ====&lt;br /&gt;
&lt;br /&gt;
'''A:''' This has been a reported problem, sometimes occurring on Ubuntu (and its derivatives). There are several actions that seem to resolve the issue.&lt;br /&gt;
&lt;br /&gt;
* Install all the newest updates from Update Manager.&lt;br /&gt;
* Reset Unity.&lt;br /&gt;
: &amp;lt;tt&amp;gt;unity --reset&amp;lt;/tt&amp;gt;&lt;br /&gt;
* Reload compiz by switching to metacity, then back to compiz.&lt;br /&gt;
&lt;br /&gt;
==== Q: I cannot type a greater-than '&amp;gt;' sign? ====&lt;br /&gt;
&lt;br /&gt;
'''A:''' The keyboard shortcut ''Ctrl-Alt-.'' is known to occasionally conflict with this.&lt;br /&gt;
&lt;br /&gt;
Open ''Settings-&amp;gt;Editor...-&amp;gt;Keyboard shortcuts''. The command ''Ctrl-Alt-.'' is assigned to ''Menu bar-&amp;gt;Search-&amp;gt;Open include file'' by default. Changing or removing this shortcut should resolve the problem.&lt;br /&gt;
&lt;br /&gt;
==== Q: Using Code::Blocks with high dpi screens and windows ====&lt;br /&gt;
&lt;br /&gt;
'''A:''' https://forums.codeblocks.org/index.php/topic,21119.msg145906.html#msg145906&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Return to '''[[FAQ]]'''.&lt;/div&gt;</summary>
		<author><name>Mgimenez</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=FAQ-Issues_and_Workarounds&amp;diff=9720</id>
		<title>FAQ-Issues and Workarounds</title>
		<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php?title=FAQ-Issues_and_Workarounds&amp;diff=9720"/>
		<updated>2022-12-26T19:44:56Z</updated>

		<summary type="html">&lt;p&gt;Mgimenez: /* Q: Using Code::Blocks with high dpi screens and windows */ Make URL absolute&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Code::Blocks Documentation]]&lt;br /&gt;
__TOC__&lt;br /&gt;
Return to '''[[FAQ]]'''.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==== Q: Sometime, in the text editor, space bar triggers Code Completion, how do I fix that? ====&lt;br /&gt;
&lt;br /&gt;
'''A:''' '''The problem is solved in the version 12.11.'''&lt;br /&gt;
&lt;br /&gt;
On Ubuntu 12.04 LTS, version 10.05 from the official repos makes this space bar problem, upgrading to codeblocks 12.11 solved the problem.&lt;br /&gt;
&lt;br /&gt;
For earlier versions, there are (at least) 3 working fixes :&lt;br /&gt;
* [[#setxkbmap_Solution: | setxkbmap]]&lt;br /&gt;
* [[#Hal_Solution_.28Ubuntu_8.10_and_above.29: | Hal]]&lt;br /&gt;
* [[#setxkbmap_Solution: | xorg.conf]]&lt;br /&gt;
&lt;br /&gt;
Information found [/index.php/topic,8291.0.html on the forum]&lt;br /&gt;
&lt;br /&gt;
===== ''setxkbmap Solution:'' =====&lt;br /&gt;
&lt;br /&gt;
run this command before running Code::Blocks (works fines for KUbuntu)&lt;br /&gt;
 setxkbmap  -option nbsp:none&lt;br /&gt;
if it's not enough you can try:&lt;br /&gt;
 setxkbmap  -option nbsp:none -model pc 105 -layout fr -variant latin 9&lt;br /&gt;
&lt;br /&gt;
===== ''Hal Solution (Ubuntu 8.10 and above):'' =====&lt;br /&gt;
&lt;br /&gt;
Note : Hal is now [https://wiki.ubuntu.com/Halsectomy deprecated]&lt;br /&gt;
&lt;br /&gt;
For Ubuntu (and other gnome desktops), another simple solution for the current user is to change a preference.&lt;br /&gt;
# Menu System =&amp;gt; Preferences =&amp;gt; Keyboard&lt;br /&gt;
# Select Tab Layout&lt;br /&gt;
# Edit &amp;quot;Layout Options...&amp;quot;&lt;br /&gt;
# Expand last option &amp;quot;Using space key to input non-breakable space character&amp;quot;&lt;br /&gt;
# Select the last choice &amp;quot;Usual Space at any level&amp;quot;&lt;br /&gt;
This is not system wide.&lt;br /&gt;
&lt;br /&gt;
A system wide solution would be to add an fdi file there (for instance)&lt;br /&gt;
 /etc/hal/fdi/policy/99-x11-key_space_fix.fdi&lt;br /&gt;
put the right thing in it (I did not succeed), unplug your keyboard, plug it again.&lt;br /&gt;
&lt;br /&gt;
===== ''Xorg Solution (prior Hal based distrib):'' =====&lt;br /&gt;
&lt;br /&gt;
as root, edit /etc/X11/xorg.conf and find something like :&lt;br /&gt;
&lt;br /&gt;
 Section &amp;quot;InputDevice&amp;quot;&lt;br /&gt;
        Identifier      &amp;quot;Generic Keyboard&amp;quot;&lt;br /&gt;
        Driver          &amp;quot;kbd&amp;quot;&lt;br /&gt;
        ...&lt;br /&gt;
        Option          &amp;quot;XkbVariant&amp;quot;    &amp;quot;oss&amp;quot;&lt;br /&gt;
 EndSection&lt;br /&gt;
&lt;br /&gt;
Try one of the following workarounds :&lt;br /&gt;
&lt;br /&gt;
1. you comment the line&lt;br /&gt;
         Option          &amp;quot;XkbVariant&amp;quot;    &amp;quot;oss&amp;quot;&lt;br /&gt;
like this&lt;br /&gt;
 #        Option          &amp;quot;XkbVariant&amp;quot;    &amp;quot;oss&amp;quot;&lt;br /&gt;
&lt;br /&gt;
2. you replace&lt;br /&gt;
 &amp;quot;XkbVariant&amp;quot;  &amp;quot;oss&amp;quot;&lt;br /&gt;
with&lt;br /&gt;
 &amp;quot;XkbVariant&amp;quot;  &amp;quot;latin9&amp;quot;   &lt;br /&gt;
&lt;br /&gt;
This works for Ubuntu '''prior 8.10''' (before hal)&lt;br /&gt;
&lt;br /&gt;
It seems that KUbuntu requires the following line:&lt;br /&gt;
    Option     &amp;quot;XkbOptions&amp;quot;  &amp;quot;nbsp:none&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==== Q: IDE is drawing the text from Right to Left? ====&lt;br /&gt;
&lt;br /&gt;
'''A:''' Uncheck &amp;quot;Settings -&amp;gt; Environment -&amp;gt; View -&amp;gt; Internationalization&amp;quot; and restart Code::Blocks&lt;br /&gt;
&lt;br /&gt;
==== Q: All the options in the debug menu are grayed out? ====&lt;br /&gt;
&lt;br /&gt;
'''A:''' Code::Blocks can only use integrated debugging on an active project.  Start a [[Creating a new project|new project]] and [[Creating a new project#Adding a pre-existing file|add the file]] to it. Also see [[debugging with Code::Blocks]].&lt;br /&gt;
&lt;br /&gt;
''Note: Code::Blocks currently only supports the GNU GDB and MSVC CDB debuggers.''&lt;br /&gt;
&lt;br /&gt;
==== Q: My project works everywhere except one computer? ====&lt;br /&gt;
&lt;br /&gt;
'''A:''' Some parts of Code::Blocks or the back-end compiler may not support non-ASCII characters (such as é) or possibly spaces. Try moving the project on the affected computer to a directory that contains neither of these in its path.&lt;br /&gt;
&lt;br /&gt;
==== Q: Syntax highlighting is broken; how do I fix it? ====&lt;br /&gt;
&lt;br /&gt;
'''A:''' Code::Blocks cannot know how to highlight your code unless it knows what lexer to use. This is normally automatically determined by the file extension, so it is important to save the file and name it correctly (for example, &amp;lt;tt&amp;gt;*.c&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;*.cpp&amp;lt;/tt&amp;gt; for C and C++ code). It is also possible to activate syntax highlighting on a temporary basis. Open ''Edit-&amp;gt;Highlight mode'' and select the language the current file is using. Alternatively add the extension to the lexer configuration in the editor options. This will permanently apply the chosen syntax highlighting for all files with this extension.&lt;br /&gt;
&lt;br /&gt;
==== Q: I posted on the forums that Code::Blocks was not working, but no one could help me? ====&lt;br /&gt;
&lt;br /&gt;
'''A:''' There is a distinct lack of crystal balls and divining mirrors here, so you may want to post some information. Using this [[FAQ-Compiling (general)#Q: How do I report a compilation problem on the forums?|template]] in your problem description would be a great help.&lt;br /&gt;
&lt;br /&gt;
==== Q: I cannot find any text in my Code::Blocks logs? ====&lt;br /&gt;
&lt;br /&gt;
'''A:''' On MS Windows, wxWidgets sometimes does not show the content of logs at first; scrolling in the log will bring the text to visibility. Please note that this is a known wxWidgets bug in wxWidgets v2.8.x. See more details in [/index.php/topic,15940.msg108421.html#msg108421 refresh issue in wx2.8.12]&lt;br /&gt;
&lt;br /&gt;
==== Q: Scrolling causes gray areas/distortions to obscure my code in the editor? ====&lt;br /&gt;
&lt;br /&gt;
'''A:''' This has been a reported problem, sometimes occurring on Ubuntu (and its derivatives). There are several actions that seem to resolve the issue.&lt;br /&gt;
&lt;br /&gt;
* Install all the newest updates from Update Manager.&lt;br /&gt;
* Reset Unity.&lt;br /&gt;
: &amp;lt;tt&amp;gt;unity --reset&amp;lt;/tt&amp;gt;&lt;br /&gt;
* Reload compiz by switching to metacity, then back to compiz.&lt;br /&gt;
&lt;br /&gt;
==== Q: I cannot type a greater-than '&amp;gt;' sign? ====&lt;br /&gt;
&lt;br /&gt;
'''A:''' The keyboard shortcut ''Ctrl-Alt-.'' is known to occasionally conflict with this.&lt;br /&gt;
&lt;br /&gt;
Open ''Settings-&amp;gt;Editor...-&amp;gt;Keyboard shortcuts''. The command ''Ctrl-Alt-.'' is assigned to ''Menu bar-&amp;gt;Search-&amp;gt;Open include file'' by default. Changing or removing this shortcut should resolve the problem.&lt;br /&gt;
&lt;br /&gt;
==== Q: Using Code::Blocks with high dpi screens and windows ====&lt;br /&gt;
&lt;br /&gt;
'''A:''' https://forums.codeblocks.org/index.php/topic,21119.msg145906.html#msg145906&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Return to '''[[FAQ]]'''.&lt;/div&gt;</summary>
		<author><name>Mgimenez</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=Installing_a_supported_compiler&amp;diff=9672</id>
		<title>Installing a supported compiler</title>
		<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php?title=Installing_a_supported_compiler&amp;diff=9672"/>
		<updated>2022-11-17T06:52:24Z</updated>

		<summary type="html">&lt;p&gt;Mgimenez: /* MinGW/GCC */ Make link to forum absolute&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:User Documentation]]&lt;br /&gt;
When you launch Code::Blocks for the first time, it will scan the system for any supported compilers. Once this scan has finished, Code::Blocks will have been correctly configured for any detected compilers. Code::Blocks will also have default configurations even for compilers that were not found.&lt;br /&gt;
&lt;br /&gt;
This article is a guide for obtaining, installing, and configuring the various compilers that Code::Blocks can use.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Compiler-neutral setup steps ==&lt;br /&gt;
&lt;br /&gt;
Before using a compiler with Code::Blocks you have to install it. The method for installing the compiler depends on the Operating system you're using, the Compiler you intend to use and so on.&lt;br /&gt;
If you installed the compiler on its default installation directory, there is nothing more to configure (if the compiler is natively supported by Code::Blocks). Launch Code::Blocks and you're all set :)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* If that is not the case, launch Code::Blocks. If it is the first time you launch it, the compiler auto-detection will be launched.&lt;br /&gt;
* If your compiler was not auto-detected, go to &amp;quot;Settings-&amp;gt;Compiler and Debugger-&amp;gt;Global Compiler settings-&amp;gt;Toolchain executables&amp;quot;, select the compiler you installed and press &amp;quot;Auto-detect&amp;quot;.&lt;br /&gt;
* If you get a message saying that the compiler was auto-detected, congratulations!&lt;br /&gt;
* If not, then press the button with the three dots next to the &amp;quot;Auto-detect&amp;quot; button and select the installation directory of your compiler manually.&lt;br /&gt;
&lt;br /&gt;
NOTE: ''The compiler's installation directory is exactly this: the installation directory. Not the &amp;quot;bin&amp;quot; subdirectory nor any other.''&lt;br /&gt;
&lt;br /&gt;
== Windows ==&lt;br /&gt;
&lt;br /&gt;
Once you've installed a new compiler, be sure to read the Compiler-neutral setup steps at the end of this article.&lt;br /&gt;
&lt;br /&gt;
At the time of this writing, Code::Blocks supports the following compilers in Windows:&lt;br /&gt;
* [http://www.mingw.org MinGW GCC C/C++ Free Compiler, including GFortran]&lt;br /&gt;
** [http://www.cygwin.org Cygwin GCC C/C++ Free Compiler]&lt;br /&gt;
*** [[#HOWTO: Use Cygwin 1.7 with Code::Blocks|HOWTO: Use Cygwin 1.7 with Code::Blocks]]&lt;br /&gt;
* [http://www.ti.com/tool/msp430-gcc-opensource MSP430 GCC C/C++]&lt;br /&gt;
* [http://www.hightec-rt.com/en/downloads/evaluation-version.html TriCore GCC C/C++]&lt;br /&gt;
* [http://www.hightec-rt.com/en/downloads/evaluation-version.html PowerPC GCC C/C++]&lt;br /&gt;
* [http://sdcc.sourceforge.net/ Small Device Free C Compiler (SDCC)]&lt;br /&gt;
* [http://www.digitalmars.com/ Digital Mars Free C/C++ Compiler]&lt;br /&gt;
* [http://www.digitalmars.com/d/2.0/dmd-windows.html Digital Mars D Compiler for Windows]&lt;br /&gt;
These compilers are generally still under active development by their publishers, so a new version of their software could be released that is incompatible with the current version of Code::Blocks.&lt;br /&gt;
&lt;br /&gt;
The following compilers are still supported by Code::Blocks, but are no longer available from their original publishers.&lt;br /&gt;
* Microsoft's Visual C++ 2003 - 2010&lt;br /&gt;
* Borland's C/C++ Free Compiler 5.5&lt;br /&gt;
&lt;br /&gt;
The following publishers have released newer versions of their compilers which should be tested against the current configuration.  In other words, it is not known yet whether these compilers still work with Code::Blocks.&lt;br /&gt;
&amp;lt;!-- * [https://www.embarcadero.com/free-tools/ccompiler Embarcadero's (formerly Borland) C/C++ Free Compiler] --&amp;gt;&lt;br /&gt;
* [http://www.openwatcom.org/download.php OpenWatcom Free C/C++ Compiler]&lt;br /&gt;
* [https://software.intel.com/en-us/c-compilers/ipsxe Intel C/C++ Compiler] &amp;lt;!-- Does somebody have this one? I do not quality for the free version and do not need to pay for yet another C-compiler on my machine. --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== MinGW/GCC ===&lt;br /&gt;
The official MinGW website is at [http://www.mingw.org mingw.org]. A MinGW-bundled version of the latest Code::Blocks release is available from the [https://www.codeblocks.org/downloads/5#windows Code::Blocks download page]. If you install this version, the GCC compiler will be automatically detected and set as the default. Also you can use the TDM's GCC/mingw32 Builds from [https://forums.codeblocks.org/index.php/topic,10508.0.html] or [http://www.tdragon.net/recentgcc/].&lt;br /&gt;
&lt;br /&gt;
'''Note''': In any case, if you don't install MinGW in C:\MinGW, you'll need to update the configuration of GCC in Code::Blocks.&lt;br /&gt;
&lt;br /&gt;
==== Official MinGW.org ====&lt;br /&gt;
You can install '''MinGW''' yourself, by using an automatic downloader/installer or by downloading and unpacking the required packages by hand from [http://www.mingw.org mingw.org], here: [http://sourceforge.net/projects/mingw/files/].&lt;br /&gt;
&lt;br /&gt;
Packages required (suggested) for MinGW/GCC v3.4.5:&lt;br /&gt;
* Compiler:&lt;br /&gt;
** gcc-build-3.4.5-20060117-3.tar.gz&lt;br /&gt;
** gcc-core-3.4.5-20060117-3.tar.gz&lt;br /&gt;
** gcc-g++-3.4.5-20060117-3.tar.gz&lt;br /&gt;
* Components:&lt;br /&gt;
** binutils-2.19.1-mingw32-bin.tar.gz&lt;br /&gt;
** gdb-6.8-mingw-3.tar.bz2&lt;br /&gt;
** mingw32-make-3.81-20080326.tar.gz&lt;br /&gt;
** mingwrt-3.16-mingw32-dev.tar.gz&lt;br /&gt;
** mingwrt-3.16-mingw32-dll.tar.gz&lt;br /&gt;
** w32api-3.13-mingw32-dev.tar.gz&lt;br /&gt;
&lt;br /&gt;
Packages required (suggested) for MinGW/GCC v4.4.0:&lt;br /&gt;
* Compiler:&lt;br /&gt;
** gcc-full-4.4.0-mingw32-bin-2.tar.lzma&lt;br /&gt;
* Components:&lt;br /&gt;
** binutils-2.19.1-mingw32-bin.tar.gz&lt;br /&gt;
** gdb-6.8-mingw-3.tar.bz2&lt;br /&gt;
** mingw32-make-3.81-20080326.tar.gz&lt;br /&gt;
** mingwrt-3.16-mingw32-dev.tar.gz&lt;br /&gt;
** mingwrt-3.16-mingw32-dll.tar.gz&lt;br /&gt;
** w32api-3.13-mingw32-dev.tar.gz&lt;br /&gt;
&lt;br /&gt;
==== HOWTO: Use Cygwin 1.7 with Code::Blocks ====&lt;br /&gt;
Cygwin 1.7 changed the way symlinks were created and handled when invoked from a command prompt. I couldn't find a way to force CB to use a unix-link shell, but was able to find a work around when perusing the Cygwin mailing lists.&lt;br /&gt;
&lt;br /&gt;
The symptom would show up with a message similar to the one below:&lt;br /&gt;
&lt;br /&gt;
  Execution of 'g++.exe -Wall -fexceptions  -g     -c c:/dev/code/cb1/main.cpp -o obj/Debug/main.o' in 'c:\dev\code\cb1' failed.&lt;br /&gt;
&lt;br /&gt;
Executing the same command from the CMD.EXE prompt yields an &amp;quot;Access is denied&amp;quot; message. This was how I was able to track down why the issue occurred. For more info, see this cygwin mailing list thread: http://www.mail-archive.com/cygwin@cygwin.com/msg104088.html&lt;br /&gt;
&lt;br /&gt;
'''Solution'''&lt;br /&gt;
&lt;br /&gt;
The solution is to point your compiler and linker directly to the version of gcc and g++ that you want to use.&lt;br /&gt;
&lt;br /&gt;
In my case, I wanted to use gcc-4.exe and g++-4.exe and so, I went into Settings-&amp;gt;Compiler and Debugger-&amp;gt;Toolchain executables. There I changed the &amp;quot;C Complier&amp;quot;, &amp;quot;C++ Compiler&amp;quot; and &amp;quot;Linker for dynamic libs&amp;quot; to point to gcc-4.exe, g++-4.exe and g++-4.exe.&lt;br /&gt;
&lt;br /&gt;
After this, compilation and linking worked fine.&lt;br /&gt;
&lt;br /&gt;
It would also be a good idea to add an environment variable CYGWIN with a value of nodosfilewarning in Settings-&amp;gt;Environment-&amp;gt;Environment Variables. This eliminates the following (harmless) warning message:&lt;br /&gt;
&lt;br /&gt;
  MS-DOS style path detected: c:/&lt;br /&gt;
    Preferred POSIX equivalent is: /c&lt;br /&gt;
    CYGWIN environment variable option &amp;quot;nodosfilewarning&amp;quot; turns off this warning.&lt;br /&gt;
    Consult the user's guide for more details about POSIX paths:&lt;br /&gt;
      http://cygwin.com/cygwin-ug-net/using.html#using-pathnames&lt;br /&gt;
&lt;br /&gt;
See also: [[Installing Cygwin Compiler]]&lt;br /&gt;
&lt;br /&gt;
==== (Unofficial) TDM - &amp;quot;Twilight Dragon Media&amp;quot; ====&lt;br /&gt;
These packages are called '''TDM's GCC/mingw32 Builds''' and can be obtained from [/index.php/topic,10508.0.html] or [http://www.tdragon.net/recentgcc/].&lt;br /&gt;
&lt;br /&gt;
Packages required (suggested) for TDM's GCC/mingw32 Builds v4.4.1-tdm-2 SJLJ:&lt;br /&gt;
...which can be found here: [http://sourceforge.net/projects/tdm-gcc/files/] under: TDM-GCC 4.4 series -&amp;gt; 4.4.1-tdm-2 SJLJ.&lt;br /&gt;
* Compiler:&lt;br /&gt;
** gcc-4.4.1-tdm-2-core.zip&lt;br /&gt;
** gcc-4.4.1-tdm-2-g++.zip&lt;br /&gt;
* Components:&lt;br /&gt;
** binutils-2.19.1-mingw32-bin.tar.gz&lt;br /&gt;
** gdb-6.8-mingw-3.tar.bz2&lt;br /&gt;
** mingw32-make-3.81-20080326-3.tar.gz&lt;br /&gt;
** mingwrt-3.16-mingw32-dev.tar.gz&lt;br /&gt;
** mingwrt-3.16-mingw32-dll.tar.gz&lt;br /&gt;
** w32api-3.13-mingw32-dev.tar.gz&lt;br /&gt;
These packages are included in both the [http://sourceforge.net/projects/tdm-gcc/files/TDM-MinGW%20Installer/1.908.0/tdm-mingw-1.908.0-4.4.1-2.exe/download Bundled Installer] and the [http://sourceforge.net/projects/tdm-gcc/files/TDM-MinGW%20Installer/1.908.0/tdm-mingw-1.908.0-webdl.exe/download On-Demand Installer] available via TDMs page referenced above for users who do not wish to download and install them manually.&lt;br /&gt;
&lt;br /&gt;
=== Embarcadero C++ Compiler BCC32C ===&lt;br /&gt;
Formerly Borland's C++ Compiler, this compiler is now published by Embarcadero, with active on-going development; the current version is 10.1 as of this writing.  Go to [https://www.embarcadero.com/free-tools/ccompiler their product download page] to download.  You will be asked to enter some registration information (registration is free) then the download will begin.  You will receive a ZIP archive which contains installation instructions in a text file in the root directory of the archive; it does not have an installer program.&lt;br /&gt;
&lt;br /&gt;
=== Digital Mars C/C++ Free Compiler ===&lt;br /&gt;
Go to [http://www.digitalmars.com/download/dmcpp.html DigitalMars]. Accept the license agreement and you'll be redirected to a page containing download links. &lt;br /&gt;
&lt;br /&gt;
In that page, download:&lt;br /&gt;
*The '''Digital Mars C/C++ Compiler''' (&amp;lt;tt&amp;gt;dm8**c.zip&amp;lt;/tt&amp;gt;)&lt;br /&gt;
*The '''Basic Utilities''' (&amp;lt;tt&amp;gt;bup.zip&amp;lt;/tt&amp;gt;)&lt;br /&gt;
*The '''STLport''' library (&amp;lt;tt&amp;gt;stlport.zip&amp;lt;/tt&amp;gt;)&lt;br /&gt;
&lt;br /&gt;
Open &amp;lt;tt&amp;gt;dm\bin\sc.ini&amp;lt;/tt&amp;gt; in a text editor, and replace the line&lt;br /&gt;
 INCLUDE=&amp;quot;%@P%\..\include&amp;quot;;&amp;quot;%@P%\..\mfc\include&amp;quot;;%INCLUDE%&lt;br /&gt;
with&lt;br /&gt;
 INCLUDE=&amp;quot;%@P%\..\stlport\stlport&amp;quot;;&amp;quot;%@P%\..\include&amp;quot;;&amp;quot;%@P%\..\mfc\include&amp;quot;;%INCLUDE%&lt;br /&gt;
&lt;br /&gt;
=== Intel C++ Compiler ===&lt;br /&gt;
Please note that on Windows platform, Intel C/C++ compiler requires ''Microsoft Visual C++[http://www.microsoft.com/express/download/offline.aspx]'' to be present in your system in order to function properly. It will not compile any C++ program without it. You should also note that ''Windows SDK[http://www.microsoft.com/downloads/details.aspx?FamilyID=e6e1c3df-a74f-4207-8586-711ebe331cdc&amp;amp;DisplayLang=en]'' shall be installed in order to compile Windows app.&lt;br /&gt;
&lt;br /&gt;
Code::Blocks (C::B) is now able to detect (from svn revision 4967 onwards) Intel C/C++ compiler and it'll then automatically setup the MSVC compiler so that the Intel compiler works as intended. However if you wish to manually install the Intel C/C++ compiler, then follow the following steps.&lt;br /&gt;
&lt;br /&gt;
* Go to '''Settings &amp;gt; Compilers and debuggers''' and then select '''Intel C/C++ compiler'''.&lt;br /&gt;
* Click on the '''Toolchain executables''' tab. Point to the installation directory, e.g. &amp;lt;tt&amp;gt;C:\Program Files\Intel\Compiler\C++\10.1.020\IA32&amp;lt;/tt&amp;gt; , inside the ''Compiler's installation directory'' textbox.&lt;br /&gt;
* Click on the '''Additional Paths''' tab and fill in the directories pointing to MSVC bin directory and the Windows SDK directory. It may look like-&lt;br /&gt;
 C:\Program Files\Microsoft Visual Studio 8\VC\bin&lt;br /&gt;
 C:\Program Files\Microsoft Visual Studio 8\Common7\IDE&lt;br /&gt;
 C:\Program Files\Microsoft SDKs\Windows\v6.0\bin&lt;br /&gt;
* Click on the '''Search directories''' tab and add the include directories containing headers offered by Intel C/C++ compiler, MSVC compiler and the Windows SDK headers to '''Compiler''' and '''Resource compiler'''. It may look like-&lt;br /&gt;
 C:\Program Files\Intel\Compiler\C++\10.1.020\IA32\include&lt;br /&gt;
 C:\Program Files\Microsoft Visual Studio 8\VC\include&lt;br /&gt;
 C:\Program Files\Microsoft SDKs\Windows\v6.0\Include&lt;br /&gt;
* Click on the '''Linker''' tab under '''Search directories''' tab and add the directories containing libraries offered by Intel C/C++ compiler, MSVC compiler and the Windows SDK. It may look like-&lt;br /&gt;
 C:\Program Files\Intel\Compiler\C++\10.1.020\IA32\lib&lt;br /&gt;
 C:\Program Files\Microsoft Visual Studio 8\VC\lib&lt;br /&gt;
 C:\Program Files\Microsoft SDKs\Windows\v6.0\Lib&lt;br /&gt;
&lt;br /&gt;
Click on the '''OK''' button to save the settings. Now you should be able to use Intel C/C++ compilers on Windows with C::B.&lt;br /&gt;
&lt;br /&gt;
Note: The directories specified above may be different on your PC.&lt;br /&gt;
&lt;br /&gt;
=== Digital Mars D Compiler for Windows ===&lt;br /&gt;
Now Digital Mars D Compiler (DMD) supports 32bit Windows, and in future it will support 64bit Windows.&lt;br /&gt;
If you want to build D program in CodeBlocks on 32bit Windows, please following the instructions as bellow.&lt;br /&gt;
&lt;br /&gt;
1). Install DMD(2.0) into your Windows system.&lt;br /&gt;
&lt;br /&gt;
You should correctly combine the DMD compiler and install it into your system. Please view the instructions on digitalmars.com website.&lt;br /&gt;
DMD for Windows http://www.digitalmars.com/d/2.0/dmd-windows.html&lt;br /&gt;
&lt;br /&gt;
The newest DMD2 source you can get here: https://github.com/D-Programming-Language&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
2). Settings in CodeBlocks.&lt;br /&gt;
&lt;br /&gt;
You should add correct DMD pathes into CodeBlocks '''Global compiler settings'''&lt;br /&gt;
&lt;br /&gt;
    2.1). &amp;quot;Settings -&amp;gt; Compiler and debugger settings&amp;quot; and choose compiler to &amp;quot;'''Digital Mars D Compiler'''&amp;quot;;&lt;br /&gt;
    2.2). click &amp;quot;Compiler settings -&amp;gt; Other options&amp;quot;, add  '''-m32'''  into the field;&lt;br /&gt;
    2.3). click &amp;quot;Linker settings&amp;quot;, and add &amp;quot;'''D:\Program\DMD2\windows\lib\phobos.lib'''&amp;quot; into the &amp;quot;Link libraries&amp;quot;;&lt;br /&gt;
    2.4). click &amp;quot;Search directories -&amp;gt; Compiler&amp;quot;, and add &amp;quot;'''D:\Program\DMD2\src\phobos'''&amp;quot; into the field;&lt;br /&gt;
    2.5). click &amp;quot;Search directories -&amp;gt; Linker&amp;quot;, and add &amp;quot;'''D:\Program\DMD2\windows\lib'''&amp;quot; into the field;&lt;br /&gt;
    2.6). click &amp;quot;Toolchain executables&amp;quot;, add &amp;quot;'''D:\Program\DMD2\windows'''&amp;quot; into the &amp;quot;Compiler's installation directory&amp;quot; filed;&lt;br /&gt;
          (if you installed DMD2 correctly acc. to Installation setp, just click 'Auto-detect' button.)&lt;br /&gt;
    2.7). Additional: If you wan to specify the DMC (Digital Mars C/C++ Compiler) you can do like this:&lt;br /&gt;
          click &amp;quot;Toolchain executables -&amp;gt; Additional Paths&amp;quot;, and add &amp;quot;D:\Program\DMC\bin&amp;quot; into the field.&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;D:\Program\DMD2&amp;quot; or &amp;quot;D:\Program\DMC\bin&amp;quot; here should change to your own DMD or DMC path in your system.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3). Testing D program in CodeBlocks.&lt;br /&gt;
&lt;br /&gt;
In CodeBlocks, produce a '''D Application''' project, and input your own D code into the .d file in the project, then '''build/run'''.&lt;br /&gt;
&lt;br /&gt;
== Linux ==&lt;br /&gt;
&lt;br /&gt;
At the time of this writing, Code::Blocks supports the following compilers in Linux:&lt;br /&gt;
* [http://gcc.gnu.org/ GNU GCC C/C++ Free Compiler]&lt;br /&gt;
* [http://sdcc.sourceforge.net/ Small Device Free C Compiler (SDCC)]&lt;br /&gt;
* [http://www.intel.com/cd/software/products/asmo-na/eng/compilers/index.htm Intel C/C++ Compiler]&lt;br /&gt;
* [http://www.digitalmars.com/d/2.0/dmd-linux.html Digital Mars D Compiler for Linux]&lt;br /&gt;
&lt;br /&gt;
===Digital Mars D Compiler for Linux===&lt;br /&gt;
Now Digital Mars D Compiler (DMD) supports 32bit and 64bit Linux, and 'support Linux library' is under construction. If you want to build D program in CodeBlocks on 32bit and 64bit Linux, please following the instructions as bellow.&lt;br /&gt;
&lt;br /&gt;
1). Install DMD(2.0) into your Linux system.&lt;br /&gt;
&lt;br /&gt;
You should correctly combine the DMD compiler and install it into your system. Please view the instructions on digitalmars.com website.&lt;br /&gt;
DMD for Linux http://www.digitalmars.com/d/2.0/dmd-linux.html&lt;br /&gt;
&lt;br /&gt;
The newest DMD2 source you can get here:&lt;br /&gt;
https://github.com/D-Programming-Language&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
2). Settings in CodeBlocks.&lt;br /&gt;
&lt;br /&gt;
A). 32bit Linux &amp;amp; 32bit DMD2.&lt;br /&gt;
&lt;br /&gt;
On 32bit Linux, you should combine 32bit DMD2 from DMD2 source and install it into your system.&lt;br /&gt;
&lt;br /&gt;
You should add correct DMD pathes into CodeBlocks '''Global compiler settings'''.&lt;br /&gt;
&lt;br /&gt;
    A.1). &amp;quot;Settings -&amp;gt; Compiler and debugger settings&amp;quot; and choose compiler to &amp;quot;'''Digital Mars D Compiler'''&amp;quot;;&lt;br /&gt;
    A.2). click &amp;quot;Compiler settings -&amp;gt; Other options&amp;quot;, add  '''-m32'''  into the field.&lt;br /&gt;
    A.3). click &amp;quot;Linker settings&amp;quot;, and add &amp;quot;'''/opt/dmd2/linux/lib32/libphobos2.a'''&amp;quot; into the &amp;quot;Link libraries&amp;quot;. &lt;br /&gt;
    A.4). click &amp;quot;Search directories -&amp;gt; Compiler&amp;quot;, and add &amp;quot;'''/opt/dmd2/src/phobos'''&amp;quot; into the field.&lt;br /&gt;
    A.5). click &amp;quot;Search directories -&amp;gt; Linker&amp;quot;, and add &amp;quot;'''/opt/dmd2/linux/lib32'''&amp;quot; into the field. &lt;br /&gt;
    A.6). click &amp;quot;Toolchain executables&amp;quot;, add &amp;quot;'''/opt/dmd2/linux'''&amp;quot; into the &amp;quot;Compiler's installation directory&amp;quot; filed.&lt;br /&gt;
    A.7). change the value of &amp;quot;Program Files -&amp;gt; Linker for dynamic libs&amp;quot; to &amp;quot;'''gcc -m32 -lrt'''&amp;quot; or &amp;quot;'''gcc -lrt'''&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
If you installed DMD2 to a different path, please modify &amp;quot;/opt/dmd2&amp;quot; to your own DMD2 path.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
B1). 64bit Linux &amp;amp; '''64bit DMD2'''.&lt;br /&gt;
&lt;br /&gt;
On 64bit Linux, you can combine 64bit DMD2 from DMD2 source and install it into your system.&lt;br /&gt;
&lt;br /&gt;
You should add correct DMD paths into CodeBlocks '''Global compiler settings'''.&lt;br /&gt;
&lt;br /&gt;
    B1.1). &amp;quot;Settings -&amp;gt; Compiler and debugger settings&amp;quot; and choose compiler to &amp;quot;'''Digital Mars D Compiler'''&amp;quot;;&lt;br /&gt;
    B1.2). click &amp;quot;Compiler settings -&amp;gt; Other options&amp;quot;, add  '''-m64'''  into the field.&lt;br /&gt;
    B1.3). click &amp;quot;Linker settings&amp;quot;, and add &amp;quot;'''/opt/dmd2/linux/lib64/libphobos2.a'''&amp;quot; into the &amp;quot;Link libraries&amp;quot;. &lt;br /&gt;
    B1.4). click &amp;quot;Search directories -&amp;gt; Compiler&amp;quot;, and add &amp;quot;'''/opt/dmd2/src/phobos'''&amp;quot; into the field.&lt;br /&gt;
    B1.5). click &amp;quot;Search directories -&amp;gt; Linker&amp;quot;, and add &amp;quot;'''/opt/dmd2/linux/lib64'''&amp;quot; into the field. &lt;br /&gt;
    B1.6). click &amp;quot;Toolchain executables&amp;quot;, add &amp;quot;'''/opt/dmd2/linux'''&amp;quot; into the &amp;quot;Compiler's installation directory&amp;quot; filed.&lt;br /&gt;
    B1.7). change the value of &amp;quot;Program Files -&amp;gt; Linker for dynamic libs&amp;quot; to &amp;quot;'''gcc -m64 -lrt'''&amp;quot; or &amp;quot;'''gcc -lrt'''&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
If you installed DMD2 to a different path, please modify &amp;quot;/opt/dmd2&amp;quot; to your own DMD2 path.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
B2). 64bit Linux with '''32bit DMD2'''.&lt;br /&gt;
&lt;br /&gt;
On 64bit Linux, you can combine 32bit DMD2 with 64bit together from DMD2 source and install them into your system.&lt;br /&gt;
&lt;br /&gt;
You should add correct DMD paths into CodeBlocks '''Global compiler settings'''.&lt;br /&gt;
&lt;br /&gt;
    B2.1). &amp;quot;Settings -&amp;gt; Compiler and debugger settings&amp;quot; and choose compiler to &amp;quot;'''Digital Mars D Compiler'''&amp;quot;;&lt;br /&gt;
    B2.2). click &amp;quot;Compiler settings -&amp;gt; Other options&amp;quot;, add '''-m32''' into the field.&lt;br /&gt;
    B2.3). click &amp;quot;Linker settings&amp;quot;, and add &amp;quot;'''/opt/dmd2/linux/lib32/libphobos2.a'''&amp;quot; into the &amp;quot;Link libraries&amp;quot;. &lt;br /&gt;
    B2.4). click &amp;quot;Search directories -&amp;gt; Compiler&amp;quot;, and add &amp;quot;'''/opt/dmd2/src/phobos'''&amp;quot; into the field.&lt;br /&gt;
    B2.5). click &amp;quot;Search directories -&amp;gt; Linker&amp;quot;, and add &amp;quot;'''/opt/dmd2/linux/lib32'''&amp;quot; into the field. &lt;br /&gt;
    B2.6). click &amp;quot;Toolchain executables&amp;quot;, add &amp;quot;'''/opt/dmd2/linux'''&amp;quot; into the &amp;quot;Compiler's installation directory&amp;quot; filed.&lt;br /&gt;
    B2.7). change the value of &amp;quot;Program Files -&amp;gt; Linker for dynamic libs&amp;quot; to &amp;quot;'''gcc -m32 -lrt'''&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
If you installed DMD2 to a different path, please modify &amp;quot;/opt/dmd2&amp;quot; to your own DMD2 path.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3). Testing D program in CodeBlocks.&lt;br /&gt;
&lt;br /&gt;
In CodeBlocks, produce a '''D Application''' project, and input your own D code into the .d file in the project, then '''build/run'''.&lt;br /&gt;
&lt;br /&gt;
=== Downloading the GNU GCC compiler &amp;amp; GDB debugger ===&lt;br /&gt;
&lt;br /&gt;
Under Linux you'll, most probably, already have everything that is needed in order to compile. All major Linux distributions (RedHat, Debian, SuSE, Mandriva, Gentoo, ArchLinux, etc) come with GCC &amp;amp; GDB preinstalled. To make sure you have have gcc installed, go to your terminal and type 'gcc -v'. In case you have GCC installed, you will get GCC's compile options and version number.&lt;br /&gt;
&lt;br /&gt;
==Mac OS X==&lt;br /&gt;
The Mac OS X port efforts has began recently, but it should be a matter of time until these compilers will be supported:&lt;br /&gt;
* [http://gcc.gnu.org/ GNU GCC]&lt;br /&gt;
* [http://www.intel.com/cd/software/products/asmo-na/eng/compilers/index.htm Intel Compiler beta (not yet released to public)]&lt;br /&gt;
* [http://sdcc.sourceforge.net/ Small Device C Compiler (SDCC)]&lt;br /&gt;
&lt;br /&gt;
=== Downloading the GNU GCC compiler &amp;amp; GDB debugger ===&lt;br /&gt;
&lt;br /&gt;
Under Mac you'll need to install a ''compatible'' version Xcode Tools from http://developer.apple.com/tools/ (or http://developer.apple.com/downloads). You need the &amp;quot;Command Line Tools&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
This will install Apple versions of:&lt;br /&gt;
&lt;br /&gt;
http://www.gnu.org/software/gcc/&lt;br /&gt;
&lt;br /&gt;
http://www.gnu.org/software/gdb/&lt;br /&gt;
&lt;br /&gt;
http://www.gnu.org/software/make/&lt;br /&gt;
&lt;br /&gt;
=== Setting up compiler switches ===&lt;br /&gt;
&lt;br /&gt;
Usually you need to tweak the compiler options to be able to compile C++ applications - that's the stuff Xcode hides from your eyes, but you better should know. You need to point to the GNU compiler's C/C++ include folders, to the GNU linkers libraries folder and a adjust the compiler options to setup the GNU compiler root path. Those path's differ depending on what hardware (processor architecture) and what version of MacOS is used. For an Intel based Mac with MacOS 10.6.2 and Xcode v3.2.2 the following should work:&lt;br /&gt;
&lt;br /&gt;
Compiler search directories (&amp;quot;include&amp;quot; folders):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
/Developer/SDKs/MacOSX10.6.sdk/usr/include&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
/Developer/SDKs/MacOSX10.6.sdk/usr/include/c++/4.2.1&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Linker search directories (&amp;quot;library&amp;quot; folders):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
/Developer/SDKs/MacOSX10.6.sdk/usr/lib&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
/Developer/SDKs/MacOSX10.6.sdk/usr/lib/gcc/i686-apple-darwin10/4.2.1&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Additional compiler flags:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
-isysroot /Developer/SDKs/MacOSX10.6.sdk -mmacosx-version-min=10.6 -gdwarf-2&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Remote Compilation ==&lt;br /&gt;
Remote compilation is not directly supported by Code::Blocks, however, the following articles explain two remote compilation systems, which use 3rd party programs to provide this functionality:&lt;br /&gt;
&lt;br /&gt;
[[Installing Uniwin remote compiler]]&amp;lt;br /&amp;gt;&lt;br /&gt;
[[Using Xming for remote compilation]]&lt;br /&gt;
&lt;br /&gt;
== Misc. Custom Compilers ==&lt;br /&gt;
There are several user contributions for different (non-C/C++) compiler which are listed here:&lt;br /&gt;
&lt;br /&gt;
https://wiki.codeblocks.org/index.php?title=User_documentation#Compilers&lt;/div&gt;</summary>
		<author><name>Mgimenez</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=Developer_documentation&amp;diff=9631</id>
		<title>Developer documentation</title>
		<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php?title=Developer_documentation&amp;diff=9631"/>
		<updated>2022-11-13T11:07:17Z</updated>

		<summary type="html">&lt;p&gt;Mgimenez: Make link to forum absolute&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 [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>Mgimenez</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=File_formats_description&amp;diff=9613</id>
		<title>File formats description</title>
		<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php?title=File_formats_description&amp;diff=9613"/>
		<updated>2022-10-28T06:03:35Z</updated>

		<summary type="html">&lt;p&gt;Mgimenez: Make forum URL absolute&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Code::Blocks Documentation]]&lt;br /&gt;
[[Category:Developer Documentation]]&lt;br /&gt;
Code::Blocks projects/workspaces are described in XML files. Here are contained links to documentation for each one of them.&lt;br /&gt;
&lt;br /&gt;
This information is of interest to anyone wanting to write an importer/exporter/generator for other build systems/environments and therefore add support for Code::Blocks.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''[[Workspace file]]''' (*.workspace)&lt;br /&gt;
:Defines a Code::Blocks workspace (collection of projects).&lt;br /&gt;
&lt;br /&gt;
* '''[[Project file]]''' (*.cbp)&lt;br /&gt;
:Defines a Code::Blocks project.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Additional files used as of December 12, 1012 (from the merge of the [https://forums.codeblocks.org/index.php/topic,16463.0.html XML compiler branch]):&lt;br /&gt;
&lt;br /&gt;
* '''[[Compiler file]]''' (compiler_*.xml)&lt;br /&gt;
:Defines a Code::Blocks compiler interface and auto-detection routines.&lt;br /&gt;
&lt;br /&gt;
* '''[[Compiler options file]]''' (options_*.xml)&lt;br /&gt;
:Defines the options and regular expressions for a Code::Blocks compiler.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
''Code::Blocks also produces a couple other files (*.layout and *.depend) but they only contain state information so they are not really useful to anyone else other than Code::Blocks itself.''&lt;br /&gt;
&lt;br /&gt;
[[User:Mandrav|Mandrav]] 11:42, 1 March 2007 (UTC)&lt;/div&gt;</summary>
		<author><name>Mgimenez</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=Creating_a_patch_to_submit_(Patch_Tracker)&amp;diff=9611</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=9611"/>
		<updated>2022-09-05T11:56:49Z</updated>

		<summary type="html">&lt;p&gt;Mgimenez: /* Patch creation */ Link format&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Developer Documentation]]&lt;br /&gt;
== Introduction ==&lt;br /&gt;
Do 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 [https://forums.codeblocks.org/index.php/board,20.0.html nightly builds] of Code::Blocks. 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 [https://forums.codeblocks.org forum] for advice.&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 [https://www.codeblocks.org/downloads/7 here]. 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 [https://forums.codeblocks.org/index.php/board,7.0.html development 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;
''Note: if you use Powershell on Windows, the generated file can not be used directly because it will be in UTF-16 format. Use Notepad++ to reencode in ANSI or generate it again using this command:''&lt;br /&gt;
: &amp;lt;tt&amp;gt;svn diff | out-file -encoding ascii my.patch&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you are using git or git-svn and sending to someone with an svn setup, the output can be more easily handled following [https://forums.codeblocks.org/index.php/topic,19391.msg132530.html#msg132530 these steps] or one of the following commands:&lt;br /&gt;
: &amp;lt;tt&amp;gt;git diff --no-prefix &amp;gt; my.patch&amp;lt;/tt&amp;gt;&lt;br /&gt;
: &amp;lt;tt&amp;gt;svn patch my.patch --strip 1&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Patch application and testing ===&lt;br /&gt;
Most Subversion front-end UI tools (like TortoiseSVN or SmartSVN) have an option to apply this patch files directly.&lt;br /&gt;
&lt;br /&gt;
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;
...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;
If you only need the command line without SVN tooling (why would you do so?), then 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;
'''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;Tickets&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>Mgimenez</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=Creating_a_patch_to_submit_(Patch_Tracker)&amp;diff=9610</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=9610"/>
		<updated>2022-09-05T11:52:01Z</updated>

		<summary type="html">&lt;p&gt;Mgimenez: /* What is required? */ Fix link format&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Developer Documentation]]&lt;br /&gt;
== Introduction ==&lt;br /&gt;
Do 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 [https://forums.codeblocks.org/index.php/board,20.0.html nightly builds] of Code::Blocks. 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 [https://forums.codeblocks.org forum] for advice.&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 [https://www.codeblocks.org/downloads/7 here]. 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 [https://forums.codeblocks.org/index.php/board,7.0.html development 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;
''Note: if you use Powershell on Windows, the generated file can not be used directly because it will be in UTF-16 format. Use Notepad++ to reencode in ANSI or generate it again using this command:''&lt;br /&gt;
: &amp;lt;tt&amp;gt;svn diff | out-file -encoding ascii my.patch&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you are using git or git-svn and sending to someone with an svn setup, the output can be more easily handled with either [https://forums.codeblocks.org/index.php/topic,19391.msg132530.html#msg132530&amp;lt;nowiki&amp;gt;] or one of&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
: &amp;lt;tt&amp;gt;git diff --no-prefix &amp;gt; my.patch&amp;lt;/tt&amp;gt;&lt;br /&gt;
: &amp;lt;tt&amp;gt;svn patch my.patch --strip 1&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Patch application and testing ===&lt;br /&gt;
Most Subversion front-end UI tools (like TortoiseSVN or SmartSVN) have an option to apply this patch files directly.&lt;br /&gt;
&lt;br /&gt;
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;
...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;
If you only need the command line without SVN tooling (why would you do so?), then 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;
'''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;Tickets&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>Mgimenez</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=Creating_a_patch_to_submit_(Patch_Tracker)&amp;diff=9609</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=9609"/>
		<updated>2022-09-05T11:50:55Z</updated>

		<summary type="html">&lt;p&gt;Mgimenez: /* Patch creation */ Fix link format&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Developer Documentation]]&lt;br /&gt;
== Introduction ==&lt;br /&gt;
Do 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 [https://forums.codeblocks.org/index.php/board,20.0.html nightly builds] of Code::Blocks. 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 [https://forums.codeblocks.org forum] for advice.&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 [https://forums.codeblocks.org/index.php/board,7.0.html development 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;
''Note: if you use Powershell on Windows, the generated file can not be used directly because it will be in UTF-16 format. Use Notepad++ to reencode in ANSI or generate it again using this command:''&lt;br /&gt;
: &amp;lt;tt&amp;gt;svn diff | out-file -encoding ascii my.patch&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you are using git or git-svn and sending to someone with an svn setup, the output can be more easily handled with either [https://forums.codeblocks.org/index.php/topic,19391.msg132530.html#msg132530&amp;lt;nowiki&amp;gt;] or one of&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
: &amp;lt;tt&amp;gt;git diff --no-prefix &amp;gt; my.patch&amp;lt;/tt&amp;gt;&lt;br /&gt;
: &amp;lt;tt&amp;gt;svn patch my.patch --strip 1&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Patch application and testing ===&lt;br /&gt;
Most Subversion front-end UI tools (like TortoiseSVN or SmartSVN) have an option to apply this patch files directly.&lt;br /&gt;
&lt;br /&gt;
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;
...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;
If you only need the command line without SVN tooling (why would you do so?), then 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;
'''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;Tickets&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>Mgimenez</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=Creating_a_patch_to_submit_(Patch_Tracker)&amp;diff=9608</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=9608"/>
		<updated>2022-09-05T11:47:34Z</updated>

		<summary type="html">&lt;p&gt;Mgimenez: /* Introduction */ Make links to forum absolute&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Developer Documentation]]&lt;br /&gt;
== Introduction ==&lt;br /&gt;
Do 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 [https://forums.codeblocks.org/index.php/board,20.0.html nightly builds] of Code::Blocks. 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 [https://forums.codeblocks.org forum] for advice.&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 ([https://forums.codeblocks.org/index.php/board,7.0.html&amp;lt;nowiki&amp;gt;]) for support.&amp;lt;/nowiki&amp;gt;&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;
''Note: if you use Powershell on Windows, the generated file can not be used directly because it will be in UTF-16 format. Use Notepad++ to reencode in ANSI or generate it again using this command:''&lt;br /&gt;
: &amp;lt;tt&amp;gt;svn diff | out-file -encoding ascii my.patch&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you are using git or git-svn and sending to someone with an svn setup, the output can be more easily handled with either [https://forums.codeblocks.org/index.php/topic,19391.msg132530.html#msg132530&amp;lt;nowiki&amp;gt;] or one of&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
: &amp;lt;tt&amp;gt;git diff --no-prefix &amp;gt; my.patch&amp;lt;/tt&amp;gt;&lt;br /&gt;
: &amp;lt;tt&amp;gt;svn patch my.patch --strip 1&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Patch application and testing ===&lt;br /&gt;
Most Subversion front-end UI tools (like TortoiseSVN or SmartSVN) have an option to apply this patch files directly.&lt;br /&gt;
&lt;br /&gt;
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;
...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;
If you only need the command line without SVN tooling (why would you do so?), then 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;
'''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;Tickets&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>Mgimenez</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=Creating_a_patch_to_submit_(Patch_Tracker)&amp;diff=9607</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=9607"/>
		<updated>2022-09-04T19:55:48Z</updated>

		<summary type="html">&lt;p&gt;Mgimenez: /* Patch creation */ Explain why some MSW-generated patch files are ignored silently when patching&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 ([https://forums.codeblocks.org/index.php/board,7.0.html&amp;lt;nowiki&amp;gt;]) for support.&amp;lt;/nowiki&amp;gt;&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;
''Note: if you use Powershell on Windows, the generated file can not be used directly because it will be in UTF-16 format. Use Notepad++ to reencode in ANSI or generate it again using this command:''&lt;br /&gt;
: &amp;lt;tt&amp;gt;svn diff | out-file -encoding ascii my.patch&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you are using git or git-svn and sending to someone with an svn setup, the output can be more easily handled with either [https://forums.codeblocks.org/index.php/topic,19391.msg132530.html#msg132530&amp;lt;nowiki&amp;gt;] or one of&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
: &amp;lt;tt&amp;gt;git diff --no-prefix &amp;gt; my.patch&amp;lt;/tt&amp;gt;&lt;br /&gt;
: &amp;lt;tt&amp;gt;svn patch my.patch --strip 1&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Patch application and testing ===&lt;br /&gt;
Most Subversion front-end UI tools (like TortoiseSVN or SmartSVN) have an option to apply this patch files directly.&lt;br /&gt;
&lt;br /&gt;
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;
...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;
If you only need the command line without SVN tooling (why would you do so?), then 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;
'''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;Tickets&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>Mgimenez</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=Developer_documentation&amp;diff=9592</id>
		<title>Developer documentation</title>
		<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php?title=Developer_documentation&amp;diff=9592"/>
		<updated>2022-04-11T12:23:27Z</updated>

		<summary type="html">&lt;p&gt;Mgimenez: /* Developing C::B with Git */ Make links to the forum absolute&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;
: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>Mgimenez</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=Developer_documentation&amp;diff=9591</id>
		<title>Developer documentation</title>
		<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php?title=Developer_documentation&amp;diff=9591"/>
		<updated>2022-04-11T12:22:18Z</updated>

		<summary type="html">&lt;p&gt;Mgimenez: /* Debugging C::B */ Fix link to the FAQ&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;
: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 [/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 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>Mgimenez</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=Common_problems_and_solutions&amp;diff=9590</id>
		<title>Common problems and solutions</title>
		<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php?title=Common_problems_and_solutions&amp;diff=9590"/>
		<updated>2022-04-11T12:17:27Z</updated>

		<summary type="html">&lt;p&gt;Mgimenez: /* Solution */ Remark that codeblocks.RPT may be in the config directory&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Deletion Requests]]&lt;br /&gt;
[[Category:User Documentation]]&lt;br /&gt;
''All content has been moved to the [[FAQ]].''&lt;br /&gt;
&lt;br /&gt;
This page contains many of the common problems Code::Blocks users may run into and their solutions.&lt;br /&gt;
&lt;br /&gt;
==I cannot use the debugger==&lt;br /&gt;
&lt;br /&gt;
===Problem===&lt;br /&gt;
All the options in the debug menu are grayed out.&lt;br /&gt;
&lt;br /&gt;
===Solution===&lt;br /&gt;
Code::Blocks can only use integrated debugging on an active project.  Start a [[Creating a new project|new project]] and [[Creating a new project#Adding a pre-existing file|add the file]] to it. Also see [[debugging with Code::Blocks]].&lt;br /&gt;
&lt;br /&gt;
''Note: Code:Blocks only supports the GNU GDB and MSVC CDB debuggers.''&lt;br /&gt;
&lt;br /&gt;
==Multi-targets library and executable ignore interdependence==&lt;br /&gt;
&lt;br /&gt;
===Problem===&lt;br /&gt;
My project contains a two targets: static/dynamic library and an executable that links to it.  Code::Blocks does not&lt;br /&gt;
* build the library first.&lt;br /&gt;
* force relink if the library is changed.&lt;br /&gt;
&lt;br /&gt;
===Solution===&lt;br /&gt;
Open ''Project-&amp;gt;Properties...-&amp;gt;Build targets (tab)'' and select the executable.  Click ''Dependencies...'' and add the name of the library (including its relative path) to ''External dependency files''. Also see [[The build process of Code::Blocks#Using project dependencies|inter-project dependencies]].&lt;br /&gt;
&lt;br /&gt;
''Example:'' &amp;lt;tt&amp;gt;output\myLibrary\libdostuff.a&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==I want to report compile problem ''abc''==&lt;br /&gt;
&lt;br /&gt;
===Problem===&lt;br /&gt;
Every time I build my project ''xyz'', compile problem ''abc'' happens, and I want to report it on the forums as a Code::Blocks bug.&lt;br /&gt;
&lt;br /&gt;
===Solution===&lt;br /&gt;
Try building the project from command line. If the same error comes up, it is a problem with either the source file, the compiler, or the compiler setup. If this is the case, you are unlikely to receive support for it on the Code::Blocks forums, however, [[FAQ#Q: How do I troubleshoot an compiler problem?|How do I troubleshoot an compiler problem?]] may help.&lt;br /&gt;
&lt;br /&gt;
If it works fine building from command line, it is either a problem with your project, Code::Blocks' setup, or possibly an actual bug. When posting this problem, include the name of your compiler, operating system, Code::Blocks version, compiler log (go to ''Settings-&amp;gt;Compiler and debugger...-&amp;gt;Build options (tab)'' and check ''Save build log'' and ''Always output the full command line''), and, if it caused Code::Blocks to crash, the &amp;lt;tt&amp;gt;codeblocks.RPT&amp;lt;/tt&amp;gt; file (located in the Code::Blocks installation directory if it is writable or in the config directory if it is not).&lt;br /&gt;
&lt;br /&gt;
''Template: Paste the following template into your post, editing the relevant sections.''&lt;br /&gt;
 OS = ''MyOperatingSystem''&lt;br /&gt;
 CB Version = ''Code::BlocksVersionNumber''&lt;br /&gt;
 Compiler = ''CompilerName CompilerVersionNumber''&lt;br /&gt;
 &lt;br /&gt;
 ''Description of relevant events.''&lt;br /&gt;
 &lt;br /&gt;
 Build log:&lt;br /&gt;
 [code]&lt;br /&gt;
 ''Paste build log here''&lt;br /&gt;
 [/code]&lt;br /&gt;
 &lt;br /&gt;
 Crash report:&lt;br /&gt;
 [code]&lt;br /&gt;
 ''If Code::Blocks crashed, paste the contents of'' codeblocks.RPT ''here.''&lt;br /&gt;
 [/code]&lt;br /&gt;
&lt;br /&gt;
==I cannot build my project==&lt;br /&gt;
&lt;br /&gt;
===Problem===&lt;br /&gt;
All of the ''Build'' related options are grayed out.&lt;br /&gt;
&lt;br /&gt;
===Solution===&lt;br /&gt;
Code::Blocks checks the file extension for individual files before allowing them to be compiled. Save your file with the correct file extension (&amp;lt;tt&amp;gt;*.c&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;*.cpp&amp;lt;/tt&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
More often it is useful to [[Creating a new project|create a project]] so that Code::Blocks can manage the entire build&lt;br /&gt;
&lt;br /&gt;
==Code::Blocks option ''xyz'' is missing==&lt;br /&gt;
&lt;br /&gt;
===Problem===&lt;br /&gt;
The useful feature ''xyz'' I was told to use is nowhere to be found in Code::Blocks.&lt;br /&gt;
&lt;br /&gt;
===Solution===&lt;br /&gt;
Many features of Code::Blocks are implemented by means of plugins. First open ''Plugins-&amp;gt;Manage plugins...'' and ensure that the one you are trying to use is not disabled. If plugin ''xyz'' is not in the list, it is possible that you removed/disabled it on installation. To acquire the plugin, [[Installing Code::Blocks|reinstall Code::Blocks]] (double checking that the desired plugin is included).&lt;br /&gt;
&lt;br /&gt;
==Syntax highlighting is broken==&lt;br /&gt;
&lt;br /&gt;
===Problem===&lt;br /&gt;
I am typing valid code, but it is all appearing as black text.&lt;br /&gt;
&lt;br /&gt;
===Solution===&lt;br /&gt;
Code::Blocks cannot know how to highlight your code unless it knows what lexer to use. This is normally automatically determined by the file extension, so it is important to save the file and name it correctly (&amp;lt;tt&amp;gt;*.c&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;*.cpp&amp;lt;/tt&amp;gt; for C and C++ code). It is also possible to activate syntax highlighting on a temporary basis. Open ''Edit-&amp;gt;Highlight mode'' and select the language the current file is using.&lt;br /&gt;
&lt;br /&gt;
==Untraceable reoccurring error==&lt;br /&gt;
&lt;br /&gt;
===Problem===&lt;br /&gt;
Project ''abc'' works everywhere except one computer where it gets stuck on step ''xyz''.&lt;br /&gt;
&lt;br /&gt;
===Solution===&lt;br /&gt;
Some parts of Code::Blocks or the back-end compiler may not support non ASCII characters (such as é) or possibly spaces. Try moving the project on the affected computer to a directory that contains neither of these in its path.&lt;br /&gt;
&lt;br /&gt;
==Help, no one can solve my problem==&lt;br /&gt;
&lt;br /&gt;
===Problem===&lt;br /&gt;
I posted on the forums that Code::Blocks was not working, but no one could help me.&lt;br /&gt;
&lt;br /&gt;
===Solution===&lt;br /&gt;
There is a distinct lack of crystal balls and divining mirrors here, so you may want to post some information. Using this [[#I want to report compile problem abc|template]] in your problem description would be a great help.&lt;br /&gt;
&lt;br /&gt;
==Multiple ''undefined reference'' errors==&lt;br /&gt;
&lt;br /&gt;
===Problem===&lt;br /&gt;
Every time I build, Code::Blocks reports multiple &amp;lt;tt&amp;gt;undefined reference&amp;lt;/tt&amp;gt; errors.&lt;br /&gt;
&lt;br /&gt;
''Example:''&lt;br /&gt;
 undefined reference to `WSACleanup@8&lt;br /&gt;
 undefined reference to `WSACleanup@0&lt;br /&gt;
&lt;br /&gt;
===Solution===&lt;br /&gt;
Most of the time it is because the required library is not linked with your project. Go to ''Project-&amp;gt;Build options...-&amp;gt;Linker settings (tab)'' and add the required library or libraries.&lt;br /&gt;
&lt;br /&gt;
If the error includes a line number, it is likely that this is a problem with your code. Track down down your function declarations and implementations. Ensure they all match up, are spelled correctly, and have the correct scope resolution.&lt;/div&gt;</summary>
		<author><name>Mgimenez</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=FAQ-Compiling_(general)&amp;diff=9589</id>
		<title>FAQ-Compiling (general)</title>
		<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php?title=FAQ-Compiling_(general)&amp;diff=9589"/>
		<updated>2022-04-11T12:15:18Z</updated>

		<summary type="html">&lt;p&gt;Mgimenez: /* Q: How do I report a compilation problem on the forums? */ Explain codeblock.RPT will be in the config folder if C::B's one is not writable&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Code::Blocks Documentation]]&lt;br /&gt;
__TOC__&lt;br /&gt;
Return to '''[[FAQ]]'''.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==== Q: What compiler can I use with Code::Blocks? ====&lt;br /&gt;
&lt;br /&gt;
'''A:''' Code::Blocks philosophy is to be able to use any compiler on earth! Well, almost.&lt;br /&gt;
&lt;br /&gt;
As a matter of fact it largely depends on the used compiler plugin. Some provided with the default Code::Blocks installation are GNU GCC (MinGW/Cygwin), MS Visual C++ Free Toolkit 2003, Borland's C++ Compiler 5.5, DigitalMars Free Compiler., OpenWatcom, Small Device C Compiler (SDCC) and others.&lt;br /&gt;
&lt;br /&gt;
==== Q: My project should be compiled with a custom makefile. Is it possible with Code::Blocks? ====&lt;br /&gt;
&lt;br /&gt;
'''A:''' Yes, you can. You need to change one settings with Code::Blocks 8.02:&lt;br /&gt;
&lt;br /&gt;
In your project's Properties, check &amp;quot;This is a custom makefile&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
And that's it! :)&lt;br /&gt;
&lt;br /&gt;
==== Q: I have downloaded MS VC++ Toolkit 2003 for a compiler. How do I tell Code::Blocks that it is my compiler? ====&lt;br /&gt;
&lt;br /&gt;
'''A:''' Click on &amp;quot;Project/Build options&amp;quot; and select the compiler you want for your project/target.&lt;br /&gt;
&lt;br /&gt;
==== Q: Microsoft calls MSVCRT.DLL a &amp;quot;Known DLL.&amp;quot; How do I know if I can/should use it? ====&lt;br /&gt;
&lt;br /&gt;
Microsoft does not clearly describe what [http://msdn2.microsoft.com/en-us/library/abx4dbyh.aspx 'Known DLL'] means. A [http://www.zlib.net/DLL_FAQ.txt zLib FAQ entry] makes it much more clear. The short answer is that MSVCRT.DLL is a protected system component and to preserve system integrity it cannot be updated by any end user product installers but may be updated from time to time by system updates. If it works use it. If it doesn't you'll need use a non protected library such as MSVCR70 or MSVCR80 which not only can be updated but private versions can be installed. A small and simple C program is likely to work just fine with MSVCRT.DLL. A large and complex C++ program is more likely to need the additional functionality of MSVCR.&lt;br /&gt;
&lt;br /&gt;
The MSVCRT.LIB that ships with 32 bit compiler Visual C++ Toolkit 2003 dynamically links to MSVCR71.DLL which is not present in a freshly installed Windows XP system. MSVCR only appears after some software package that needs it such as [http://www.adobe.com/ Adobe Acrobat Reader] is installed. This means that programs that depend on MSVCR must redistribute it or risk not working on a substantial percentage of systems for reasons not obvious to either the affected end users or the program supplier. &lt;br /&gt;
&lt;br /&gt;
For projects that can safely use MSVCRT and where it is impractical to redistribute MSVCR, a Win32 MSVCRT.LIB that links to MSVCRT.DLL is available in any [http://www.microsoft.com/whdc/devtools/ddk/default.mspx Device Driver Kit]. It is best to preserve the MSVCRT.LIB provided by the compiler and alter the name of the MSVCRT.LIB extracted from a DDK. List your newly named MSVCRTxx in the lib. If you use MSVCRT.LIB from the Windows 2003 DDK you may encounter the link '''error LNK2001: unresolved external symbol ___security_cookie'''. This can be solved by switching to the MSVCRT.LIB in the Windows XP DDK or by linking '''bufferoverflowU.lib''' found in the Windows SDK. A Win64 MSVCRT.LIB that links to MSVCRT.DLL is available in the Windows SDK or Platform [http://www.microsoft.com/downloads/details.aspx?FamilyId=E15438AC-60BE-41BD-AA14-7F1E0F19CA0D&amp;amp;displaylang=en PSDK]. &lt;br /&gt;
&lt;br /&gt;
To prevent problems it is recommended to include both /MD and /NODEFAULTLIB:MSVCRT switches so that problems come up at link time instead of random crashes at run time. Be sure to load your programs into [http://www.dependencywalker.com/ Dependancy Walker] to ensure that functions aren't being linked into both MSVCRxx.DLL and MSVCRT.DLL. It is essential that malloc, calloc, realloc, free, and related memory allocation functions all import from the same DLL. &lt;br /&gt;
&lt;br /&gt;
Source: [http://wiki.tcl.tk/11431 TCL Wiki]&lt;br /&gt;
&lt;br /&gt;
==== Q: How can I use a DLL without DEF or LIB files? ====&lt;br /&gt;
&lt;br /&gt;
'''A:''' I tried to find a solution, and the following script solved the problem for me. I used a cygwin environment for ''tclsh'' and ''sed'', but the MinGW tools for ''objdump'' and ''dlltool''. See here [http://wiki.tcl.tk/2435 tclsh script to extract import .lib from (any?) DLL (MinGW)]&lt;br /&gt;
&lt;br /&gt;
TODO: Someone might add some informations about problems&lt;br /&gt;
&lt;br /&gt;
Request: Is MinGW or Code::Blocks able to support automatic generation of import libraries ?&lt;br /&gt;
&lt;br /&gt;
See also: http://www.mingw.org/wiki/CreateImportLibraries&lt;br /&gt;
&lt;br /&gt;
See also: http://wyw.dcweb.cn/stdcall.htm&lt;br /&gt;
&lt;br /&gt;
==== Q: Where are the libraries for the OpenGL, Ogre3D, SDL, QT, wxWidgets etc. projects? ====&lt;br /&gt;
&lt;br /&gt;
'''A:''' They're not bundled. The templates were provided for your convenience, but you need to download the libraries on your own.&lt;br /&gt;
In common terms, &amp;quot;batteries not included&amp;quot; :)&lt;br /&gt;
&lt;br /&gt;
==== Q: Is it possible to use Visual C++ 6.0 with Code::Blocks? ====&lt;br /&gt;
&lt;br /&gt;
'''A:''' Yes. See [[Integrating Microsoft Visual C 6 with Code::Blocks IDE]] for a detailed description on using VC++ 6.0 with Code::Blocks.&lt;br /&gt;
&lt;br /&gt;
==== Q: I would like to compile a project using some non-standard libraries. How can I indicate to CodeBlocks that these libraries and include files exist? ====&lt;br /&gt;
&lt;br /&gt;
'''A:''' You can specify them for your global environment or just for your project.&lt;br /&gt;
&lt;br /&gt;
For global environment :&amp;lt;br /&amp;gt;&lt;br /&gt;
- Menu &amp;lt;i&amp;gt;Settings/Compiler and debugger&amp;lt;/i&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
- In the &amp;lt;i&amp;gt;Global compiler settings&amp;lt;/i&amp;gt;, select the directories tab&amp;lt;br /&amp;gt;&lt;br /&gt;
- Add the required paths for compiler and linker.&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
For your project :&amp;lt;br /&amp;gt;&lt;br /&gt;
- Right click on the project then select &amp;lt;i&amp;gt;Build options&amp;lt;/i&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
- Select the directories tab&amp;lt;br /&amp;gt;&lt;br /&gt;
- Add the required paths for compiler and linker.&amp;lt;br /&amp;gt;&lt;br /&gt;
- Add your specific libraries in the linker tab.&amp;lt;br /&amp;gt;&lt;br /&gt;
- Pay attention to project settings and target settings.&lt;br /&gt;
==== Q: How do I use both Debug and Release builds of wx libraries? ====&lt;br /&gt;
'''A:''' I would use the default method of doing it and the default folder naming.&lt;br /&gt;
&lt;br /&gt;
Using these C::B custom varibles&lt;br /&gt;
 WX_SUFFIX=&amp;quot;&amp;quot;  // ANSI Release&lt;br /&gt;
 WX_SUFFIX=&amp;quot;d&amp;quot;  // ANSI Debug&lt;br /&gt;
 WX_SUFFIX=&amp;quot;u&amp;quot;  // Unicode Release&lt;br /&gt;
 WX_SUFFIX=&amp;quot;ud&amp;quot;  // Unicode debug&lt;br /&gt;
&lt;br /&gt;
I use WX_CFG when I am using a special configuration&lt;br /&gt;
WX_CFG=&amp;quot;rc3&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Remember, the CodeBlocks globel variable WX needs to point to the wxWidgets folder.&lt;br /&gt;
&lt;br /&gt;
Example minGW build command for &amp;quot;Unicode debug&amp;quot; 2.8.0 RC3&lt;br /&gt;
&lt;br /&gt;
 mingw32-make -f makefile.gcc VENDOR=rc3 CFG=rc3 USE_XRC=1 SHARED=1 MONOLITHIC=1 BUILD=debug   UNICODE=1&lt;br /&gt;
&lt;br /&gt;
&amp;quot;VENDOR=&amp;quot; just puts rc3 in the DLL name; &amp;quot;CFG=&amp;quot; sets which folder the DLL is placed in. In this case in lib\gcc_dllrc3&lt;br /&gt;
&lt;br /&gt;
Before using CFG in the mingw32-make build you need to  do one prior wxWidget build without using it; else the build errors out. (See note below.)&lt;br /&gt;
&lt;br /&gt;
&amp;quot;__WXDEBUG__&amp;quot; must be defined (in the codeblocks project setting) if you wish to link against the  debug version of wxWidgets DLL. Else you will get a runtime error, when you try to run your project output.&lt;br /&gt;
&lt;br /&gt;
Contributed by Tim S&lt;br /&gt;
&lt;br /&gt;
Note:&lt;br /&gt;
*I have never gotten the following command to work&lt;br /&gt;
  mingw32-make -f makefile.gcc VENDOR=rc3 CFG=rc3 USE_XRC=1 SHARED=1 MONOLITHIC=1 BUILD=debug   UNICODE=1&lt;br /&gt;
&lt;br /&gt;
*unless I have first run this command on the same wxWidgets folders&lt;br /&gt;
  mingw32-make -f makefile.gcc USE_XRC=1 SHARED=1 MONOLITHIC=1 BUILD=debug   UNICODE=1&lt;br /&gt;
&lt;br /&gt;
*I am guessing that the build without the CFG creates a file or directory needed by the build with the CFG.&lt;br /&gt;
&lt;br /&gt;
==== Q: How do I add version information to windows executables and dll's? ====&lt;br /&gt;
'''A:''' You need to create a resource file with the extension .rc and write the version info there. Then add that file to the Code::Blocks project you are working on.&lt;br /&gt;
&lt;br /&gt;
Sample content of a resource file that you can use and modify for your needs:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;cpp&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&lt;br /&gt;
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US&lt;br /&gt;
&lt;br /&gt;
VS_VERSION_INFO    VERSIONINFO&lt;br /&gt;
  FILEVERSION      1,0,0,1&lt;br /&gt;
  PRODUCTVERSION   1,0,0,1&lt;br /&gt;
  FILEFLAGSMASK    0x3fL // VS_FFI_FILEFLAGSMASK&lt;br /&gt;
#ifdef _DEBUG&lt;br /&gt;
  FILEFLAGS        0x1L  // VS_FF_DEBUG|VS_FF_PRIVATEBUILD|VS_FF_PRERELEASE&lt;br /&gt;
#else&lt;br /&gt;
  FILEFLAGS        0x0L  // final version&lt;br /&gt;
#endif&lt;br /&gt;
  FILEOS           VOS_NT_WINDOWS32&lt;br /&gt;
  FILETYPE         VFT_APP&lt;br /&gt;
  FILESUBTYPE      VFT2_UNKNOWN // not used&lt;br /&gt;
{&lt;br /&gt;
  BLOCK &amp;quot;StringFileInfo&amp;quot;&lt;br /&gt;
  {&lt;br /&gt;
    BLOCK &amp;quot;040904E4&amp;quot; // Lang=US English, CharSet=Windows Multilingual&lt;br /&gt;
    {&lt;br /&gt;
      VALUE &amp;quot;Build&amp;quot;,            &amp;quot;August 2007\0&amp;quot;&lt;br /&gt;
      VALUE &amp;quot;Comments&amp;quot;,         &amp;quot;Free for personal use only.\0&amp;quot;&lt;br /&gt;
      VALUE &amp;quot;CompanyName&amp;quot;,      &amp;quot;Fake Company\0&amp;quot;&lt;br /&gt;
      VALUE &amp;quot;Developer&amp;quot;,        &amp;quot;The Developer\0&amp;quot;&lt;br /&gt;
      VALUE &amp;quot;FileDescription&amp;quot;,  &amp;quot;Application implementing something\0&amp;quot;&lt;br /&gt;
      VALUE &amp;quot;FileVersion&amp;quot;,      &amp;quot;1.0.000\0&amp;quot;&lt;br /&gt;
      VALUE &amp;quot;InternalName&amp;quot;,     &amp;quot;AppInternalName\0&amp;quot;&lt;br /&gt;
      VALUE &amp;quot;LegalCopyright&amp;quot;,   &amp;quot;Copyright (C) 2007 Fake Company\0&amp;quot;&lt;br /&gt;
      VALUE &amp;quot;LegalTrademarks&amp;quot;,  &amp;quot;All rights reserved.\0&amp;quot;&lt;br /&gt;
      VALUE &amp;quot;OriginalFilename&amp;quot;, &amp;quot;TheEXE.exe\0&amp;quot;&lt;br /&gt;
      VALUE &amp;quot;PrivateBuild&amp;quot;,     &amp;quot;\0&amp;quot;&lt;br /&gt;
      VALUE &amp;quot;ProductName&amp;quot;,      &amp;quot;The EXE\0&amp;quot;&lt;br /&gt;
      VALUE &amp;quot;ProductVersion&amp;quot;,   &amp;quot;1.0.000\0&amp;quot;&lt;br /&gt;
      VALUE &amp;quot;SpecialBuild&amp;quot;,     &amp;quot;\0&amp;quot;&lt;br /&gt;
      VALUE &amp;quot;Support&amp;quot;,          &amp;quot;TheEXE at fake-domain.com\0&amp;quot;&lt;br /&gt;
      VALUE &amp;quot;Users&amp;quot;,            &amp;quot;Unlimited.\0&amp;quot;&lt;br /&gt;
    } // BLOCK &amp;quot;040904E4&amp;quot;&lt;br /&gt;
  } // BLOCK &amp;quot;StringFileInfo&amp;quot;&lt;br /&gt;
  BLOCK &amp;quot;VarFileInfo&amp;quot;&lt;br /&gt;
  {&lt;br /&gt;
    VALUE &amp;quot;Translation&amp;quot;, 0x409, 1252 // 1252 = 0x04E4&lt;br /&gt;
  } // BLOCK &amp;quot;VarFileInfo&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Also you can use the the [[AutoVersioning plugin]] to assist you on the generation of version information. For documentation of the syntax and values used on windows resource files, you can visit the following websites:&lt;br /&gt;
*http://msdn2.microsoft.com/en-us/library/aa380599.aspx&lt;br /&gt;
*http://www.cygwin.com/cygwin-ug-net/windres.html&lt;br /&gt;
&lt;br /&gt;
==== Q: Code::Blocks does not force relink if the library is changed? ====&lt;br /&gt;
&lt;br /&gt;
'''A:''' Open ''Project-&amp;gt;Properties...-&amp;gt;Build targets (tab)'' and select the executable.  Click ''Dependencies...'' and add the name of the library (including its relative path) to ''External dependency files''. Also see [[The build process of Code::Blocks#Using project dependencies|inter-project dependencies]].&lt;br /&gt;
&lt;br /&gt;
''Example:'' &amp;lt;tt&amp;gt;output\myLibrary\libdostuff.a&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Q: How do I report a compilation problem on the forums? ====&lt;br /&gt;
&lt;br /&gt;
'''A:''' Try building the project from command line. If the same error comes up, it is a problem with either the source file, the compiler, or the compiler setup. If this is the case, you are unlikely to receive support for it on the Code::Blocks forums, however, [[FAQ-Compiling (errors)#Q: How do I troubleshoot a compiler problem?|How do I troubleshoot a compiler problem?]] may help.&lt;br /&gt;
&lt;br /&gt;
If it works fine building from command line, it is either a problem with your project, Code::Blocks' setup, or possibly an actual bug. When posting this problem, include the name of your compiler, operating system, Code::Blocks version, compiler log (go to ''Settings-&amp;gt;Compiler and debugger...-&amp;gt;Build options (tab)'' and check ''Save build log'' and ''Always output the full command line''), and, if it caused Code::Blocks to crash, the &amp;lt;tt&amp;gt;codeblocks.RPT&amp;lt;/tt&amp;gt; file. This file is located in the Code::Blocks installation directory if it is writable, and in the config directory if it is not. On MSW you can open the config directory pressing Windows+R and writing &amp;quot;%appdata%\CodeBlocks&amp;quot; in the edit box.&lt;br /&gt;
&lt;br /&gt;
[[File:forum_code_tag.png|frame|Button for code tags in the new post editor of the forum]]&lt;br /&gt;
&lt;br /&gt;
'''Important''' If you post code or log message to the forum, please use code tags: Click the &amp;quot;#&amp;quot; button in the new post editor (see image) and post your code/log between the two &amp;quot;[code][/code]&amp;quot; words. This helps to distinguish between your text and the log and it shortens the posts.&lt;br /&gt;
&lt;br /&gt;
''Template: Paste the following template into your post, editing the relevant sections.''&lt;br /&gt;
 I am running Code::Blocks version &amp;lt;span style=&amp;quot;color:DarkRed&amp;quot;&amp;gt;''Code::BlocksVersionNumber''&amp;lt;/span&amp;gt; on &amp;lt;span style=&amp;quot;color:DarkRed&amp;quot;&amp;gt;''MyOperatingSystem''&amp;lt;/span&amp;gt;&lt;br /&gt;
 (version &amp;lt;span style=&amp;quot;color:DarkRed&amp;quot;&amp;gt;''OperatingSystemVersionNumber''&amp;lt;/span&amp;gt;). The compiler I use is &amp;lt;span style=&amp;quot;color:DarkRed&amp;quot;&amp;gt;''CompilerName''&amp;lt;/span&amp;gt;&lt;br /&gt;
 version &amp;lt;span style=&amp;quot;color:DarkRed&amp;quot;&amp;gt;''CompilerVersionNumber''&amp;lt;/span&amp;gt;.&lt;br /&gt;
 &lt;br /&gt;
 When I ...&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:DarkRed&amp;quot;&amp;gt;''Steps to reproduce problem.''&amp;lt;/span&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:DarkRed&amp;quot;&amp;gt;''Description of problem.''&amp;lt;/span&amp;gt;&lt;br /&gt;
 ... happens.&lt;br /&gt;
 &lt;br /&gt;
 Build log:&lt;br /&gt;
 [code]&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:DarkRed&amp;quot;&amp;gt;''Paste &amp;lt;span style=&amp;quot;color:FireBrick&amp;quot;&amp;gt;'''full'''&amp;lt;/span&amp;gt; build log here. (It is found in the 'Build log' tab). Please make always a 'rebuild' (Menu: Build-&amp;gt;Rebuild) or a 'clean' and 'build' before you copy the full build log. ''&amp;lt;/span&amp;gt;&lt;br /&gt;
 [/code]&lt;br /&gt;
 &lt;br /&gt;
 Crash report:&lt;br /&gt;
 [code]&lt;br /&gt;
 ''&amp;lt;span style=&amp;quot;color:DarkRed&amp;quot;&amp;gt;Paste the contents of&amp;lt;/span&amp;gt;'' &amp;lt;span style=&amp;quot;color:MidnightBlue&amp;quot;&amp;gt;codeblocks.RPT&amp;lt;/span&amp;gt; ''&amp;lt;span style=&amp;quot;color:DarkRed&amp;quot;&amp;gt;here&amp;lt;/span&amp;gt; (if Code::Blocks crashed).''&lt;br /&gt;
 [/code]&lt;br /&gt;
 &lt;br /&gt;
     ''(Although the following is not necessary, showing that you''&lt;br /&gt;
      ''have tried increases the probability of a response.)''&lt;br /&gt;
 I have already tried ...&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:DarkRed&amp;quot;&amp;gt;''List of attempted solutions.''&amp;lt;/span&amp;gt;&lt;br /&gt;
 ... but none of them worked.&lt;br /&gt;
&lt;br /&gt;
==== Q: All of the Build related options are grayed out? ====&lt;br /&gt;
&lt;br /&gt;
'''A:''' Code::Blocks checks the file extension for individual files before allowing them to be compiled. Save your file with the correct file extension (&amp;lt;tt&amp;gt;*.c&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;*.cpp&amp;lt;/tt&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
More often it is useful to [[Creating a new project|create a project]] so that Code::Blocks can manage the entire build.&lt;br /&gt;
&lt;br /&gt;
==== Q: I get a blank (black) terminal window on windows ====&lt;br /&gt;
&lt;br /&gt;
'''A:''' Your Anti Virus is blocking your executable. Modern Anti Virus (AV) programs use heuristics to determine if a program is a virus or not. Often this gives false positives and your AV will block your self created applications. [[Solution:]] Deactivate your AV, or for the paranoid: add your project folder, gcc folder and probably also the c::b folder to the AV exception.&lt;br /&gt;
&lt;br /&gt;
==== Q: My program runs in codeblocks but if i start it from the outside it only flashes and closes immediately ====&lt;br /&gt;
&lt;br /&gt;
'''A:''' Your program does exactly what you tell him. You have written that the program should return as soon as it is finished with his code. Codeblocks adds a convenient layer and keeps the console open until you press a key. You can add this to your program with the following lines of code in c++:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;cpp&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&lt;br /&gt;
//clear buffer, wait for input to close program&lt;br /&gt;
std::cin.clear(); std::cin.ignore(INT_MAX, '\n');&lt;br /&gt;
std::cin.get();&lt;br /&gt;
return 0;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
for c it is not that easy. You can use&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;cpp&amp;quot; enclose=&amp;quot;div&amp;quot;&amp;gt;&lt;br /&gt;
getch()&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
but the user has to press ENTER to continue.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Return to '''[[FAQ]]'''.&lt;/div&gt;</summary>
		<author><name>Mgimenez</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=Developer_documentation&amp;diff=9588</id>
		<title>Developer documentation</title>
		<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php?title=Developer_documentation&amp;diff=9588"/>
		<updated>2022-04-11T12:06:45Z</updated>

		<summary type="html">&lt;p&gt;Mgimenez: /* Debugging C::B */ Close bracket&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;
: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 [/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 crashes, it will generate a call-stack file &amp;quot;codeblocks.rpt&amp;quot;, at the crash point (see [https://wiki.codeblocks.org/index.php/index.php/FAQ-Compiling_(general)#Q:_How_do_I_report_a_compilation_problem_on_the_forums.3F 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 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>Mgimenez</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=Developer_documentation&amp;diff=9587</id>
		<title>Developer documentation</title>
		<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php?title=Developer_documentation&amp;diff=9587"/>
		<updated>2022-04-11T12:06:16Z</updated>

		<summary type="html">&lt;p&gt;Mgimenez: /* Debugging C::B */ ABsolute address&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;
: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 [/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 crashes, it will generate a call-stack file &amp;quot;codeblocks.rpt&amp;quot;, at the crash point (see [https://wiki.codeblocks.org/index.php/index.php/FAQ-Compiling_(general)#Q:_How_do_I_report_a_compilation_problem_on_the_forums.3F 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 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>Mgimenez</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=Developer_documentation&amp;diff=9586</id>
		<title>Developer documentation</title>
		<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php?title=Developer_documentation&amp;diff=9586"/>
		<updated>2022-04-11T12:05:38Z</updated>

		<summary type="html">&lt;p&gt;Mgimenez: /* Debugging C::B */ Add link to the FAQ, correct relative links, fix wording.&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;
: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 [/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 crashes, it will generate a call-stack file &amp;quot;codeblocks.rpt&amp;quot;, at the crash point (see [index.php/FAQ-Compiling_(general)#Q:_How_do_I_report_a_compilation_problem_on_the_forums.3F 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 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>Mgimenez</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=Adding_support_for_non_C/C%2B%2B_files_to_the_build_system&amp;diff=9585</id>
		<title>Adding support for non C/C++ files to the build system</title>
		<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php?title=Adding_support_for_non_C/C%2B%2B_files_to_the_build_system&amp;diff=9585"/>
		<updated>2022-04-06T07:27:09Z</updated>

		<summary type="html">&lt;p&gt;Mgimenez: /* ...and how things have evolved */ Specify the path to the dialog&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category: User Documentation]]&lt;br /&gt;
== Intro ==&lt;br /&gt;
&lt;br /&gt;
As you may already know, Code::Blocks is designed mainly for C/C++ development. This means that when it &amp;quot;sees&amp;quot; C/C++ files in your project it knows how to compile and link them to generate the resulting binary output.&lt;br /&gt;
What about other types of files though? You may want to compile java or python files but, unfortunately, Code::Blocks knows nothing about them...&lt;br /&gt;
&lt;br /&gt;
And there's this other case: in real world projects, it's not unusual for some of the files belonging to a project to be auto-generated. This is done through the use of another program/script that possibly takes an input file and generates one (or more) files based on that input. Code::Blocks, unfortunately, can't handle them either...&lt;br /&gt;
&lt;br /&gt;
Or can it?&lt;br /&gt;
&lt;br /&gt;
The answer is: ....... (drum-rolling) ........ (ta-da) ......... '''It sure can!'''.&lt;br /&gt;
&lt;br /&gt;
Code::Blocks has been recently updated so it can be configured to recognize non C/C++ files and act accordingly on them during the build process. This article will describe those changes and provide a simple but real world example of usage.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== How things used to work... ==&lt;br /&gt;
&lt;br /&gt;
In case you never had a look in advanced compiler options, you can find them by clicking  ''&amp;lt;tt&amp;gt;Settings-&amp;gt;Compiler-&amp;gt;Other settings&amp;lt;/tt&amp;gt;''. Look for &amp;quot;Advanced options&amp;quot; in lower right, it's easy to miss.&lt;br /&gt;
&lt;br /&gt;
In that dialog you will find the command line macros used to build files. For example, each file belonging to the project, that had its compile flag on, would be compiled with the macro named &amp;quot;Compile single file to object file&amp;quot; (''&amp;lt;tt&amp;gt;&amp;quot;$compiler $options $includes -c $file -o $object&amp;quot;&amp;lt;/tt&amp;gt;'', for the curious).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
While this provide enough room for customizing the build system's configuration, it clearly didn't allow for some more generic customization.&lt;br /&gt;
&lt;br /&gt;
If you wanted to include in your project and compile a java file, you would have to set a custom build command for that particular file, ''only'' for that file (right-click file in tree and choose properties). This is not only cumbersome (imagine having to do this for 10 or 100 java files) but impractical too.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== ...and how things have evolved ==&lt;br /&gt;
&lt;br /&gt;
The new functionality described in this article aims to remove the above problems and allow for more customization of the build system. So, what is different now?. Goto to Settings -&amp;gt; Compiler -&amp;gt; Global compiler settings -&amp;gt; Other settings and click on Advanced options, you will get this dialog:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;[[Image:AdvancedCompilerOptions.png|Advanced compiler options]]&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For starters, the command line macros are now paired with a list of source file extensions. So each command line macro (like the &amp;quot;Compile single file to object file&amp;quot;) can now hold different macros ''depending on the source file extension''. This is the core of the new functionality: by adding a new command-extension pair, you effectively add support for these extension(s) to the build system!&lt;br /&gt;
&lt;br /&gt;
Another thing that also got added was the ability to keep a list of files the custom command will generate (for each command-extension pair). These generated files are then automatically shown in the project tree, become part of the build process, etc. In other words, they are dynamically - and transparently - affecting the project. If you find this confusing, have a look at the provided example and things will clear up :).&lt;br /&gt;
&lt;br /&gt;
== Let's see an example already ==&lt;br /&gt;
&lt;br /&gt;
Here comes a real world example. I recently worked on a side project that required me to use [http://www.swig.org SWIG]. What the &amp;lt;tt&amp;gt;swig&amp;lt;/tt&amp;gt; program does, in simple words, is take a special interface file (usually &amp;lt;tt&amp;gt;*.i&amp;lt;/tt&amp;gt;) as input and, based on this input, it generates a C/C++ file to include in your project. This sounds like the perfect scenario to use as an example here :).&lt;br /&gt;
&lt;br /&gt;
Here's what I did:&lt;br /&gt;
&lt;br /&gt;
 Command:         '''Compile single file to object file'''&lt;br /&gt;
 Extension:       '''i'''&lt;br /&gt;
 Macro:           '''swig -c++ -lua $includes -o $file_dir/$file_name.cpp $file'''&lt;br /&gt;
 Generated files: '''$file_dir/$file_name.cpp'''&lt;br /&gt;
&lt;br /&gt;
What do the above mean?&lt;br /&gt;
&lt;br /&gt;
For any file with extension '''i''', use the above macro to process (compile) it. Also lets Code::Blocks know that this macro will create a new file, named '''$file_dir/$file_name.cpp'''.&lt;br /&gt;
&lt;br /&gt;
With this info at hand, Code::Blocks will now do the following auto-magically when you add any *.i file to a project:&lt;br /&gt;
&lt;br /&gt;
* Add the generated file(s) also to the project (even if they don't yet exist).&lt;br /&gt;
* Will display the file under the new &amp;quot;Auto-generated&amp;quot; tree folder (if files categorization is enabled).&lt;br /&gt;
* Will know how to process (compile) the *.i files.&lt;br /&gt;
* Will also schedule all the generated files for processing (compiling) ''after'' the *.i file is processed.&lt;br /&gt;
* Will still track dependencies so when the *.i file is changed, its generated files will be re-generated too.&lt;br /&gt;
&lt;br /&gt;
== Another example - Ragel ==&lt;br /&gt;
&lt;br /&gt;
Compile [http://www.complang.org/ragel/ Ragel State Machine Compiler] source into C++ file.&lt;br /&gt;
&lt;br /&gt;
 Command:         '''Compile single file to object file'''&lt;br /&gt;
 Extension:       '''rl'''&lt;br /&gt;
 Macro:           '''ragel $file -C -L -o $file.cpp'''&lt;br /&gt;
 Generated files: '''$file.cpp'''&lt;br /&gt;
&lt;br /&gt;
(You have to ensure that the ragel executable is in the PATH.)&lt;br /&gt;
&lt;br /&gt;
== Another example - Bison ==&lt;br /&gt;
&lt;br /&gt;
Compile [http://www.gnu.org/software/bison/ Bison Parser] parser into C/C++ file.&lt;br /&gt;
&lt;br /&gt;
 Command:         '''Compile single file to object file'''&lt;br /&gt;
 Extension:       '''y'''&lt;br /&gt;
 Macro:           '''bison -v -d $file -o $file_dir/$file_name.parser.cc'''&lt;br /&gt;
 Generated files: '''$file_dir/$file_name.parser.cc'''&lt;br /&gt;
                  '''$file_dir/$file_name.parser.hh'''&lt;br /&gt;
&lt;br /&gt;
(You have to ensure that the bison executable is in the PATH.)&lt;br /&gt;
&lt;br /&gt;
== Another example - Flex ==&lt;br /&gt;
&lt;br /&gt;
Compile [http://flex.sourceforge.net/ Flex] lexical analyser files into C/C++ file.&lt;br /&gt;
&lt;br /&gt;
 Command:         '''Compile single file to object file'''&lt;br /&gt;
 Extension:       '''l'''&lt;br /&gt;
 Macro:           '''flex -o$file_dir/$file_name.scanner.cc $file'''&lt;br /&gt;
 Generated files: '''$file_dir/$file_name.scanner.cc'''&lt;br /&gt;
&lt;br /&gt;
(You have to ensure that the flex executable is in the PATH.)&lt;br /&gt;
&lt;br /&gt;
== Notes ==&lt;br /&gt;
&lt;br /&gt;
* All default commands are paired to no extension. These are used as fallback if a matching extension isn't defined.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Known issues ==&lt;br /&gt;
* Currently, only the ''$file*'' macros are supported in the generated files names ($file, $file_dir, $file_name and $file_ext).&lt;br /&gt;
* If you change any of the settings mentioned here in advanced compiler options, you '''must''' close and re-open your project so the changes will take effect. No message is displayed currently to note this.&lt;br /&gt;
* If you are using a non-default compiler (to cross compile for example), you may need to make these settings in the default compiler, not the cross compiler where it seems to have no effect.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Creation: [[User:Mandrav|Mandrav]] 11:29, 12 October 2007 (UTC)&lt;br /&gt;
Update:   [[User:MortenMacFly|MortenMacFly]] 17:53, 12 June 2012 (UTC)&lt;/div&gt;</summary>
		<author><name>Mgimenez</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=Installing_Code::Blocks_from_source_on_Windows&amp;diff=9584</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=9584"/>
		<updated>2022-03-10T15:47:38Z</updated>

		<summary type="html">&lt;p&gt;Mgimenez: /* Build wxWidgets Support Library */ Clarify why support for wx &amp;lt; 3.1.3 was removed&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 ➡ [http://www.wxwidgets.org/ wxWidgets.org]&lt;br /&gt;
&lt;br /&gt;
Download: [https://github.com/wxWidgets/wxWidgets/releases/download/v3.1.5/wxWidgets-3.1.5.zip wxWidgets-3.1.5.zip]&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.  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;
To compile wxWidgets in 64-bit mode add &amp;lt;tt&amp;gt;CFG=64&amp;lt;/tt&amp;gt; to the build line that is given next or use a compiler that defaults to 64 bit output. For example, MinGW-w64 has toolchains targetting 32 bits and others targetting 64 bits. Of course, you will have to compile Code::Blocks also in 64-bit mode and add &amp;lt;tt&amp;gt;_64&amp;lt;/tt&amp;gt; suffix to folders and batch files.&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;
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;
=== 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;
Run &amp;lt;tt&amp;gt;update_31.bat&amp;lt;/tt&amp;gt; (located in the &amp;lt;tt&amp;gt;src&amp;lt;/tt&amp;gt; directory). 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>Mgimenez</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=Installing_Code::Blocks_from_source_on_Windows&amp;diff=9583</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=9583"/>
		<updated>2022-03-10T15:44:28Z</updated>

		<summary type="html">&lt;p&gt;Mgimenez: /* Build wxWidgets Library */ Add instructions for multithreaded compilation&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 ➡ [http://www.wxwidgets.org/ wxWidgets.org]&lt;br /&gt;
&lt;br /&gt;
Download: [https://github.com/wxWidgets/wxWidgets/releases/download/v3.1.5/wxWidgets-3.1.5.zip wxWidgets-3.1.5.zip]&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.  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&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;
To compile wxWidgets in 64-bit mode add &amp;lt;tt&amp;gt;CFG=64&amp;lt;/tt&amp;gt; to the build line that is given next or use a compiler that defaults to 64 bit output. For example, MinGW-w64 has toolchains targetting 32 bits and others targetting 64 bits. Of course, you will have to compile Code::Blocks also in 64-bit mode and add &amp;lt;tt&amp;gt;_64&amp;lt;/tt&amp;gt; suffix to folders and batch files.&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;
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;
=== 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;
Run &amp;lt;tt&amp;gt;update_31.bat&amp;lt;/tt&amp;gt; (located in the &amp;lt;tt&amp;gt;src&amp;lt;/tt&amp;gt; directory). 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>Mgimenez</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=Installing_Code::Blocks_from_source_on_Windows&amp;diff=9582</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=9582"/>
		<updated>2022-03-10T12:12:09Z</updated>

		<summary type="html">&lt;p&gt;Mgimenez: /* Code::Blocks Sources */ Update snapshot link&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 ➡ [http://www.wxwidgets.org/ wxWidgets.org]&lt;br /&gt;
&lt;br /&gt;
Download: [https://github.com/wxWidgets/wxWidgets/releases/download/v3.1.5/wxWidgets-3.1.5.zip wxWidgets-3.1.5.zip]&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.  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&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;
To compile wxWidgets in 64-bit mode add &amp;lt;tt&amp;gt;CFG=64&amp;lt;/tt&amp;gt; to the build line that is given next or use a compiler that defaults to 64 bit output. For example, MinGW-w64 has toolchains targetting 32 bits and others targetting 64 bits. Of course, you will have to compile Code::Blocks also in 64-bit mode and add &amp;lt;tt&amp;gt;_64&amp;lt;/tt&amp;gt; suffix to folders and batch files.&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;
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;
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;
=== 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;
Run &amp;lt;tt&amp;gt;update_31.bat&amp;lt;/tt&amp;gt; (located in the &amp;lt;tt&amp;gt;src&amp;lt;/tt&amp;gt; directory). 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>Mgimenez</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=Installing_Code::Blocks_from_source_on_Windows&amp;diff=9581</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=9581"/>
		<updated>2022-03-10T12:08:44Z</updated>

		<summary type="html">&lt;p&gt;Mgimenez: /* wxWidgets */ Update wxWidgets recommended version&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 ➡ [http://www.wxwidgets.org/ wxWidgets.org]&lt;br /&gt;
&lt;br /&gt;
Download: [https://github.com/wxWidgets/wxWidgets/releases/download/v3.1.5/wxWidgets-3.1.5.zip wxWidgets-3.1.5.zip]&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.  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: http://sourceforge.net/p/codeblocks/code ➡ &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&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;
To compile wxWidgets in 64-bit mode add &amp;lt;tt&amp;gt;CFG=64&amp;lt;/tt&amp;gt; to the build line that is given next or use a compiler that defaults to 64 bit output. For example, MinGW-w64 has toolchains targetting 32 bits and others targetting 64 bits. Of course, you will have to compile Code::Blocks also in 64-bit mode and add &amp;lt;tt&amp;gt;_64&amp;lt;/tt&amp;gt; suffix to folders and batch files.&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;
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;
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;
=== 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;
Run &amp;lt;tt&amp;gt;update_31.bat&amp;lt;/tt&amp;gt; (located in the &amp;lt;tt&amp;gt;src&amp;lt;/tt&amp;gt; directory). 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>Mgimenez</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=Installing_Code::Blocks_nightly_build_on_Ubuntu&amp;diff=9580</id>
		<title>Installing Code::Blocks nightly build on Ubuntu</title>
		<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php?title=Installing_Code::Blocks_nightly_build_on_Ubuntu&amp;diff=9580"/>
		<updated>2022-03-10T11:30:10Z</updated>

		<summary type="html">&lt;p&gt;Mgimenez: Update information (incomplete and untested, but better than nothing)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Installing Code::Blocks]]&lt;br /&gt;
[[Category:Installing Code::Blocks nightly build]]&lt;br /&gt;
This is a quick guide to get Code::Blocks up and running on your Ubuntu based Linux distribution. It is also going to make sure you can develop wxWidgets applications on your box as well. Look at the bottom of this guide for a complete command line that will install all the packages in one operation.&lt;br /&gt;
&lt;br /&gt;
First be sure you have the necessary software to compile and debug programs.&lt;br /&gt;
&lt;br /&gt;
1. Install the compiler.&lt;br /&gt;
 sudo apt-get install build-essential&lt;br /&gt;
&lt;br /&gt;
2. Install the debugger.&lt;br /&gt;
 sudo apt-get install gdb&lt;br /&gt;
&lt;br /&gt;
You'll need to install wxWidgets to use Codeblocks (support for wxWidgets &amp;lt; 3.0.0 has been removed). If you want to install them, make sure you have your universe and multiverse [https://help.ubuntu.com/ubuntu/desktopguide/C/extra-repositories.html repositories enabled] and install the following packages.&lt;br /&gt;
&lt;br /&gt;
3. Install wxWidgets library. (This package is all that is needed to run any application that uses wxWidgets. ie. Code::Blocks). The version may be different in you Ubuntu.&lt;br /&gt;
 sudo apt-get install libwxgtk3.0-4&lt;br /&gt;
&lt;br /&gt;
4. Install the wxWidgets developement packages. (This is used to develop wxWidgets applications of your own.)&lt;br /&gt;
 sudo apt-get install libwxgtk3.0-dev&lt;br /&gt;
&lt;br /&gt;
5. ''(OPTIONAL)'' Install the wxWidgets documentation.&lt;br /&gt;
 sudo apt-get install wx3.0-doc&lt;br /&gt;
&lt;br /&gt;
Now go get the nightly build and install it. All dependencies should now be met.&lt;br /&gt;
&lt;br /&gt;
1. Get the latest nigtly build of Code::Blocks from the [https://forums.codeblocks.org/index.php?board=20.0 nightly builds forum].&lt;br /&gt;
&lt;br /&gt;
2. Install Code::Blocks.&lt;br /&gt;
 sudo dpkg -i &amp;lt;Name_Of_Daily_Build.deb&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Codeblocks is packaged into separate Debian packages and the packages are archived together in a tar.gz file.&lt;br /&gt;
&lt;br /&gt;
1. Download the tar.gz file to your computer and extract the files to an empty directory, such as one called temp for example.&lt;br /&gt;
 tar xvf CB_''date-of-build_revision-number''_Ubuntu22.04+20.03_wx3.0.4.tar.gz&lt;br /&gt;
&lt;br /&gt;
2. Install all the packages at the same time.&lt;br /&gt;
 sudo dpkg -i *.deb&lt;br /&gt;
&lt;br /&gt;
The packages can be installed individually, if you prefer not to install everything. The first package to install is libcodeblocks0 followed by the codeblocks package. All the other packages are optional. If you want to install the wxsmith and/or contrib packages, you must install the libwxsmithlib0 package first.&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
* [http://apt.jenslody.de/ Jens' (un-)official debian-repository]: additional instructions and downloads.&lt;br /&gt;
* [https://launchpad.net/~pasgui/+archive/ppa/ PPA for pasgui]: an Ubuntu repository.&lt;br /&gt;
* [https://launchpad.net/~damien-moore/+archive/ubuntu/codeblocks-stable PPA of dmoore]: an alternative Ubuntu repository.&lt;/div&gt;</summary>
		<author><name>Mgimenez</name></author>
	</entry>
</feed>