<?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=Me22</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=Me22"/>
	<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php/Special:Contributions/Me22"/>
	<updated>2026-05-24T00:15:33Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.35.0</generator>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=Installing_Code::Blocks_from_source_on_Gentoo&amp;diff=4164</id>
		<title>Installing Code::Blocks from source on Gentoo</title>
		<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php?title=Installing_Code::Blocks_from_source_on_Gentoo&amp;diff=4164"/>
		<updated>2006-11-18T05:22:04Z</updated>

		<summary type="html">&lt;p&gt;Me22: &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;
== Current Code::Blocks Compilation Methods for Gentoo ==&lt;br /&gt;
&lt;br /&gt;
=== Subversion Portage Overlay ===&lt;br /&gt;
The current suggested method for emerging Code::Blocks is through the use of custom Ebuilds. The most prominently known portage overlay for the ebuilds is located here: [http://forums.gentoo.org/viewtopic-t-440412.html Gentoo Forums Code::Blocks Portage Overlay]&lt;br /&gt;
&lt;br /&gt;
To create an overlay, please read [http://gentoo-wiki.com/HOWTO_Installing_3rd_Party_Ebuilds HOWTO Installing 3rd Party Ebuilds]&lt;br /&gt;
&lt;br /&gt;
=== Create your own overlay ===&lt;br /&gt;
Another method of pulling together your own Ebuilds and creating your own portage overlay is to view the bug report for adding Code::Blocks to portage. [http://bugs.gentoo.org/show_bug.cgi?id=89533 Gentoo Code::Blocks Package Suggestion]&lt;br /&gt;
&lt;br /&gt;
== Preparing Code::Blocks from Source (For 1.0rc2) ==&lt;br /&gt;
&lt;br /&gt;
'''WORK IN PROGRESS'''&lt;br /&gt;
&lt;br /&gt;
( Note: This is non-official and unverified.  It worked for me, but... )&lt;br /&gt;
&lt;br /&gt;
===Prepare Libraries===&lt;br /&gt;
&lt;br /&gt;
Code::Blocks uses the wxWidgets (http://www.wxwindows.org/) library for its GUI. wxWidgets in turn uses GTK+ (http://www.gtk.org/). GTK+ is the library which GNOME desktop uses, but GNOME is not required to use it. In fact, odds are very good that if you have a number of GUI programs installed, you already have it. wxWidgets is also very common, if slightly less so. &lt;br /&gt;
&lt;br /&gt;
You need to compile the wxGTK package with the following use flag:&lt;br /&gt;
&lt;br /&gt;
 +gtk2 &lt;br /&gt;
&lt;br /&gt;
The best way of getting this done is by adding a line to /etc/portage/package.use and recompiling wxGTK :&lt;br /&gt;
&lt;br /&gt;
 # echo x11-libs/wxGTK gtk2  &amp;gt;&amp;gt; /etc/portage/package.use&lt;br /&gt;
 # emerge wxGTK&lt;br /&gt;
&lt;br /&gt;
Note: Code::Blocks now works fine with Unicode. So you might want to build wxGTK with +unicode flag.&lt;br /&gt;
&lt;br /&gt;
===Get the source code===&lt;br /&gt;
&lt;br /&gt;
For this you have 2 options:&lt;br /&gt;
&lt;br /&gt;
====Option 1: Download a source tarball.====&lt;br /&gt;
&lt;br /&gt;
This is easy and means you have an easily-reproduced source set.&lt;br /&gt;
&lt;br /&gt;
1) '''Download a source tarball''' from [http://sourceforge.net/project/showfiles.php?group_id=126998&amp;amp;package_id=142469 The Download Section of CodeBlocks.org]&lt;br /&gt;
&lt;br /&gt;
2) '''Extract it'''. For this tutorial, I'm going to assume that you're installing as root, so /usr/local/src is a good pick. Any location is fine, however. This should create a codeblocks-1.0rc2 ( or similar ) folder.&lt;br /&gt;
&lt;br /&gt;
====Option 2: Fetch from CVS====&lt;br /&gt;
&lt;br /&gt;
This is not signifigantly harder and means you have a more up-to-date version of the source code.  Usually this means more features and different bugs, which might be more or less annoying.&lt;br /&gt;
&lt;br /&gt;
1) '''Install the CVS client'''.  You might have it already.  If not, this just requires the usual :&lt;br /&gt;
 # emerge dev-util/cvs&lt;br /&gt;
&lt;br /&gt;
2) '''Set the CVS root'''. Run the following command, and enter the password ''anonymous'' when asked :&lt;br /&gt;
 # cvs -d :pserver:anonymous@cvs.sourceforge.net:/cvsroot/codeblocks login&lt;br /&gt;
Note that simply hitting enter--not entering a password--might also work.&lt;br /&gt;
&lt;br /&gt;
3) '''Checkout a copy'''. cd to the directory you want the code to be placed in.  Note that CVS will create a codeblocks directory for you. For this tutorial, I'm going to assume that you're installing as root, so /usr/local/src is a good pick. Any location is fine, however.&lt;br /&gt;
 # cd /usr/local/src&lt;br /&gt;
The following command fetches the source from the CVS server :&lt;br /&gt;
 # cvs -d :pserver:anonymous@cvs.sourceforge.net:/cvsroot/codeblocks checkout codeblocks&lt;br /&gt;
&lt;br /&gt;
===Compile the Code===&lt;br /&gt;
&lt;br /&gt;
1) '''cd to codeblocks directory'''.  Following our example, from CVS this would be /usr/local/src/codeblocks; from a tarball, something like /usr/local/src/codeblocks-1.0rc2 :&lt;br /&gt;
 # cd /usr/local/src/codeblocks&lt;br /&gt;
or&lt;br /&gt;
 # cd /usr/local/src/codeblocks-1.0rc2&lt;br /&gt;
&lt;br /&gt;
2) '''bootstrap'''. The very first time you unpack the source (or checkout from CVS), you need to run ./bootstrap. This will create a sane building environment.&lt;br /&gt;
 # ./bootstrap&lt;br /&gt;
Note: If you get weird errors here try running following command and then bootstrap again.&lt;br /&gt;
 # find . -type f -and -not -name &amp;quot;*.cpp&amp;quot; -and -not -name &amp;quot;*.h&amp;quot; -and -not -name &amp;quot;*.png&amp;quot; -and -not -name &amp;quot;*.bmp&amp;quot; | sed &amp;quot;s/.*/\&amp;quot;\\0\&amp;quot;/&amp;quot; | xargs dos2unix&lt;br /&gt;
&lt;br /&gt;
3) '''configure'''. Use 'configure --help' to see what things you can enable or disable.&lt;br /&gt;
 # ./configure&lt;br /&gt;
&lt;br /&gt;
4) '''make and make install'''.&lt;br /&gt;
 # make&lt;br /&gt;
 # sudo make install&lt;br /&gt;
&lt;br /&gt;
===More===&lt;br /&gt;
&lt;br /&gt;
to come&lt;br /&gt;
&lt;br /&gt;
To run Code::Blocks:&lt;br /&gt;
 # codeblocks&lt;br /&gt;
&lt;br /&gt;
===References===&lt;br /&gt;
&lt;br /&gt;
[https://www.codeblocks.org/index.php?name=PNphpBB2&amp;amp;file=viewtopic&amp;amp;t=29 Linux releases or compiling on Linux] from the forum&lt;br /&gt;
&lt;br /&gt;
[http://sourceforge.net/cvs/?group_id=126998 Code::Blocks : CVS access instructions]&lt;br /&gt;
&lt;br /&gt;
[http://sourceforge.net/docman/display_doc.php?docid=14033&amp;amp;group_id=1 Basic Introduction to CVS and SourceForge.net (SF.net) Project CVS Services]&lt;br /&gt;
&lt;br /&gt;
===Credits===&lt;br /&gt;
&lt;br /&gt;
First version author: me22 ( me22.ca@gmail.com )&lt;br /&gt;
Some changes: sleipner ( themacgyver@gmail.com )&lt;br /&gt;
More updating: Crzysdrs&lt;/div&gt;</summary>
		<author><name>Me22</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=Installing_Code::Blocks_from_source_on_Gentoo&amp;diff=3021</id>
		<title>Installing Code::Blocks from source on Gentoo</title>
		<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php?title=Installing_Code::Blocks_from_source_on_Gentoo&amp;diff=3021"/>
		<updated>2006-06-18T20:42:27Z</updated>

		<summary type="html">&lt;p&gt;Me22: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Installation\Build Instructions]]&lt;br /&gt;
'''Note: This Information is antiquated!'''&lt;br /&gt;
&lt;br /&gt;
== The best way to compile C::B in gentoo these days is to use the codeblocks-svn ebuild which can be found in gentoo's bugzilla or in the forums ==&lt;br /&gt;
&lt;br /&gt;
== Code::Blocks now works fine with Unicode and wx2.6, and the build system has changed ==&lt;br /&gt;
&lt;br /&gt;
'''WORK IN PROGRESS'''&lt;br /&gt;
&lt;br /&gt;
( Note: This is non-official and unverified.  It worked for me, but... )&lt;br /&gt;
&lt;br /&gt;
===Prepare Libraries===&lt;br /&gt;
&lt;br /&gt;
Code::Blocks uses the wxWidgets (http://www.wxwindows.org/) library for its GUI. wxWidgets in turn uses GTK+ (http://www.gtk.org/). GTK+ is the library which GNOME desktop uses, but GNOME is not required to use it. In fact, odds are very good that if you have a number of GUI programs installed, you already have it. wxWidgets is also very common, if slightly less so. &lt;br /&gt;
&lt;br /&gt;
You need to compile the wxGTK package with the following use flag:&lt;br /&gt;
&lt;br /&gt;
 +gtk2 &lt;br /&gt;
&lt;br /&gt;
The best way of getting this done is by adding a line to /etc/portage/package.use and recompiling wxGTK :&lt;br /&gt;
&lt;br /&gt;
 # echo x11-libs/wxGTK gtk2  &amp;gt;&amp;gt; /etc/portage/package.use&lt;br /&gt;
 # emerge wxGTK&lt;br /&gt;
&lt;br /&gt;
Note: Code::Blocks now works fine with Unicode. So you might want to build wxGTK with +unicode flag.&lt;br /&gt;
&lt;br /&gt;
===Get the source code===&lt;br /&gt;
&lt;br /&gt;
For this you have 2 options:&lt;br /&gt;
&lt;br /&gt;
====Option 1: Download a source tarball.====&lt;br /&gt;
&lt;br /&gt;
This is easy and means you have an easily-reproduced source set.&lt;br /&gt;
&lt;br /&gt;
1) '''Download a source tarball''' from [http://sourceforge.net/project/showfiles.php?group_id=126998&amp;amp;package_id=142469 The Download Section of CodeBlocks.org]&lt;br /&gt;
&lt;br /&gt;
2) '''Extract it'''. For this tutorial, I'm going to assume that you're installing as root, so /usr/local/src is a good pick. Any location is fine, however. This should create a codeblocks-1.0rc2 ( or similar ) folder.&lt;br /&gt;
&lt;br /&gt;
====Option 2: Fetch from CVS====&lt;br /&gt;
&lt;br /&gt;
This is not signifigantly harder and means you have a more up-to-date version of the source code.  Usually this means more features and different bugs, which might be more or less annoying.&lt;br /&gt;
&lt;br /&gt;
1) '''Install the CVS client'''.  You might have it already.  If not, this just requires the usual :&lt;br /&gt;
 # emerge dev-util/cvs&lt;br /&gt;
&lt;br /&gt;
2) '''Set the CVS root'''. Run the following command, and enter the password ''anonymous'' when asked :&lt;br /&gt;
 # cvs -d :pserver:anonymous@cvs.sourceforge.net:/cvsroot/codeblocks login&lt;br /&gt;
Note that simply hitting enter--not entering a password--might also work.&lt;br /&gt;
&lt;br /&gt;
3) '''Checkout a copy'''. cd to the directory you want the code to be placed in.  Note that CVS will create a codeblocks directory for you. For this tutorial, I'm going to assume that you're installing as root, so /usr/local/src is a good pick. Any location is fine, however.&lt;br /&gt;
 # cd /usr/local/src&lt;br /&gt;
The following command fetches the source from the CVS server :&lt;br /&gt;
 # cvs -d :pserver:anonymous@cvs.sourceforge.net:/cvsroot/codeblocks checkout codeblocks&lt;br /&gt;
&lt;br /&gt;
===Compile the Code===&lt;br /&gt;
&lt;br /&gt;
1) '''cd to codeblocks directory'''.  Following our example, from CVS this would be /usr/local/src/codeblocks; from a tarball, something like /usr/local/src/codeblocks-1.0rc2 :&lt;br /&gt;
 # cd /usr/local/src/codeblocks&lt;br /&gt;
or&lt;br /&gt;
 # cd /usr/local/src/codeblocks-1.0rc2&lt;br /&gt;
&lt;br /&gt;
2) '''bootstrap'''. The very first time you unpack the source (or checkout from CVS), you need to run ./bootstrap. This will create a sane building environment.&lt;br /&gt;
 # ./bootstrap&lt;br /&gt;
Note: If you get weird errors here try running following command and then bootstrap again.&lt;br /&gt;
 # find . -type f -and -not -name &amp;quot;*.cpp&amp;quot; -and -not -name &amp;quot;*.h&amp;quot; -and -not -name &amp;quot;*.png&amp;quot; -and -not -name &amp;quot;*.bmp&amp;quot; | sed &amp;quot;s/.*/\&amp;quot;\\0\&amp;quot;/&amp;quot; | xargs dos2unix&lt;br /&gt;
&lt;br /&gt;
3) '''configure'''. Use 'configure --help' to see what things you can enable or disable.&lt;br /&gt;
 # ./configure&lt;br /&gt;
&lt;br /&gt;
4) '''make and make install'''.&lt;br /&gt;
 # make&lt;br /&gt;
 # sudo make install&lt;br /&gt;
&lt;br /&gt;
===More===&lt;br /&gt;
&lt;br /&gt;
to come&lt;br /&gt;
&lt;br /&gt;
To run Code::Blocks:&lt;br /&gt;
 # codeblocks&lt;br /&gt;
&lt;br /&gt;
===References===&lt;br /&gt;
&lt;br /&gt;
[https://www.codeblocks.org/index.php?name=PNphpBB2&amp;amp;file=viewtopic&amp;amp;t=29 Linux releases or compiling on Linux] from the forum&lt;br /&gt;
&lt;br /&gt;
[http://sourceforge.net/cvs/?group_id=126998 Code::Blocks : CVS access instructions]&lt;br /&gt;
&lt;br /&gt;
[http://sourceforge.net/docman/display_doc.php?docid=14033&amp;amp;group_id=1 Basic Introduction to CVS and SourceForge.net (SF.net) Project CVS Services]&lt;br /&gt;
&lt;br /&gt;
===Credits===&lt;br /&gt;
&lt;br /&gt;
Original Author: me22 ( me22.ca@gmail.com )&lt;br /&gt;
Some changes: sleipner ( themacgyver@gmail.com )&lt;/div&gt;</summary>
		<author><name>Me22</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=Installing_Code::Blocks_from_source_on_Gentoo&amp;diff=246</id>
		<title>Installing Code::Blocks from source on Gentoo</title>
		<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php?title=Installing_Code::Blocks_from_source_on_Gentoo&amp;diff=246"/>
		<updated>2005-10-25T19:43:48Z</updated>

		<summary type="html">&lt;p&gt;Me22: OUT OF DATE&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
= NOTE: THIS INFORMATION IS ANTIQUATED! =&lt;br /&gt;
&lt;br /&gt;
== Code::Blocks now works fine with Unicode and wx2.6, and the build system has changed ==&lt;br /&gt;
&lt;br /&gt;
'''WORK IN PROGRESS'''&lt;br /&gt;
&lt;br /&gt;
( Note: This is non-official and unverified.  It worked for me, but... )&lt;br /&gt;
&lt;br /&gt;
===Prepare Libraries===&lt;br /&gt;
&lt;br /&gt;
Code::Blocks uses the [http://www.wxwindows.org/ wxWidgets] library for its GUI.  wxWidgets in turn uses [http://www.gtk.org/ GTK+]. GTK+ is the library which GNOME desktop uses, but GNOME is not required to use it. In fact, odds are very good that if you have a number of GUI programs installed, you already have it. wxWidgets is also very common, if slightly less so.  The trick with wxWidgets and Code::Blocks is that Code::Blocks can only use the gtk2, non-unicode version of wxWidgets&lt;br /&gt;
&lt;br /&gt;
This means that you need to compile the wxGTK package with the following use flags settings:&lt;br /&gt;
 +no_wxgtk1 +gtk2 -unicode&lt;br /&gt;
The best way of getting these set is by adding a line to /etc/portage/package.use and recompiling wxGTK :&lt;br /&gt;
 # echo x11-libs/wxGTK no_wxgtk1 gtk2 -unicode &amp;gt;&amp;gt; /etc/portage/package.use&lt;br /&gt;
 # emerge wxGTK&lt;br /&gt;
&lt;br /&gt;
===Get the source code===&lt;br /&gt;
&lt;br /&gt;
For this you have 2 options:&lt;br /&gt;
&lt;br /&gt;
====Option 1: Download a source tarball.====&lt;br /&gt;
&lt;br /&gt;
This is easy and means you have an easily-reproduced source set.&lt;br /&gt;
&lt;br /&gt;
1) '''Download a source tarball''' from [https://www.codeblocks.org/modules.php?op=modload&amp;amp;name=Downloads&amp;amp;file=index&amp;amp;req=viewsdownload&amp;amp;sid=3 The Download Section of CodeBlocks.org]&lt;br /&gt;
&lt;br /&gt;
2) '''Extract it'''. For this tutorial, I'm going to assume that you're installing as root, so /usr/local/src is a good pick. Any location is fine, however. This should create a CodeBlocks-1.0-beta5 ( or similar ) folder.&lt;br /&gt;
&lt;br /&gt;
====Option 2: Fetch from CVS====&lt;br /&gt;
&lt;br /&gt;
This is not signifigantly harder and means you have a more up-to-date version of the source code.  Usually this means more features and different bugs, which might be more or less annoying.&lt;br /&gt;
&lt;br /&gt;
1) '''Install the CVS client'''.  You might have it already.  If not, this just requires the usual :&lt;br /&gt;
 # emerge dev-util/cvs&lt;br /&gt;
&lt;br /&gt;
2) '''Set the CVS root'''. Run the following command, and enter the password ''anonymous'' when asked :&lt;br /&gt;
 # cvs -d :pserver:anonymous@cvs.sourceforge.net:/cvsroot/codeblocks login&lt;br /&gt;
Note that simply hitting enter--not entering a password--might also work.&lt;br /&gt;
&lt;br /&gt;
3) '''Checkout a copy'''. cd to the directory you want the code to be placed in.  Note that CVS will create a codeblocks directory for you. For this tutorial, I'm going to assume that you're installing as root, so /usr/local/src is a good pick. Any location is fine, however.&lt;br /&gt;
 # cd /usr/local/src&lt;br /&gt;
The following command fetches the source from the CVS server :&lt;br /&gt;
 # cvs -d :pserver:anonymous@cvs.sourceforge.net:/cvsroot/codeblocks checkout codeblocks&lt;br /&gt;
&lt;br /&gt;
===Compile the Code===&lt;br /&gt;
&lt;br /&gt;
1) '''cd to the directory with the Makefile'''.  Following our example, from CVS this would be /usr/local/src/codeblocks/src; from a tarball, something like /usr/local/src/CodeBlocks-1.0-beta5 :&lt;br /&gt;
 # cd /usr/local/src/codeblocks/src&lt;br /&gt;
 or&lt;br /&gt;
 # cd /usr/local/src/CodeBlocks-1.0-beta5&lt;br /&gt;
If neither of those works, you can always use find to look for it :&lt;br /&gt;
 # find &amp;lt;parent directory you extracted to&amp;gt; -name Makefile.unix&lt;br /&gt;
&lt;br /&gt;
2) '''Build the sources'''.  There's no configuration nessesary, just let make go to work :&lt;br /&gt;
 # make -f Makefile.unix&lt;br /&gt;
 # make -f Makefile.unix update&lt;br /&gt;
The first line does the actual compiling.  The second moves the nessesary things to the output directory, zips some resources, and performs other miscellaneous nessesary tasks.&lt;br /&gt;
&lt;br /&gt;
'''Note:''' The &amp;quot;update&amp;quot; script seems to be using Dos character encoding, which will result in its failure to run on Linux. To fix this, use dos2unix:&lt;br /&gt;
 # emerge -av dos2unix&lt;br /&gt;
This will install dos2unix. Now we are ready to convert the script.&lt;br /&gt;
 # dos2unix -n update update.unix&lt;br /&gt;
 # chmod +x update.unix&lt;br /&gt;
 # ./update.unix&lt;br /&gt;
The first line converts the script character encoding, the second makes it executable and the third runs it. This trick is from a forum post by ilkapo.&lt;br /&gt;
&lt;br /&gt;
===More===&lt;br /&gt;
&lt;br /&gt;
to come&lt;br /&gt;
&lt;br /&gt;
For now ( assuming bash shell ):&lt;br /&gt;
 $ cd /usr/local/src/codeblocks/src/output&lt;br /&gt;
 $ LD_LIBRARY_PATH=&amp;quot;.&amp;quot; ./codeblocks.exe&lt;br /&gt;
&lt;br /&gt;
===References===&lt;br /&gt;
&lt;br /&gt;
[https://www.codeblocks.org/index.php?name=PNphpBB2&amp;amp;file=viewtopic&amp;amp;t=29 Linux releases or compiling on Linux] from the forum&lt;br /&gt;
&lt;br /&gt;
[http://sourceforge.net/cvs/?group_id=126998 Code::Blocks : CVS access instructions]&lt;br /&gt;
&lt;br /&gt;
[http://sourceforge.net/docman/display_doc.php?docid=14033&amp;amp;group_id=1 Basic Introduction to CVS and SourceForge.net (SF.net) Project CVS Services]&lt;br /&gt;
&lt;br /&gt;
===Credits===&lt;br /&gt;
&lt;br /&gt;
Original Author: me22 ( me22.ca@gmail.com )&lt;/div&gt;</summary>
		<author><name>Me22</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=Main_Page&amp;diff=240</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php?title=Main_Page&amp;diff=240"/>
		<updated>2005-09-06T00:53:43Z</updated>

		<summary type="html">&lt;p&gt;Me22: /* Table of contents */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;!-- wiki user guide at [http://meta.wikipedia.org/wiki/MediaWiki_User%27s_Guide User's Guide] --&amp;gt;&lt;br /&gt;
= Welcome to the official wiki site for Code::Blocks =&lt;br /&gt;
[https://www.codeblocks.org Code::Blocks] is an open-source, cross-platform IDE (Integrated Development Environment). Using a plugin architecture, its capabilities and features are defined by the provided plugins. Currently, [https://www.codeblocks.org Code::Blocks] is oriented towards C/C++. At the time of this writing, the following compilers are supported:&lt;br /&gt;
* [http://gcc.gnu.org/ GNU GCC] (Linux)&lt;br /&gt;
* [http://www.mingw.org MinGW GCC] (Win32)&lt;br /&gt;
* [http://msdn.microsoft.com/visualc/vctoolkit2003 Microsoft's Visual C++ Free Toolkit 2003] (Win32)&lt;br /&gt;
* [http://www.borland.com/products/downloads/download_cbuilder.html# Borland's C++ Compiler 5.5] (Win32)&lt;br /&gt;
* [http://www.digitalmars.com/ DigitalMars] (Win32)&lt;br /&gt;
* [http://store.scitechsoft.com/product_info.php?products_id=37/ OpenWatcom] (Win32)&lt;br /&gt;
* [http://sdcc.sourceforge.net/ Small Device C Compiler (SDCC)]&lt;br /&gt;
&lt;br /&gt;
This site does not hold much information yet but, with the help of the [https://www.codeblocks.org Code::Blocks] users, we hope it will soon be filled with articles, tutorials, FAQs, etc.&lt;br /&gt;
&lt;br /&gt;
== Table of contents ==&lt;br /&gt;
* [[Articles]]&lt;br /&gt;
* [[Tutorials]]&lt;br /&gt;
* [[Code::Blocks Interface]]&lt;br /&gt;
* [[FAQ]]&lt;br /&gt;
* [[Tips'n'Tricks]]&lt;br /&gt;
&lt;br /&gt;
The [https://www.codeblocks.org/about.shtml Code::Blocks Team].&lt;/div&gt;</summary>
		<author><name>Me22</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=FAQ&amp;diff=198</id>
		<title>FAQ</title>
		<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php?title=FAQ&amp;diff=198"/>
		<updated>2005-09-06T00:51:53Z</updated>

		<summary type="html">&lt;p&gt;Me22: /* Is it possible to use Visual C++ 6.0 with Code::Blocks? */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= General =&lt;br /&gt;
&lt;br /&gt;
== Is it possible to integrate the win32-help as in dev-cpp, to get help on the items under the caret? ==&lt;br /&gt;
&lt;br /&gt;
Integration of the win32 API helpfile should be a no-brainer. Someone could just write a really simple plugin and, upon invocation (through a shortcut possibly), look at the word under the cursor and invoke windows help... If you think you 're up to the task, I can help you with all the info you need. If not, I could write it myself but no promises on a release date ;)&lt;br /&gt;
&lt;br /&gt;
== Launching for the first time, Code::Blocks tells me I need to install GNU make. Is this necessary on a Windows system? ==&lt;br /&gt;
&lt;br /&gt;
Since version 1.0-beta5, no it is not. Code::Blocks works with GNU &amp;quot;make&amp;quot; [http://www.mingw.org/download.shtml (here)] or without it (default). To choose the build method, go to &amp;quot;Project/Build options&amp;quot;, switch to the &amp;quot;Other&amp;quot; tab and select the build method you prefer.&lt;br /&gt;
&lt;br /&gt;
== What licence is Code::Blocks released under? ==&lt;br /&gt;
&lt;br /&gt;
GNU General Public License 2 ([http://www.gnu.org/licenses/gpl.txt GPL])&lt;br /&gt;
&lt;br /&gt;
= Compiling =&lt;br /&gt;
&lt;br /&gt;
== What compiler can I use with Code::Blocks? ==&lt;br /&gt;
&lt;br /&gt;
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. The one provided with the default Code::Blocks installation, supports GNU GCC (MinGW/Cygwin), MS Visual C++ Free Toolkit 2003, Borland's C++ Compiler 5.5 and DigitalMars Free Compiler.&lt;br /&gt;
&lt;br /&gt;
== I imported a MSVCToolkit project/workspace, but Code::Blocks insists on trying to use GCC. What's wrong? ==&lt;br /&gt;
&lt;br /&gt;
A little documentation problem ^^;. The &amp;quot;default compiler&amp;quot; is usually GCC, so when you imported it with &amp;quot;the default compiler&amp;quot;, you told it to use GCC. To fix this situation, go to &amp;quot;Project&amp;quot;, &amp;quot;Build Options&amp;quot; and select VC++ Toolkit as your compiler.&lt;br /&gt;
&lt;br /&gt;
== I 'm using gcc compiler from an existing dev-cpp installation. How can I make it work? ==&lt;br /&gt;
&lt;br /&gt;
''As of version 1.0-beta6, if a default MinGW installation is not detected, a Dev-C++ installation is checked for and is used if detected.''&lt;br /&gt;
&lt;br /&gt;
You need to take two steps. First, set the compiler master path to the dev-cpp folder. It's under &amp;quot;Settings/Configure plugins/Compiler&amp;quot; in the &amp;quot;Programs&amp;quot; tab...&lt;br /&gt;
Second, you have to add two additional compiler (include) dirs. Go to &amp;quot;Settings/Configure plugins/Compiler&amp;quot; and in the &amp;quot;Compiler dirs&amp;quot; tab add &amp;quot;dev-cpp\include\c++&amp;quot; and &amp;quot;dev-cpp\include\c++\mingw32&amp;quot; (substituting &amp;quot;dev-cpp&amp;quot; with the actual dev-cpp installation folder).&lt;br /&gt;
&lt;br /&gt;
== I just installed Code::Blocks Beta4 and I can't compile anything with BCC. ==&lt;br /&gt;
&lt;br /&gt;
BCC is not supported 100% yet, unfortunately... The next release (namely 1.0-beta6) should address all BCC issues.&lt;br /&gt;
&lt;br /&gt;
== My project should be compiled with a custom makefile. Is it possible with Code::Blocks? ==&lt;br /&gt;
&lt;br /&gt;
Yes, as of version 1.0-beta4 it is supported. Go to project options and you 'll notice a &amp;quot;Custom Makefile&amp;quot; checkbox. If you check this, Code::Blocks will not create another Makefile for compiling but instead always use this Makefile. You have to understand, though, that it is your sole responsibility to keep this Makefile up to date.&lt;br /&gt;
Also make sure that &amp;quot;GNU make&amp;quot; is the selected build method for the specific compiler.&lt;br /&gt;
&lt;br /&gt;
== 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;
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;
== When compiling a wxWidgets project, I get several &amp;quot;variable 'vtable for xxxx' can't be auto-imported&amp;quot;. What's wrong? ==&lt;br /&gt;
&lt;br /&gt;
You need to add WXUSINGDLL in &amp;quot;Project-&amp;gt;Build options-&amp;gt;Compiler #defines&amp;quot; and rebuild your project (or create a new project and use the &amp;quot;Using wxWidgets DLL&amp;quot; project option which adds &amp;quot;-DWXUSINGDLL&amp;quot; to Project-&amp;gt;Build options-&amp;gt;Other options).&lt;br /&gt;
Other errors with the same resolution are:&lt;br /&gt;
'unresolved external symbol &amp;quot;char const * const wxEmptyString&amp;quot; (?wxEmptyString@@3PBDB)' or similar.&lt;br /&gt;
If you were using 1.0-finalbeta and were trying to build a statically linked wxWidgets project, the cause of the problem was some faulty templates. But that's fixed now.&lt;br /&gt;
&lt;br /&gt;
== I can't compile a multithreaded app with VC Toolkit! Where are the libraries? ==&lt;br /&gt;
&lt;br /&gt;
sorry, no fix for your problem...&lt;br /&gt;
&lt;br /&gt;
Your problem doesn't come from CodeBlocks. It exists, because the free VC toolkit (VCTK) doesn't provide all the libraries and tools which are coming with Visual C++ (VC) which isn't free, unfortunately.&lt;br /&gt;
&lt;br /&gt;
Try buying a full-fledged VC++, or even better, download MinGW :)&lt;br /&gt;
&lt;br /&gt;
The libraries that can be obtained free of charge are:&lt;br /&gt;
&lt;br /&gt;
Paths:&lt;br /&gt;
 (VCT3) Visual C++ Toolkit 2003 - C:\Program Files\Microsoft Visual C++ Toolkit 2003\lib&lt;br /&gt;
 (PSDK) Platform SDK - C:\Program Files\Microsoft Platform SDK\Lib&lt;br /&gt;
 (NSDK) .NET 1.1 SDK - C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\lib&lt;br /&gt;
&lt;br /&gt;
C runtime libs:&lt;br /&gt;
 LIBC.LIB 	Single-threaded, static link                                          (VCT3, NSDK)&lt;br /&gt;
 LIBCMT.LIB 	Multithreaded, static link                                            (VCT3, NSDK)&lt;br /&gt;
 MSVCRT.LIB 	Multithreaded, dynamic link (import library for MSVCR71.DLL)          (NSDK)&lt;br /&gt;
 LIBCD.LIB 	Single-threaded, static link (debug)                                  (VCT3, NSDK)&lt;br /&gt;
 LIBCMTD.LIB 	Multithreaded, static link (debug)                                    (NSDK)&lt;br /&gt;
 MSVCRTD.LIB 	Multithreaded, dynamic link (import library for MSVCR71D.DLL) (debug) (NSDK)&lt;br /&gt;
&lt;br /&gt;
C++ libs:&lt;br /&gt;
 LIBCP.LIB 	Single-threaded, static link                                          (VCT3, PSDK)&lt;br /&gt;
 LIBCPMT.LIB 	Multithreaded, static link                                            (VCT3)&lt;br /&gt;
 MSVCPRT.LIB 	Multithreaded, dynamic link (import library for MSVCP71.dll)          (none)&lt;br /&gt;
 LIBCPD.LIB 	Single-threaded, static link                                          (VCT3)&lt;br /&gt;
 LIBCPMTD.LIB 	Multithreaded, static link                                            (none)&lt;br /&gt;
 MSVCPRTD.LIB 	Multithreaded, dynamic link (import library for MSVCP71D.DLL)         (none)&lt;br /&gt;
&lt;br /&gt;
Try setting the library linker directories to:&lt;br /&gt;
 C:\Program Files\Microsoft Visual C++ Toolkit 2003\lib&lt;br /&gt;
 C:\Program Files\Microsoft Platform SDK\Lib&lt;br /&gt;
 C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\lib&lt;br /&gt;
in that order.&lt;br /&gt;
&lt;br /&gt;
The ones listed as (none) above are actually present in the IA64 and AMD64 subdirectories of the PSDK lib directory.  Not sure if these would work on 32-bit windows, however, they may if they are&lt;br /&gt;
meant to work in 32-bit compatibility mode on the 64-bit processors.  Worth a try.  Otherwise, you&lt;br /&gt;
can link statically to the C++ library instead of using MSVCP71.dll.  If you really want to link against MSVCP71.dll you can try to create MSVCP71.LIB from the dll using lib.exe and sed.  Search google for &amp;quot;exports.sed&amp;quot; for detailed steps.&lt;br /&gt;
&lt;br /&gt;
See also: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vclib/html/_crt_c_run.2d.time_libraries.asp&lt;br /&gt;
&lt;br /&gt;
== Where are the libraries for the OpenGL / SDL / etc. projects? ==&lt;br /&gt;
&lt;br /&gt;
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;
== Is it possible to use Visual C++ 6.0 with Code::Blocks? ==&lt;br /&gt;
&lt;br /&gt;
As they say in ##C++ on FreeNode:&amp;lt;br&amp;gt;&lt;br /&gt;
cylon&amp;gt; msvc++6 is not a C++ compiler. It was made before the C++ standard, so it compiles some language that isn't C++. Upgrade.&lt;/div&gt;</summary>
		<author><name>Me22</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=Unicode_Standards&amp;diff=1263</id>
		<title>Unicode Standards</title>
		<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php?title=Unicode_Standards&amp;diff=1263"/>
		<updated>2005-09-06T00:32:19Z</updated>

		<summary type="html">&lt;p&gt;Me22: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page is meant to be a location for developers to find all the current Unicode standards, or good practices, when editor and developing the Code::Blocks program.  I am going to try and summarize the discussions that I was pointed to here, but I am leaving out the original author.  Sorry  Feel free to edit this to improve it, or keep it up to date.  I am new to using wiki, so please exscuse the bad designs.  This is a a '''VERY''' rough draft with no clear organizational pattern. ~ Joe M.&lt;br /&gt;
&lt;br /&gt;
Actually, it's quite good.  I did a quick read-through as it looks fine to me.  All I did was add some things to the bottom. ~ me22&lt;br /&gt;
&lt;br /&gt;
reference: [http://www.wxwidgets.org/manuals/2.4.2/wx458.htm#unicode]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Macros ==&lt;br /&gt;
{NOTE: bullet list would look better here, but bold is used for now}&amp;lt;BR&amp;gt;&lt;br /&gt;
'''__TFILE__''' = wxWidgets provide equivilant to __FILE__&amp;lt;BR&amp;gt;&lt;br /&gt;
'''__TDATE__''' = wxWidgets provide equivilant to __DATE__&amp;lt;BR&amp;gt;&lt;br /&gt;
'''__TTIME__''' = wxWidgets provide equivilant to __TIME__&amp;lt;BR&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''_U()''' = Use it to convert non-literal char* strings to wxString. Use it for reading attributes from TiXmlNode's.  If you deal with functions that return strings, you must use our _U macro.&amp;lt;BR&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Code:&lt;br /&gt;
   #ifdef wxUSE_UNICODE&lt;br /&gt;
     #define _U(x) wxString((x),wxConvUTF8)&lt;br /&gt;
     #define _UU(x,y) wxString((x),y)&lt;br /&gt;
   #else&lt;br /&gt;
     #define _U(x) (x)&lt;br /&gt;
     #define _UU(x,y) (x)&lt;br /&gt;
   #endif&lt;br /&gt;
&lt;br /&gt;
i.e.:&lt;br /&gt;
Code:&lt;br /&gt;
   const char* incompatible = &amp;quot;This is an incompatible string&amp;quot;;&lt;br /&gt;
   wxString compatible = _U(incompatible);&lt;br /&gt;
&lt;br /&gt;
   // wxString conftype = conf-&amp;gt;Attribute(&amp;quot;ConfigurationType&amp;quot;); // before&lt;br /&gt;
   wxString conftype = _U(conf-&amp;gt;Attribute(&amp;quot;ConfigurationType&amp;quot;)); // after :)&lt;br /&gt;
&lt;br /&gt;
'''_C()''' = multibyte C string  see wxhelp (wxMBConv classes overview)&lt;br /&gt;
Use this one for interacting with APIs needing char const*s, such as saving things to tinyXML.&lt;br /&gt;
&lt;br /&gt;
Is defined in code as: &lt;br /&gt;
   #if wxUSE_UNICODE&lt;br /&gt;
      #define _UU(x,y) wxString((x),(y))&lt;br /&gt;
      #define _CC(x,y) (x).mb_str((y))&lt;br /&gt;
   #else&lt;br /&gt;
       #define _UU(x,y) (x)&lt;br /&gt;
       #define _CC(x,y) (x)&lt;br /&gt;
   #endif&lt;br /&gt;
&lt;br /&gt;
   #define _U(x) _UU((x),wxConvUTF8)&lt;br /&gt;
   #define _C(x) _CC((x),wxConvUTF8)&lt;br /&gt;
&lt;br /&gt;
'''_wxT()''' = fixed text's - like XRC resources object names (only adds an L before the string (ONLY if you're in a unicode build).)&amp;lt;BR&amp;gt;&lt;br /&gt;
wxT() is a macro which can be used with character and string literals (in other words, 'x' or &amp;quot;foo&amp;quot;) to automatically convert them to Unicode in Unicode build configuration. Please see the Unicode overview for more information.&lt;br /&gt;
&lt;br /&gt;
This macro is simply returns the value passed to it without changes in ASCII build. In fact, its definition is:&lt;br /&gt;
&lt;br /&gt;
   #ifdef UNICODE&lt;br /&gt;
   #define wxT(x) L ## x&lt;br /&gt;
   #else // !Unicode&lt;br /&gt;
   #define wxT(x) x&lt;br /&gt;
   #endif&amp;lt;BR&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''_T()''' = fixed text's - like XRC resources object names (only adds an L before the string (ONLY if you're in a unicode build).).&amp;lt;BR&amp;gt;&lt;br /&gt;
This macro is exactly the same as wxT and is defined in wxWidgets simply because it may be more intuitive for Windows programmers as the standard Win32 headers also define it (as well as yet another name for the same macro which is _TEXT()).&lt;br /&gt;
&lt;br /&gt;
Don't confuse this macro with _()!&amp;lt;BR&amp;gt;&lt;br /&gt;
   wxChar _T(char ch)&lt;br /&gt;
&lt;br /&gt;
   const wxChar * _T(const wxChar ch)&amp;lt;BR&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''_()''' = text's which might be translated to other user-languages&amp;lt;BR&amp;gt;&lt;br /&gt;
This macro expands into a call to wxGetTranslation function, so it marks the message for the extraction by xgettext just as wxTRANSLATE does, but also returns the translation of the string for the current locale during execution.&lt;br /&gt;
&lt;br /&gt;
Don't confuse this macro with _T()!&amp;lt;BR&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''wxPLURAL''' = This macro is identical to _() but for the plural variant of wxGetTranslation.&amp;lt;BR&amp;gt;&lt;br /&gt;
const wxChar * wxPLURAL(const char *sing, const char *plur, size_tn)&amp;lt;BR&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Guidlines ==&lt;br /&gt;
'''char &amp;amp; wxChar:'''&amp;lt;BR&amp;gt;&lt;br /&gt;
Do not use wxChar when is not a text character, because a wxChar in unicode is an int of 16 bits (not 8 bits):&lt;br /&gt;
&lt;br /&gt;
Example for text:&lt;br /&gt;
   wxChar im_a_character = _T('f');&lt;br /&gt;
&lt;br /&gt;
Example for not text (not character):&lt;br /&gt;
   char im_a_byte = 254;&lt;br /&gt;
but perhaps better would be to use:&lt;br /&gt;
   byte im_a_byte = 254;&lt;br /&gt;
so it's clear that it's a byte and not a character.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Other:'''&amp;lt;BR&amp;gt;&lt;br /&gt;
Problem code:&lt;br /&gt;
   // indent code accordingly&lt;br /&gt;
   wxString code = it-&amp;gt;second;&lt;br /&gt;
   code.Replace(&amp;quot;\n&amp;quot;, '\n' + lineIndent);&lt;br /&gt;
&lt;br /&gt;
Solution:&lt;br /&gt;
&amp;lt;nowiki&amp;gt;   If the input is a const char*, use &amp;quot;normal strings&amp;quot;. If the input is a wxChar or wxString, use the _T(&amp;quot;macros&amp;quot;).  For example:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
   // indent code accordingly&lt;br /&gt;
   wxString code = it-&amp;gt;second;&lt;br /&gt;
   code.Replace(_T(&amp;quot;\n&amp;quot;), _T('\n') + lineIndent);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Some of the strings already converted in C::B, use _( when they should be _T(.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
   WRONG: wxXmlResource::Get()-&amp;gt;LoadDialog(this, parent, _(&amp;quot;dlgGenericMultiSelect&amp;quot;));&lt;br /&gt;
&lt;br /&gt;
dlgGenericMultiSelect is a reference to a resource. Therefore it must use _T instead.&lt;br /&gt;
&lt;br /&gt;
   RIGHT: wxXmlResource::Get()-&amp;gt;LoadDialog(this, parent, _T(&amp;quot;dlgGenericMultiSelect&amp;quot;));&lt;br /&gt;
&lt;br /&gt;
And don't forget to test for single characters, too!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
All operations with wxStrings (not char*'s) should have _(&amp;quot;string&amp;quot;) for strings to be displayed to the user, and _T(&amp;quot;string&amp;quot;) for strings used internally.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Printf-like functions is - use c_str() (in examples in wxwidgets.org there are used different arguments for unicode and non-unicode versions where formating string was both &amp;quot;%s&amp;quot;).  For example:&lt;br /&gt;
&lt;br /&gt;
   tmpkey.Printf(_T(&amp;quot;%s/editor/keywords/%d&amp;quot;), key.c_str(), i);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''XRCID and XRCCTRL macros:'''&amp;lt;BR&amp;gt;&lt;br /&gt;
XRCID and XRCCTRL macros must _NOT_ be converted! They're pre-converted already!&lt;br /&gt;
&lt;br /&gt;
   WRONG:   XRCCTRL(*this, _T(&amp;quot;lblLabel&amp;quot;), wxStaticText)-&amp;gt;SetLabel(label);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   RIGHT:   XRCCTRL(*this, &amp;quot;lblLabel&amp;quot;, wxStaticText)-&amp;gt;SetLabel(label);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''concatenated strings:'''&amp;lt;BR&amp;gt;&lt;br /&gt;
_() is macro which calls one of wxWidget's internal function so concatenating should look like this:&lt;br /&gt;
&lt;br /&gt;
   _(&amp;quot;string 1&amp;quot; &amp;quot;string2&amp;quot; ... )&lt;br /&gt;
&lt;br /&gt;
_T() macro simply adds 'L' before string given as a param (in Unicode of course, in normal mode it do nothing with the string) so concatenation should be:&lt;br /&gt;
&lt;br /&gt;
   _T(&amp;quot;string1&amp;quot;) _T(&amp;quot;string2&amp;quot;) ...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Gotchas ==&lt;br /&gt;
&lt;br /&gt;
'''_C() can return a proxy, not nessesarily a char const*'''&lt;br /&gt;
&lt;br /&gt;
Don't write code like&lt;br /&gt;
Code:&lt;br /&gt;
 char const * psz = _C( str ); // formerly str.mb_str(wxConvUTF8);&lt;br /&gt;
&lt;br /&gt;
_C(), in unicode mode, returns a buffer, not a raw pointer.  This is a good thing because the buffer's destructor takes care of freeing the memory used by the string.  This buffer is implicitly convertible to a char const* so that it can be used in things like strlen( str.mb_str() ) immediatly, but that opens up the error I'm warning about in this post.&lt;br /&gt;
&lt;br /&gt;
What actually happens in the above code?  wxString::mb_str() returns a buffer object.  Said buffer's implicit conversion to char const* is activated, and the result is stored in psz.  The temporary buffer then GOES OUT OF SCOPE and ITS DESTRUCTOR DELETES THE MEMORY.  It seems that windows doesn't care, but that linux often has already reused the memory by the time psz is used again in the code.&lt;br /&gt;
&lt;br /&gt;
Solution:&lt;br /&gt;
Code:&lt;br /&gt;
 wxWX2MBbuf psz = str.mb_str(wxConvUTF8);&lt;br /&gt;
wxWX2MBbuf takes ownership of the buffer ( no, it's not copied -- it's transfer of ownership semantics similar to std::auto_ptr ).  That way you can actually use the memory until psz goes out of scope and deletes it.&lt;br /&gt;
&lt;br /&gt;
'''Printf uses wxChars'''&lt;br /&gt;
&lt;br /&gt;
When using wxString::Printf, %s wants wxChar const*, so just use .c_str().  This is important to watch out for because Printf uses varargs, which aren't typesafe, so the copmiler doesn't catch the error.  If, for example, Mandrav uses .mb_str(), the compiler wont say anything because mb_str() is the same as c_str() in non-unicode mode, returning a char const*.  However, when me22 runs it in Unicode mode, mb_str() returns a proxy ( see above ), which can't be passed through a vararg and the program crashes at runtime.&lt;br /&gt;
&lt;br /&gt;
'''Streaming a plain char fails silently'''&lt;br /&gt;
&lt;br /&gt;
This one was the source of the mysterious bug that replaced all the )'s in the class browser with 41's :P&lt;br /&gt;
&lt;br /&gt;
Problem:&lt;br /&gt;
In unicode, the following compiles fine and doesn't crash:&lt;br /&gt;
 my_stream &amp;lt;&amp;lt; '\n';&lt;br /&gt;
However, my_stream traffics in wxChars, and '\n' is a plain char.  This means that integer promotion is applied to '\n', so the effect is as if the code were:&lt;br /&gt;
 my_stream &amp;lt;&amp;lt; static_cast&amp;lt;int&amp;gt;('\n');&lt;br /&gt;
Which shows a number, instead of the character.&lt;br /&gt;
&lt;br /&gt;
Solution:&lt;br /&gt;
Don't forget the _T()s!&lt;br /&gt;
Alternatively, use &amp;quot;\n&amp;quot; instead, which the compiler doesn't silently convert, so an easy-to-stop&amp;amp;fix compile error will occur.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This need to be rewritten.  If nobody else improves on this, I will try and rewrite this once I have used these macros more.  Joe M.&lt;/div&gt;</summary>
		<author><name>Me22</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=Unicode_Standards&amp;diff=192</id>
		<title>Unicode Standards</title>
		<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php?title=Unicode_Standards&amp;diff=192"/>
		<updated>2005-09-05T23:27:06Z</updated>

		<summary type="html">&lt;p&gt;Me22: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page is meant to be a location for developers to find all the current Unicode standards, or good practices, when editor and developing the Code::Blocks program.  I am going to try and summarize the discussions that I was pointed to here, but I am leaving out the original author.  Sorry  Feel free to edit this to improve it, or keep it up to date.  I am new to using wiki, so please exscuse the bad designs.  This is a a '''VERY''' rough draft with no clear organizational pattern. ~ Joe M.&lt;br /&gt;
Actually, it's quite good.  I did a quick read-through as it looks fine to me.  All I did was add some things to the bottom. ~ me22&lt;br /&gt;
&lt;br /&gt;
reference: [http://www.wxwidgets.org/manuals/2.4.2/wx458.htm#unicode]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Macros ==&lt;br /&gt;
{NOTE: bullet list would look better here, but bold is used for now}&amp;lt;BR&amp;gt;&lt;br /&gt;
'''__TFILE__''' = wxWidgets provide equivilant to __FILE__&amp;lt;BR&amp;gt;&lt;br /&gt;
'''__TDATE__''' = wxWidgets provide equivilant to __DATE__&amp;lt;BR&amp;gt;&lt;br /&gt;
'''__TTIME__''' = wxWidgets provide equivilant to __TIME__&amp;lt;BR&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''_U()''' = Use it to convert non-literal char* strings to wxString. Use it for reading attributes from TiXmlNode's.  If you deal with functions that return strings, you must use our _U macro.&amp;lt;BR&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Code:&lt;br /&gt;
   #ifdef wxUSE_UNICODE&lt;br /&gt;
     #define _U(x) wxString((x),wxConvUTF8)&lt;br /&gt;
     #define _UU(x,y) wxString((x),y)&lt;br /&gt;
   #else&lt;br /&gt;
     #define _U(x) (x)&lt;br /&gt;
     #define _UU(x,y) (x)&lt;br /&gt;
   #endif&lt;br /&gt;
&lt;br /&gt;
i.e.:&lt;br /&gt;
Code:&lt;br /&gt;
   const char* incompatible = &amp;quot;This is an incompatible string&amp;quot;;&lt;br /&gt;
   wxString compatible = _U(incompatible);&lt;br /&gt;
&lt;br /&gt;
   // wxString conftype = conf-&amp;gt;Attribute(&amp;quot;ConfigurationType&amp;quot;); // before&lt;br /&gt;
   wxString conftype = _U(conf-&amp;gt;Attribute(&amp;quot;ConfigurationType&amp;quot;)); // after :)&lt;br /&gt;
&lt;br /&gt;
'''_C()''' = multibyte C string  see wxhelp (wxMBConv classes overview)&lt;br /&gt;
Use this one for interacting with APIs needing char const*s, such as saving things to tinyXML.&lt;br /&gt;
&lt;br /&gt;
Is defined in code as: &lt;br /&gt;
   #if wxUSE_UNICODE&lt;br /&gt;
      #define _UU(x,y) wxString((x),(y))&lt;br /&gt;
      #define _CC(x,y) (x).mb_str((y))&lt;br /&gt;
   #else&lt;br /&gt;
       #define _UU(x,y) (x)&lt;br /&gt;
       #define _CC(x,y) (x)&lt;br /&gt;
   #endif&lt;br /&gt;
&lt;br /&gt;
   #define _U(x) _UU((x),wxConvUTF8)&lt;br /&gt;
   #define _C(x) _CC((x),wxConvUTF8)&lt;br /&gt;
&lt;br /&gt;
'''_wxT()''' = fixed text's - like XRC resources object names (only adds an L before the string (ONLY if you're in a unicode build).)&amp;lt;BR&amp;gt;&lt;br /&gt;
wxT() is a macro which can be used with character and string literals (in other words, 'x' or &amp;quot;foo&amp;quot;) to automatically convert them to Unicode in Unicode build configuration. Please see the Unicode overview for more information.&lt;br /&gt;
&lt;br /&gt;
This macro is simply returns the value passed to it without changes in ASCII build. In fact, its definition is:&lt;br /&gt;
&lt;br /&gt;
   #ifdef UNICODE&lt;br /&gt;
   #define wxT(x) L ## x&lt;br /&gt;
   #else // !Unicode&lt;br /&gt;
   #define wxT(x) x&lt;br /&gt;
   #endif&amp;lt;BR&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''_T()''' = fixed text's - like XRC resources object names (only adds an L before the string (ONLY if you're in a unicode build).).&amp;lt;BR&amp;gt;&lt;br /&gt;
This macro is exactly the same as wxT and is defined in wxWidgets simply because it may be more intuitive for Windows programmers as the standard Win32 headers also define it (as well as yet another name for the same macro which is _TEXT()).&lt;br /&gt;
&lt;br /&gt;
Don't confuse this macro with _()!&amp;lt;BR&amp;gt;&lt;br /&gt;
   wxChar _T(char ch)&lt;br /&gt;
&lt;br /&gt;
   const wxChar * _T(const wxChar ch)&amp;lt;BR&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''_()''' = text's which might be translated to other user-languages&amp;lt;BR&amp;gt;&lt;br /&gt;
This macro expands into a call to wxGetTranslation function, so it marks the message for the extraction by xgettext just as wxTRANSLATE does, but also returns the translation of the string for the current locale during execution.&lt;br /&gt;
&lt;br /&gt;
Don't confuse this macro with _T()!&amp;lt;BR&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''wxPLURAL''' = This macro is identical to _() but for the plural variant of wxGetTranslation.&amp;lt;BR&amp;gt;&lt;br /&gt;
const wxChar * wxPLURAL(const char *sing, const char *plur, size_tn)&amp;lt;BR&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Guidlines ==&lt;br /&gt;
'''char &amp;amp; wxChar:'''&amp;lt;BR&amp;gt;&lt;br /&gt;
Do not use wxChar when is not a text character, because a wxChar in unicode is an int of 16 bits (not 8 bits):&lt;br /&gt;
&lt;br /&gt;
Example for text:&lt;br /&gt;
   wxChar im_a_character = _T('f');&lt;br /&gt;
&lt;br /&gt;
Example for not text (not character):&lt;br /&gt;
   char im_a_byte = 254;&lt;br /&gt;
but perhaps better would be to use:&lt;br /&gt;
   byte im_a_byte = 254;&lt;br /&gt;
so it's clear that it's a byte and not a character.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Other:'''&amp;lt;BR&amp;gt;&lt;br /&gt;
Problem code:&lt;br /&gt;
   // indent code accordingly&lt;br /&gt;
   wxString code = it-&amp;gt;second;&lt;br /&gt;
   code.Replace(&amp;quot;\n&amp;quot;, '\n' + lineIndent);&lt;br /&gt;
&lt;br /&gt;
Solution:&lt;br /&gt;
&amp;lt;nowiki&amp;gt;   If the input is a const char*, use &amp;quot;normal strings&amp;quot;. If the input is a wxChar or wxString, use the _T(&amp;quot;macros&amp;quot;).  For example:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
   // indent code accordingly&lt;br /&gt;
   wxString code = it-&amp;gt;second;&lt;br /&gt;
   code.Replace(_T(&amp;quot;\n&amp;quot;), _T('\n') + lineIndent);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Some of the strings already converted in C::B, use _( when they should be _T(.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
   WRONG: wxXmlResource::Get()-&amp;gt;LoadDialog(this, parent, _(&amp;quot;dlgGenericMultiSelect&amp;quot;));&lt;br /&gt;
&lt;br /&gt;
dlgGenericMultiSelect is a reference to a resource. Therefore it must use _T instead.&lt;br /&gt;
&lt;br /&gt;
   RIGHT: wxXmlResource::Get()-&amp;gt;LoadDialog(this, parent, _T(&amp;quot;dlgGenericMultiSelect&amp;quot;));&lt;br /&gt;
&lt;br /&gt;
And don't forget to test for single characters, too!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
All operations with wxStrings (not char*'s) should have _(&amp;quot;string&amp;quot;) for strings to be displayed to the user, and _T(&amp;quot;string&amp;quot;) for strings used internally.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Printf-like functions is - use c_str() (in examples in wxwidgets.org there are used different arguments for unicode and non-unicode versions where formating string was both &amp;quot;%s&amp;quot;).  For example:&lt;br /&gt;
&lt;br /&gt;
   tmpkey.Printf(_T(&amp;quot;%s/editor/keywords/%d&amp;quot;), key.c_str(), i);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''XRCID and XRCCTRL macros:'''&amp;lt;BR&amp;gt;&lt;br /&gt;
XRCID and XRCCTRL macros must _NOT_ be converted! They're pre-converted already!&lt;br /&gt;
&lt;br /&gt;
   WRONG:   XRCCTRL(*this, _T(&amp;quot;lblLabel&amp;quot;), wxStaticText)-&amp;gt;SetLabel(label);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   RIGHT:   XRCCTRL(*this, &amp;quot;lblLabel&amp;quot;, wxStaticText)-&amp;gt;SetLabel(label);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''concatenated strings:'''&amp;lt;BR&amp;gt;&lt;br /&gt;
_() is macro which calls one of wxWidget's internal function so concatenating should look like this:&lt;br /&gt;
&lt;br /&gt;
   _(&amp;quot;string 1&amp;quot; &amp;quot;string2&amp;quot; ... )&lt;br /&gt;
&lt;br /&gt;
_T() macro simply adds 'L' before string given as a param (in Unicode of course, in normal mode it do nothing with the string) so concatenation should be:&lt;br /&gt;
&lt;br /&gt;
   _T(&amp;quot;string1&amp;quot;) _T(&amp;quot;string2&amp;quot;) ...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Gotchas ==&lt;br /&gt;
&lt;br /&gt;
'''_C() can return a proxy, not nessesarily a char const*'''&lt;br /&gt;
&lt;br /&gt;
Don't write code like&lt;br /&gt;
Code:&lt;br /&gt;
 char const * psz = _C( str ); // formerly str.mb_str(wxConvUTF8);&lt;br /&gt;
&lt;br /&gt;
_C(), in unicode mode, returns a buffer, not a raw pointer.  This is a good thing because the buffer's destructor takes care of freeing the memory used by the string.  This buffer is implicitly convertible to a char const* so that it can be used in things like strlen( str.mb_str() ) immediatly, but that opens up the error I'm warning about in this post.&lt;br /&gt;
&lt;br /&gt;
What actually happens in the above code?  wxString::mb_str() returns a buffer object.  Said buffer's implicit conversion to char const* is activated, and the result is stored in psz.  The temporary buffer then GOES OUT OF SCOPE and ITS DESTRUCTOR DELETES THE MEMORY.  It seems that windows doesn't care, but that linux often has already reused the memory by the time psz is used again in the code.&lt;br /&gt;
&lt;br /&gt;
Solution:&lt;br /&gt;
Code:&lt;br /&gt;
 wxWX2MBbuf psz = str.mb_str(wxConvUTF8);&lt;br /&gt;
wxWX2MBbuf takes ownership of the buffer ( no, it's not copied -- it's transfer of ownership semantics similar to std::auto_ptr ).  That way you can actually use the memory until psz goes out of scope and deletes it.&lt;br /&gt;
&lt;br /&gt;
'''Printf uses wxChars'''&lt;br /&gt;
&lt;br /&gt;
When using wxString::Printf, %s wants wxChar const*, so just use .c_str().  This is important to watch out for because Printf uses varargs, which aren't typesafe, so the copmiler doesn't catch the error.  If, for example, Mandrav uses .mb_str(), the compiler wont say anything because mb_str() is the same as c_str() in non-unicode mode, returning a char const*.  However, when me22 runs it in Unicode mode, mb_str() returns a proxy ( see above ), which can't be passed through a vararg and the program crashes at runtime.&lt;br /&gt;
&lt;br /&gt;
'''Streaming a plain char fails silently'''&lt;br /&gt;
&lt;br /&gt;
This one was the source of the mysterious bug that replaced all the )'s in the class browser with 41's :P&lt;br /&gt;
&lt;br /&gt;
Problem:&lt;br /&gt;
In unicode, the following compiles fine and doesn't crash:&lt;br /&gt;
 my_stream &amp;lt;&amp;lt; '\n';&lt;br /&gt;
However, my_stream traffics in wxChars, and '\n' is a plain char.  This means that integer promotion is applied to '\n', so the effect is as if the code were:&lt;br /&gt;
 my_stream &amp;lt;&amp;lt; static_cast&amp;lt;int&amp;gt;('\n');&lt;br /&gt;
Which shows a number, instead of the character.&lt;br /&gt;
&lt;br /&gt;
Solution:&lt;br /&gt;
Don't forget the _T()s!&lt;br /&gt;
Alternatively, use &amp;quot;\n&amp;quot; instead, which the compiler doesn't silently convert, so an easy-to-stop&amp;amp;fix compile error will occur.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This need to be rewritten.  If nobody else improves on this, I will try and rewrite this once I have used these macros more.  Joe M.&lt;/div&gt;</summary>
		<author><name>Me22</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=Unicode_Standards&amp;diff=191</id>
		<title>Unicode Standards</title>
		<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php?title=Unicode_Standards&amp;diff=191"/>
		<updated>2005-09-05T23:21:04Z</updated>

		<summary type="html">&lt;p&gt;Me22: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page is meant to be a location for developers to find all the current Unicode standards, or good practices, when editor and developing the Code::Blocks program.  I am going to try and summarize the discussions that I was pointed to here, but I am leaving out the original author.  Sorry  Feel free to edit this to improve it, or keep it up to date.  I am new to using wiki, so please exscuse the bad designs.  This is a a '''VERY''' rough draft with no clear organizational pattern.&amp;lt;BR&amp;gt;&lt;br /&gt;
&amp;lt;nowiki&amp;gt;     -- Joe M.&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
Actually, it's quite good.  I did a quick read-through as it looks fine to me.  All I did was add some things to the bottom. ~ me22&lt;br /&gt;
&lt;br /&gt;
reference: [http://www.wxwidgets.org/manuals/2.4.2/wx458.htm#unicode]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Macros ==&lt;br /&gt;
{NOTE: bullet list would look better here, but bold is used for now}&amp;lt;BR&amp;gt;&lt;br /&gt;
'''__TFILE__''' = wxWidgets provide equivilant to __FILE__&amp;lt;BR&amp;gt;&lt;br /&gt;
'''__TDATE__''' = wxWidgets provide equivilant to __DATE__&amp;lt;BR&amp;gt;&lt;br /&gt;
'''__TTIME__''' = wxWidgets provide equivilant to __TIME__&amp;lt;BR&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''_U()''' = Use it to convert non-literal char* strings to wxString. Use it for reading attributes from TiXmlNode's.  If you deal with functions that return strings, you must use our _U macro.&amp;lt;BR&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Code:&lt;br /&gt;
   #ifdef wxUSE_UNICODE&lt;br /&gt;
     #define _U(x) wxString((x),wxConvUTF8)&lt;br /&gt;
     #define _UU(x,y) wxString((x),y)&lt;br /&gt;
   #else&lt;br /&gt;
     #define _U(x) (x)&lt;br /&gt;
     #define _UU(x,y) (x)&lt;br /&gt;
   #endif&lt;br /&gt;
&lt;br /&gt;
i.e.:&lt;br /&gt;
Code:&lt;br /&gt;
   const char* incompatible = &amp;quot;This is an incompatible string&amp;quot;;&lt;br /&gt;
   wxString compatible = _U(incompatible);&lt;br /&gt;
&lt;br /&gt;
   // wxString conftype = conf-&amp;gt;Attribute(&amp;quot;ConfigurationType&amp;quot;); // before&lt;br /&gt;
   wxString conftype = _U(conf-&amp;gt;Attribute(&amp;quot;ConfigurationType&amp;quot;)); // after :)&lt;br /&gt;
&lt;br /&gt;
'''_C()''' = multibyte C string  see wxhelp (wxMBConv classes overview)&lt;br /&gt;
Use this one for interacting with APIs needing char const*s, such as saving things to tinyXML.&lt;br /&gt;
&lt;br /&gt;
Is defined in code as: &lt;br /&gt;
   #if wxUSE_UNICODE&lt;br /&gt;
      #define _UU(x,y) wxString((x),(y))&lt;br /&gt;
      #define _CC(x,y) (x).mb_str((y))&lt;br /&gt;
   #else&lt;br /&gt;
       #define _UU(x,y) (x)&lt;br /&gt;
       #define _CC(x,y) (x)&lt;br /&gt;
   #endif&lt;br /&gt;
&lt;br /&gt;
   #define _U(x) _UU((x),wxConvUTF8)&lt;br /&gt;
   #define _C(x) _CC((x),wxConvUTF8)&lt;br /&gt;
&lt;br /&gt;
'''_wxT()''' = fixed text's - like XRC resources object names (only adds an L before the string (ONLY if you're in a unicode build).)&amp;lt;BR&amp;gt;&lt;br /&gt;
wxT() is a macro which can be used with character and string literals (in other words, 'x' or &amp;quot;foo&amp;quot;) to automatically convert them to Unicode in Unicode build configuration. Please see the Unicode overview for more information.&lt;br /&gt;
&lt;br /&gt;
This macro is simply returns the value passed to it without changes in ASCII build. In fact, its definition is:&lt;br /&gt;
&lt;br /&gt;
   #ifdef UNICODE&lt;br /&gt;
   #define wxT(x) L ## x&lt;br /&gt;
   #else // !Unicode&lt;br /&gt;
   #define wxT(x) x&lt;br /&gt;
   #endif&amp;lt;BR&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''_T()''' = fixed text's - like XRC resources object names (only adds an L before the string (ONLY if you're in a unicode build).).&amp;lt;BR&amp;gt;&lt;br /&gt;
This macro is exactly the same as wxT and is defined in wxWidgets simply because it may be more intuitive for Windows programmers as the standard Win32 headers also define it (as well as yet another name for the same macro which is _TEXT()).&lt;br /&gt;
&lt;br /&gt;
Don't confuse this macro with _()!&amp;lt;BR&amp;gt;&lt;br /&gt;
   wxChar _T(char ch)&lt;br /&gt;
&lt;br /&gt;
   const wxChar * _T(const wxChar ch)&amp;lt;BR&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''_()''' = text's which might be translated to other user-languages&amp;lt;BR&amp;gt;&lt;br /&gt;
This macro expands into a call to wxGetTranslation function, so it marks the message for the extraction by xgettext just as wxTRANSLATE does, but also returns the translation of the string for the current locale during execution.&lt;br /&gt;
&lt;br /&gt;
Don't confuse this macro with _T()!&amp;lt;BR&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''wxPLURAL''' = This macro is identical to _() but for the plural variant of wxGetTranslation.&amp;lt;BR&amp;gt;&lt;br /&gt;
const wxChar * wxPLURAL(const char *sing, const char *plur, size_tn)&amp;lt;BR&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Guidlines ==&lt;br /&gt;
'''char &amp;amp; wxChar:'''&amp;lt;BR&amp;gt;&lt;br /&gt;
Do not use wxChar when is not a text character, because a wxChar in unicode is an int of 16 bits (not 8 bits):&lt;br /&gt;
&lt;br /&gt;
Example for text:&lt;br /&gt;
   wxChar im_a_character = _T('f');&lt;br /&gt;
&lt;br /&gt;
Example for not text (not character):&lt;br /&gt;
   char im_a_byte = 254;&lt;br /&gt;
but perhaps better would be to use:&lt;br /&gt;
   byte im_a_byte = 254;&lt;br /&gt;
so it's clear that it's a byte and not a character.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Other:'''&amp;lt;BR&amp;gt;&lt;br /&gt;
Problem code:&lt;br /&gt;
   // indent code accordingly&lt;br /&gt;
   wxString code = it-&amp;gt;second;&lt;br /&gt;
   code.Replace(&amp;quot;\n&amp;quot;, '\n' + lineIndent);&lt;br /&gt;
&lt;br /&gt;
Solution:&lt;br /&gt;
&amp;lt;nowiki&amp;gt;   If the input is a const char*, use &amp;quot;normal strings&amp;quot;. If the input is a wxChar or wxString, use the _T(&amp;quot;macros&amp;quot;).  For example:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
   // indent code accordingly&lt;br /&gt;
   wxString code = it-&amp;gt;second;&lt;br /&gt;
   code.Replace(_T(&amp;quot;\n&amp;quot;), _T('\n') + lineIndent);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Some of the strings already converted in C::B, use _( when they should be _T(.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
   WRONG: wxXmlResource::Get()-&amp;gt;LoadDialog(this, parent, _(&amp;quot;dlgGenericMultiSelect&amp;quot;));&lt;br /&gt;
&lt;br /&gt;
dlgGenericMultiSelect is a reference to a resource. Therefore it must use _T instead.&lt;br /&gt;
&lt;br /&gt;
   RIGHT: wxXmlResource::Get()-&amp;gt;LoadDialog(this, parent, _T(&amp;quot;dlgGenericMultiSelect&amp;quot;));&lt;br /&gt;
&lt;br /&gt;
And don't forget to test for single characters, too!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
All operations with wxStrings (not char*'s) should have _(&amp;quot;string&amp;quot;) for strings to be displayed to the user, and _T(&amp;quot;string&amp;quot;) for strings used internally.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Printf-like functions is - use c_str() (in examples in wxwidgets.org there are used different arguments for unicode and non-unicode versions where formating string was both &amp;quot;%s&amp;quot;).  For example:&lt;br /&gt;
&lt;br /&gt;
   tmpkey.Printf(_T(&amp;quot;%s/editor/keywords/%d&amp;quot;), key.c_str(), i);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''XRCID and XRCCTRL macros:'''&amp;lt;BR&amp;gt;&lt;br /&gt;
XRCID and XRCCTRL macros must _NOT_ be converted! They're pre-converted already!&lt;br /&gt;
&lt;br /&gt;
   WRONG:   XRCCTRL(*this, _T(&amp;quot;lblLabel&amp;quot;), wxStaticText)-&amp;gt;SetLabel(label);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   RIGHT:   XRCCTRL(*this, &amp;quot;lblLabel&amp;quot;, wxStaticText)-&amp;gt;SetLabel(label);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''concatenated strings:'''&amp;lt;BR&amp;gt;&lt;br /&gt;
_() is macro which calls one of wxWidget's internal function so concatenating should look like this:&lt;br /&gt;
&lt;br /&gt;
   _(&amp;quot;string 1&amp;quot; &amp;quot;string2&amp;quot; ... )&lt;br /&gt;
&lt;br /&gt;
_T() macro simply adds 'L' before string given as a param (in Unicode of course, in normal mode it do nothing with the string) so concatenation should be:&lt;br /&gt;
&lt;br /&gt;
   _T(&amp;quot;string1&amp;quot;) _T(&amp;quot;string2&amp;quot;) ...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Gotchas ==&lt;br /&gt;
&lt;br /&gt;
'''_C() can return a proxy, not nessesarily a char const*'''&lt;br /&gt;
&lt;br /&gt;
Don't write code like&lt;br /&gt;
Code:&lt;br /&gt;
 char const * psz = _C( str ); // formerly str.mb_str(wxConvUTF8);&lt;br /&gt;
&lt;br /&gt;
_C(), in unicode mode, returns a buffer, not a raw pointer.  This is a good thing because the buffer's destructor takes care of freeing the memory used by the string.  This buffer is implicitly convertible to a char const* so that it can be used in things like strlen( str.mb_str() ) immediatly, but that opens up the error I'm warning about in this post.&lt;br /&gt;
&lt;br /&gt;
What actually happens in the above code?  wxString::mb_str() returns a buffer object.  Said buffer's implicit conversion to char const* is activated, and the result is stored in psz.  The temporary buffer then GOES OUT OF SCOPE and ITS DESTRUCTOR DELETES THE MEMORY.  It seems that windows doesn't care, but that linux often has already reused the memory by the time psz is used again in the code.&lt;br /&gt;
&lt;br /&gt;
Solution:&lt;br /&gt;
Code:&lt;br /&gt;
 wxWX2MBbuf psz = str.mb_str(wxConvUTF8);&lt;br /&gt;
wxWX2MBbuf takes ownership of the buffer ( no, it's not copied -- it's transfer of ownership semantics similar to std::auto_ptr ).  That way you can actually use the memory until psz goes out of scope and deletes it.&lt;br /&gt;
&lt;br /&gt;
'''Printf uses wxChars'''&lt;br /&gt;
&lt;br /&gt;
When using wxString::Printf, %s wants wxChar const*, so just use .c_str().  This is important to watch out for because Printf uses varargs, which aren't typesafe, so the copmiler doesn't catch the error.  If, for example, Mandrav uses .mb_str(), the compiler wont say anything because mb_str() is the same as c_str() in non-unicode mode, returning a char const*.  However, when me22 runs it in Unicode mode, mb_str() returns a proxy ( see above ), which can't be passed through a vararg and the program crashes at runtime.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This need to be rewritten.  If nobody else improves on this, I will try and rewrite this once I have used these macros more.  Joe M.&lt;/div&gt;</summary>
		<author><name>Me22</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=Tips%27n%27Tricks&amp;diff=104</id>
		<title>Tips'n'Tricks</title>
		<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php?title=Tips%27n%27Tricks&amp;diff=104"/>
		<updated>2005-07-03T06:02:54Z</updated>

		<summary type="html">&lt;p&gt;Me22: /* Personalities */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;====[[Personalities]]====&lt;br /&gt;
====[[Fixing Internal Errors]]====&lt;/div&gt;</summary>
		<author><name>Me22</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=Installing_Code::Blocks_from_source_on_Gentoo&amp;diff=234</id>
		<title>Installing Code::Blocks from source on Gentoo</title>
		<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php?title=Installing_Code::Blocks_from_source_on_Gentoo&amp;diff=234"/>
		<updated>2005-06-19T05:14:27Z</updated>

		<summary type="html">&lt;p&gt;Me22: /* Option 2: Fetch from CVS */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''WORK IN PROGRESS'''&lt;br /&gt;
&lt;br /&gt;
( Note: This is non-official and unverified.  It worked for me, but... )&lt;br /&gt;
&lt;br /&gt;
===Prepare Libraries===&lt;br /&gt;
&lt;br /&gt;
Code::Blocks uses the [http://www.wxwindows.org/ wxWidgets] library for its GUI.  wxWidgets is turn uses [http://www.gtk.org/ GTK+]. GTK+ is the library the GNOME desktop uses, but GNOME is not required to use it. In fact, odds are very good that if you have a number of GUI programs installed, you already have it. wxWidgets is also very common, if slightly less so.  The trick with wxWidgets and Code::Blocks is that Code::Blocks can only use the gtk2, non-unicode version of wxWidgets&lt;br /&gt;
&lt;br /&gt;
This means that you need to compile the wxGTK package with the following use flags settings:&lt;br /&gt;
 +no_wxgtk1 +gtk2 -unicode&lt;br /&gt;
The best way of getting these set is by adding a line to /etc/portage/package.use and recompiling wxGTK :&lt;br /&gt;
 # echo x11-libs/wxGTK no_wxgtk1 gtk2 -unicode &amp;gt;&amp;gt; /etc/portage/package.use&lt;br /&gt;
 # emerge wxGTK&lt;br /&gt;
&lt;br /&gt;
===Get the source code===&lt;br /&gt;
&lt;br /&gt;
For this you have 2 options:&lt;br /&gt;
&lt;br /&gt;
====Option 1: Download a source tarball.====&lt;br /&gt;
&lt;br /&gt;
This is easy and means you have an easily-reproduced source set.&lt;br /&gt;
&lt;br /&gt;
1) '''Download a source tarball''' from [https://www.codeblocks.org/modules.php?op=modload&amp;amp;name=Downloads&amp;amp;file=index&amp;amp;req=viewsdownload&amp;amp;sid=3 The Download Section of CodeBlocks.org]&lt;br /&gt;
&lt;br /&gt;
2) '''Extract it'''. For this tutorial, I'm going to assume that you're installing as root, so /usr/local/src is a good pick. Any location is fine, however. This should create a CodeBlocks-1.0-beta5 ( or similar ) folder.&lt;br /&gt;
&lt;br /&gt;
====Option 2: Fetch from CVS====&lt;br /&gt;
&lt;br /&gt;
This is not signifigantly harder and means you have a more up-to-date version of the source code.  Usually this means more features and different bugs, which might be more or less annoying.&lt;br /&gt;
&lt;br /&gt;
1) '''Install the CVS client'''.  You might have it already.  If not, this just requires the usual :&lt;br /&gt;
 # emerge dev-util/cvs&lt;br /&gt;
&lt;br /&gt;
2) '''Set the CVS root'''. Run the following command, and enter the password ''anonymous'' when asked :&lt;br /&gt;
 # cvs -d :pserver:anonymous@cvs.sourceforge.net:/cvsroot/codeblocks login&lt;br /&gt;
Note that simply hitting enter--not entering a password--might also work.&lt;br /&gt;
&lt;br /&gt;
3) '''Checkout a copy'''. cd to the directory you want the code to be placed in.  Note that CVS will create a codeblocks directory for you. For this tutorial, I'm going to assume that you're installing as root, so /usr/local/src is a good pick. Any location is fine, however.&lt;br /&gt;
 # cd /usr/local/src&lt;br /&gt;
The following command fetches the source from the CVS server :&lt;br /&gt;
 # cvs -d :pserver:anonymous@cvs.sourceforge.net:/cvsroot/codeblocks checkout codeblocks&lt;br /&gt;
&lt;br /&gt;
===Compile the Code===&lt;br /&gt;
&lt;br /&gt;
1) '''cd to the directory with the Makefile'''.  Following our example, from CVS this would be /usr/local/src/codeblocks/src; from a tarball, something like /usr/local/src/CodeBlocks-1.0-beta5 :&lt;br /&gt;
 # cd /usr/local/src/codeblocks/src&lt;br /&gt;
 or&lt;br /&gt;
 # cd /usr/local/src/CodeBlocks-1.0-beta5&lt;br /&gt;
If neither of those works, you can always use find to look for it :&lt;br /&gt;
 # find &amp;lt;parent directory you extracted to&amp;gt; -name Makefile.unix&lt;br /&gt;
&lt;br /&gt;
2) '''Build the sources'''.  There's no configuration nessesary, just let make go to work :&lt;br /&gt;
 # make -f Makefile.unix&lt;br /&gt;
 # make -f Makefile.unix update&lt;br /&gt;
The first line does the actual compiling.  The second moves the nessesary things to the output directory, zips some resources, and performs other miscellaneous nessesary tasks.&lt;br /&gt;
&lt;br /&gt;
'''Note:''' The &amp;quot;update&amp;quot; script seems to be using Dos character encoding, which will result in its failure to run on Linux. To fix this, use dos2unix:&lt;br /&gt;
 # emerge -av dos2unix&lt;br /&gt;
This will install dos2unix. Now we are ready to convert the script.&lt;br /&gt;
 # dos2unix -n update update.unix&lt;br /&gt;
 # chmod +x update.unix&lt;br /&gt;
 # ./update.unix&lt;br /&gt;
The first line converts the script character encoding, the second makes it executable and the third runs it. This trick is from a forum post by ilkapo.&lt;br /&gt;
&lt;br /&gt;
===More===&lt;br /&gt;
&lt;br /&gt;
to come&lt;br /&gt;
&lt;br /&gt;
For now ( assuming bash shell ):&lt;br /&gt;
 $ cd /usr/local/src/codeblocks/src/output&lt;br /&gt;
 $ LD_LIBRARY_PATH=&amp;quot;.&amp;quot; ./codeblocks.exe&lt;br /&gt;
&lt;br /&gt;
===References===&lt;br /&gt;
&lt;br /&gt;
[https://www.codeblocks.org/index.php?name=PNphpBB2&amp;amp;file=viewtopic&amp;amp;t=29 Linux releases or compiling on Linux] from the forum&lt;br /&gt;
&lt;br /&gt;
[http://sourceforge.net/cvs/?group_id=126998 Code::Blocks : CVS access instructions]&lt;br /&gt;
&lt;br /&gt;
[http://sourceforge.net/docman/display_doc.php?docid=14033&amp;amp;group_id=1 Basic Introduction to CVS and SourceForge.net (SF.net) Project CVS Services]&lt;br /&gt;
&lt;br /&gt;
===Credits===&lt;br /&gt;
&lt;br /&gt;
Original Author: me22 ( me22.ca@gmail.com )&lt;/div&gt;</summary>
		<author><name>Me22</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=Main_Page&amp;diff=16</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php?title=Main_Page&amp;diff=16"/>
		<updated>2005-03-15T23:18:52Z</updated>

		<summary type="html">&lt;p&gt;Me22: /* Welcome to the official wiki site for Code::Blocks */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;!-- wiki user guide at [http://meta.wikipedia.org/wiki/MediaWiki_User%27s_Guide User's Guide] --&amp;gt;&lt;br /&gt;
= Welcome to the official wiki site for Code::Blocks =&lt;br /&gt;
[https://www.codeblocks.org Code::Blocks] is an open-source, cross-platform IDE (Integrated Development Environment). Using a plugin architecture, its capabilities and features are defined by the provided plugins. Currently, [https://www.codeblocks.org Code::Blocks] is oriented towards C/C++. At the time of this writing, five (5) major C/C++ compilers are supported:&lt;br /&gt;
* [http://gcc.gnu.org/ GNU GCC] (Linux)&lt;br /&gt;
* [http://www.mingw.org MinGW GCC] (Win32)&lt;br /&gt;
* [http://msdn.microsoft.com/visualc/vctoolkit2003 Microsoft's Visual C++ Free Toolkit 2003] (Win32)&lt;br /&gt;
* [http://www.borland.com/products/downloads/download_cbuilder.html# Borland's C++ Compiler 5.5] (Win32)&lt;br /&gt;
* [http://www.digitalmars.com/ DigitalMars] (Win32)&lt;br /&gt;
&lt;br /&gt;
This site does not hold much information yet but, with the help of the [https://www.codeblocks.org Code::Blocks] users, we hope it will soon be filled with articles, tutorials, FAQs, etc.&lt;br /&gt;
&lt;br /&gt;
== Table of contents ==&lt;br /&gt;
* [[Articles]]&lt;br /&gt;
* [[Tutorials]]&lt;br /&gt;
* [[FAQ]]&lt;br /&gt;
* [[Tips'n'Tricks]]&lt;br /&gt;
&lt;br /&gt;
The [https://www.codeblocks.org Code::Blocks] Team.&lt;/div&gt;</summary>
		<author><name>Me22</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=Installing_Code::Blocks_from_source_on_Gentoo&amp;diff=8</id>
		<title>Installing Code::Blocks from source on Gentoo</title>
		<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php?title=Installing_Code::Blocks_from_source_on_Gentoo&amp;diff=8"/>
		<updated>2005-03-15T23:10:13Z</updated>

		<summary type="html">&lt;p&gt;Me22: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''WORK IN PROGRESS'''&lt;br /&gt;
&lt;br /&gt;
( Note: This is non-official and unverified.  It worked for me, but... )&lt;br /&gt;
&lt;br /&gt;
===Prepare Libraries===&lt;br /&gt;
&lt;br /&gt;
Code::Blocks uses the [http://www.wxwindows.org/ wxWidgets] library for its GUI.  wxWidgets is turn uses [http://www.gtk.org/ GTK+]. GTK+ is the library the GNOME desktop uses, but GNOME is not required to use it. In fact, odds are very good that if you have a number of GUI programs installed, you already have it. wxWidgets is also very common, if slightly less so.  The trick with wxWidgets and Code::Blocks is that Code::Blocks can only use the gtk2, non-unicode version of wxWidgets&lt;br /&gt;
&lt;br /&gt;
This means that you need to compile the wxGTK package with the following use flags settings:&lt;br /&gt;
 +no_wxgtk1 +gtk2 -unicode&lt;br /&gt;
The best way of getting these set is by adding a line to /etc/portage/package.use and recompiling wxGTK :&lt;br /&gt;
 # echo x11-libs/wxGTK no_wxgtk1 gtk2 -unicode &amp;gt;&amp;gt; /etc/portage/package.use&lt;br /&gt;
 # emerge wxGTK&lt;br /&gt;
&lt;br /&gt;
===Get the source code===&lt;br /&gt;
&lt;br /&gt;
For this you have 2 options:&lt;br /&gt;
&lt;br /&gt;
====Option 1: Download a source tarball.====&lt;br /&gt;
&lt;br /&gt;
This is easy and means you have an easily-reproduced source set.&lt;br /&gt;
&lt;br /&gt;
1) '''Download a source tarball''' from [https://www.codeblocks.org/modules.php?op=modload&amp;amp;name=Downloads&amp;amp;file=index&amp;amp;req=viewsdownload&amp;amp;sid=3 The Download Section of CodeBlocks.org]&lt;br /&gt;
&lt;br /&gt;
2) '''Extract it'''. For this tutorial, I'm going to assume that you're installing as root, so /usr/local/src is a good pick. Any location is fine, however. This should create a CodeBlocks-1.0-beta5 ( or similar ) folder.&lt;br /&gt;
&lt;br /&gt;
====Option 2: Fetch from CVS====&lt;br /&gt;
&lt;br /&gt;
This is not signifigantly harder and means you have a more up-to-date version of the source code.  Usually this means more features and different bugs, which might be more or less annoying.&lt;br /&gt;
&lt;br /&gt;
1) '''Install the CVS client'''.  You might have it already.  If not, this just requires the usual :&lt;br /&gt;
 # emerge dev-util/cvs&lt;br /&gt;
&lt;br /&gt;
2) '''Set the CVS root'''. Run the following command, and enter the password ''anonymous'' when asked :&lt;br /&gt;
 # cvs -d :pserver:anonymous@cvs.sourceforge.net:/cvsroot/codeblocks login&lt;br /&gt;
&lt;br /&gt;
3) '''Checkout a copy'''. cd to the directory you want the code to be placed in.  Note that CVS will create a codeblocks directory for you. For this tutorial, I'm going to assume that you're installing as root, so /usr/local/src is a good pick. Any location is fine, however.&lt;br /&gt;
 # cd /usr/local/src&lt;br /&gt;
The following command fetches the source from the CVS server :&lt;br /&gt;
 # cvs -d :pserver:anonymous@cvs.sourceforge.net:/cvsroot/codeblocks checkout codeblocks&lt;br /&gt;
&lt;br /&gt;
===Compile the Code===&lt;br /&gt;
&lt;br /&gt;
1) '''cd to the directory with the Makefile'''.  From CVS this will be &amp;lt;?&amp;gt;; from a tarball, &amp;lt;?&amp;gt; :&lt;br /&gt;
 # cd &amp;lt;?&amp;gt;&lt;br /&gt;
 or&lt;br /&gt;
 # cd &amp;lt;?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2) '''Build the sources'''.  There's no configuration nessesary, just let make go to work :&lt;br /&gt;
 # make -f Makefile.unix&lt;br /&gt;
 # make -f Makefile.unix update&lt;br /&gt;
The first line does the actual compiling.  The second moves the nessesary things to the output directory, zips some resources, and performs other miscellaneous nessesary tasks.&lt;br /&gt;
&lt;br /&gt;
===More===&lt;br /&gt;
&lt;br /&gt;
to come&lt;br /&gt;
&lt;br /&gt;
===References===&lt;br /&gt;
&lt;br /&gt;
[https://www.codeblocks.org/index.php?name=PNphpBB2&amp;amp;file=viewtopic&amp;amp;t=29 Linux releases or compiling on Linux] from the forum&lt;br /&gt;
&lt;br /&gt;
[http://sourceforge.net/cvs/?group_id=126998 Code::Blocks : CVS access instructions]&lt;br /&gt;
&lt;br /&gt;
[http://sourceforge.net/docman/display_doc.php?docid=14033&amp;amp;group_id=1 Basic Introduction to CVS and SourceForge.net (SF.net) Project CVS Services]&lt;br /&gt;
&lt;br /&gt;
===Credits===&lt;br /&gt;
&lt;br /&gt;
Original Author: me22 ( me22.ca@gmail.com )&lt;/div&gt;</summary>
		<author><name>Me22</name></author>
	</entry>
</feed>