<?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=Spacemonkey</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=Spacemonkey"/>
	<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php/Special:Contributions/Spacemonkey"/>
	<updated>2026-05-26T17:44:13Z</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_Linux&amp;diff=6202</id>
		<title>Installing Code::Blocks from source on Linux</title>
		<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php?title=Installing_Code::Blocks_from_source_on_Linux&amp;diff=6202"/>
		<updated>2009-11-19T13:56:42Z</updated>

		<summary type="html">&lt;p&gt;Spacemonkey: /* From SVN repository */&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;
These are instructions on how to build Code::Blocks under Linux. These instructions should work for all Linux distros, as we'll be installing from sources.&lt;br /&gt;
&lt;br /&gt;
===Prerequisites===&lt;br /&gt;
&lt;br /&gt;
In order to successfully compile Code::Blocks, the [http://en.wikipedia.org/wiki/WxWidgets wxWidgets] User Interface library &amp;lt;u&amp;gt;must be installed&amp;lt;/u&amp;gt;. For most Linux users, this is maybe the only dependency not already installed. wxWidget can be used directly on top of the X server, in this case the variant of the wxWidget library is called wxX11. However this library [http://wiki.wxwidgets.org/WxWidgets_Compared_To_Other_Toolkits#Why_You_Shouldn.27t_Use_wxWidgets &amp;quot;is sub-par compared to other toolkits and unstable&amp;quot;]. Hence Code::Blocks uses wxGTK, the version of wxWidget based on GTK+. The exact requirement is libwxGTK-2.8.0 or later (2.8.3 is not recommanded because of some troubles). This creates an additional dependency on GTK+, consider the following:&lt;br /&gt;
&lt;br /&gt;
A possible implementation which does not exist: &lt;br /&gt;
&lt;br /&gt;
''Code::Blocks  -&amp;gt;  xwWidget (libwxX11)  -&amp;gt;  X''&lt;br /&gt;
&lt;br /&gt;
Current Code::Blocks implementation: &lt;br /&gt;
&lt;br /&gt;
''Code::Blocks  -&amp;gt;  '''xwWidget (&amp;gt; libwxGTK2.8)'''  -&amp;gt;  '''GTK+ (&amp;gt; libgtk-x11-2.0)'''  -&amp;gt;  X''&lt;br /&gt;
&lt;br /&gt;
This document helps you to install libwxGTK if necessary but does not cover the installation of GTK+. GTK+ is probably installed on your Linux anyway, so don't worry ;)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
''Note:'' All the instructions below, assume an existing directory named &amp;lt;tt&amp;gt;~/devel&amp;lt;/tt&amp;gt;. If you 'll be using a different one, adjust the path to match.&lt;br /&gt;
As a first step create this directory:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;mkdir ~/devel&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Checking the presence of GTK+ library ===&lt;br /&gt;
&lt;br /&gt;
Have a look in /usr/lib for something like &amp;quot;libgtk-x11-2.0.so&amp;quot; (Note the library must be 2.0 minimum). Alternatively, do a search with your package manager or go to your Linux distribution forum for help. If you don't want to loose time, you can even forget this check since there is a good probability that everything is already installed.&lt;br /&gt;
&lt;br /&gt;
===Library wxGTK installation===&lt;br /&gt;
&lt;br /&gt;
==== Checking the presence of libwxGTK library ====&lt;br /&gt;
&lt;br /&gt;
In your package manager, look for 'libwxgtk' keyword and verify that '''all''' libwxgtk2.8 stuffs are installed. If you find the libraries uninstalled, well '''just install them and go directly to [https://wiki.codeblocks.org/index.php?title=Installing_Code::Blocks_from_source_on_Linux#Code::Blocks_installation Code::Blocks installation]'''.&lt;br /&gt;
&lt;br /&gt;
Alternatively you can do the same in command line (to give an idea, I don't say there is only 2 packages):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;$ ls /usr/lib/libwx_gtk* //to verify the presence&lt;br /&gt;
$ sudo apt-get install libwxgtk2.8-dev&lt;br /&gt;
$ sudo apt-get install libwxgtk2.8-0&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you don't find any package you must install the library from source as described below, and you can redo this check afterwards to verify that the installation worked correctly.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
''Note for Debian (and Ubuntu?) users:'' You can use &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;$ update-alternatives --config wx-config&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
to see which version of libwx is there or not and currently active.&lt;br /&gt;
&lt;br /&gt;
====Getting wxGTK sources====&lt;br /&gt;
&lt;br /&gt;
Visit the [http://www.wxwidgets.org wxWidgets web site]. Click the &amp;quot;Download&amp;quot; button at the top of the page. Under wxWidgets 2.8.7 downloads, select wxGTK. Save the file in &amp;lt;tt&amp;gt;~/devel&amp;lt;/tt&amp;gt;. After the download finishes, switch to &amp;lt;tt&amp;gt;~/devel&amp;lt;/tt&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;cd ~/devel&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, untar the wxGTK sources:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;tar zxf wxGTK-2.8.7.tar.gz&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Switch to the wxGTK directory&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;cd wxGTK-2.8.7&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====wxWidgets build====&lt;br /&gt;
&lt;br /&gt;
Here we will create a seperate build directory instead of building from the src directory, so that we can easily rebuild with different options (unicode / ansi, monolithic / many libs, etc).&lt;br /&gt;
&lt;br /&gt;
The documentation says the default is for gtk2 to use unicode and wx &amp;gt; 2.5 to build as a monolithic library.  This doesn't appear to be the case, so these flags are passed to configure.&lt;br /&gt;
&lt;br /&gt;
 mkdir build_gtk2_shared_monolithic_unicode&lt;br /&gt;
 cd build_gtk2_shared_monolithic_unicode&lt;br /&gt;
 ../configure --prefix=/opt/wx/2.8 \&lt;br /&gt;
        --enable-xrc \&lt;br /&gt;
        --enable-monolithic \&lt;br /&gt;
        --enable-unicode&lt;br /&gt;
 make&lt;br /&gt;
 su&lt;br /&gt;
 make install&lt;br /&gt;
 exit&lt;br /&gt;
&lt;br /&gt;
Add /opt/wx/2.8/bin to the PATH (if you're shell is bash then edit /etc/profile or ~/.bash_profile)&lt;br /&gt;
(On Suse 10.1 edit /etc/profile.local, it will only be available after a new login).  an example PATH&lt;br /&gt;
 export PATH=/usr/bin:/opt/wx/2.8/bin:$PATH&lt;br /&gt;
&lt;br /&gt;
'''Note:''' On Ubuntu Hoary it was necessary to check &amp;quot;Run command as login shell&amp;quot; &lt;br /&gt;
in the gnome-terminal profile-settings, otherwise the PATH changes are not available in a gnome-terminal window.&lt;br /&gt;
&lt;br /&gt;
add /opt/wx/2.8/lib to /etc/ld.so.conf (nano /etc/ld.so.conf)&lt;br /&gt;
then run:&lt;br /&gt;
 ldconfig&lt;br /&gt;
 source /etc/profile&lt;br /&gt;
&lt;br /&gt;
That's it.  Now the linker will look in /opt/wx/2.8/lib for wx libraries and you will have a monolithic shared library unicode build.&lt;br /&gt;
&lt;br /&gt;
To check that things are working, type:&lt;br /&gt;
 wx-config --prefix&lt;br /&gt;
which should give you /opt/wx/2.8&lt;br /&gt;
 wx-config --libs&lt;br /&gt;
which should have at least&lt;br /&gt;
 -L/opt/wx/2.8/lib -lwx_gtk2-2.8&lt;br /&gt;
but can contain other flags as well.&lt;br /&gt;
 which wx-config&lt;br /&gt;
should return /opt/wx/2.8/bin/wx-config&lt;br /&gt;
&lt;br /&gt;
===Code::Blocks installation===&lt;br /&gt;
&lt;br /&gt;
====Getting Code::Blocks sources====&lt;br /&gt;
&lt;br /&gt;
You can get Code::Blocks source code [https://www.codeblocks.org/downloads/6 from the website as a tarball] or from the SVN repository (this second method is described below).&lt;br /&gt;
&lt;br /&gt;
=====From SVN repository=====&lt;br /&gt;
NOTICE: The Sourceforge CVS is no longer used although it still exists&lt;br /&gt;
&lt;br /&gt;
Enter your development directory:&lt;br /&gt;
&amp;lt;pre&amp;gt;cd ~/devel&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then checkout the source using one of [https://www.codeblocks.org/downloads/7 these] methods. This will create the directory &amp;lt;tt&amp;gt;trunk&amp;lt;/tt&amp;gt;. Change to the source code directory, by issuing the following command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;cd trunk&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you are a Gentoo user at this point, please see [[Compiling_Code::Blocks_in_Gentoo]].&lt;br /&gt;
&lt;br /&gt;
Before beginning, it is often a good idea to check you have recent versions of autoconf and automake - repositories versions are not always recent enough. (if you do not have automake, then you will get &amp;quot;cannot find aclocal&amp;quot; error). If you're compiling the svn trunk versions of CodeBlocks (or future versions) then the unix build has switched to autotools.  So first build wxWidgets as described above and then build CodeBlocks as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; ./bootstrap&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This sets up the configure script and its dependencies.  It only needs to be run once (after downloading the source from svn).  '''If you get errors like:'''&lt;br /&gt;
 aclocal:configure.in:61: warning: macro `AM_OPTIONS_WXCONFIG' not found in library&lt;br /&gt;
Then aclocal is having trouble finding the wxWidgets .m4 files.  You can do one of two things:&lt;br /&gt;
To just get bootstrap to find the path this time do:&lt;br /&gt;
&amp;lt;!-- *********** Bad syntax... removed 2006-08-28 by BentFX ****************************&lt;br /&gt;
 export ACLOCAL_FLAGS=&amp;quot;--acdir=`wx-config --prefix`/share/aclocal&amp;quot;&lt;br /&gt;
&lt;br /&gt;
: Note: The above command resulted in missing macros when running ./bootstrap for me. Setting an additional search path instead of overwriting like above worked for me. In case of missing macros try &lt;br /&gt;
***********************************************************************************--&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;export ACLOCAL_FLAGS=&amp;quot;-I `wx-config --prefix`/share/aclocal&amp;quot;&amp;lt;/pre&amp;gt; &amp;lt;!--[[User:Jabber|Jabber]] 06:24, 2 August 2006 (EDT)--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To change the aclocal search path more permanently do:&lt;br /&gt;
 echo `wx-config --prefix`/share/aclocal &amp;gt;&amp;gt; /usr/share/aclocal/dirlist&lt;br /&gt;
Then aclocal will also search somewhere like /opt/wx/2.6/share/aclocal&lt;br /&gt;
&lt;br /&gt;
''Note for Ubuntu users:'' The above is not the correct way to fix the AM_* errors. Rather, you only need to install the package named &amp;quot;wx-common&amp;quot; (Universe repository).&lt;br /&gt;
&lt;br /&gt;
If you get something like&lt;br /&gt;
 The usual way to define `LIBTOOL' is to add `AC_PROG_LIBTOOL'&lt;br /&gt;
&lt;br /&gt;
it can be solved by something like: (adapt path, use `wx-config --prefix` is necessary)&lt;br /&gt;
&lt;br /&gt;
 ACLOCAL_FLAGS=&amp;quot;-I /usr/share/aclocal&amp;quot; ./bootstrap&lt;br /&gt;
&lt;br /&gt;
(*Note// '''If you run ./bootstrap and get errors like''':&lt;br /&gt;
 : bad interpreter: File not found&lt;br /&gt;
then there exists a problem with DOS line-endings. i had this error after i tried to build a  codeblocks from sources which were checked out with cvs on a windows machine. After i checked out a fresh copy of codeblocks from cvs under Ubuntu linux (see above topic: Downloading the latest source package fom SVN), all errors were gone. &lt;br /&gt;
//tiwag 051008*)&amp;lt;br&amp;gt;&lt;br /&gt;
Or, instead of downloading from SVN, you might consider using the little command line tool dos2unix, which normally comes with most distributions. //lizzarddude060103&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
If configure aborts with some unspecific error message(&amp;quot;.infig.status: error: cannot find input file: Makefile&amp;quot;), you might consider also running dos2unix bootstrap acinclude.m4 codeblocks.pc.in configure.in Makefile.am before running bootstrap. Once you've run the bootstrap script, jump to next step.&lt;br /&gt;
&lt;br /&gt;
====Installing Code::Blocks sources====&lt;br /&gt;
You can read the BUILD file included in the source, but everything is very straightforward. Do:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; ./configure&lt;br /&gt;
 make&lt;br /&gt;
 make install&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you have multiple versions of wxWidgets installed or kept them inplace, you can use&lt;br /&gt;
./configure --with-wx-config=/path/to/wx-config&lt;br /&gt;
&lt;br /&gt;
To uninstall you can later run:&lt;br /&gt;
 make uninstall&lt;br /&gt;
&lt;br /&gt;
If you want to recompile everything, first run:&lt;br /&gt;
&amp;lt;pre&amp;gt; make clean&lt;br /&gt;
 make distclean&lt;br /&gt;
 make clean-bin&lt;br /&gt;
 make clean-zipfiles&amp;lt;/pre&amp;gt;&lt;br /&gt;
and then follow the above sequence for installing.&lt;br /&gt;
&lt;br /&gt;
By default, CodeBlocks will install to /usr/local.  If you want it in its own tree (so you can have multiple versions of CodeBlocks, each in its own subdirectory of /opt) replace the above ./configure command with:&lt;br /&gt;
&amp;lt;pre&amp;gt; ./configure --prefix=/opt/codeblocks-svn&amp;lt;/pre&amp;gt;&lt;br /&gt;
or similar.  Then you can later install a different build like:&lt;br /&gt;
&amp;lt;pre&amp;gt; ./configure --prefix=/opt/codeblocks2-svn&amp;lt;/pre&amp;gt;&lt;br /&gt;
followed by 'make &amp;amp;&amp;amp; make install' as usual.&lt;br /&gt;
&lt;br /&gt;
By default, CodeBlocks will not compile the contributed plugins from SVN.  If you want to compile / install them too, replace the above ./configure command with:&lt;br /&gt;
&amp;lt;pre&amp;gt; ./configure --with-contrib-plugins=all&amp;lt;/pre&amp;gt;&lt;br /&gt;
followed by 'make &amp;amp;&amp;amp; make install' as usual.&lt;br /&gt;
&lt;br /&gt;
To see a list of other options available for configuring the build of CodeBlocks do:&lt;br /&gt;
&amp;lt;pre&amp;gt; ./configure --help&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To compile under gentoo, use&lt;br /&gt;
&amp;lt;pre&amp;gt; ./configure --with-wx-config=wx-config-2.8&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Resolving issues====&lt;br /&gt;
&lt;br /&gt;
When running Code::Blocks after the installation it might happen, that the system complains:&lt;br /&gt;
 codeblocks: error while loading shared libraries: libcodeblocks.so.0: cannot open shared object file: No such file or directory&lt;br /&gt;
In that case make sure the library path where the Code::Blocks libraries where installed into is &amp;quot;known&amp;quot; to the system. For example: On Ubuntu using a default build process on a clean system will install the Code::Blocks executables to /use/local/bin and the libraries to /usr/local/lib. The latter is usually not known to a &amp;quot;clean&amp;quot; Ubuntu system. To add it to the search path for libraries do the following (as root / using sudo respectively):&lt;br /&gt;
Add the following line to the file /etc/ld.so.conf:&lt;br /&gt;
 /usr/local/lib&lt;br /&gt;
...and run:&lt;br /&gt;
 ldconfig&lt;br /&gt;
That's it - Code::Blocks should now work just fine as all libraries are being found.&lt;/div&gt;</summary>
		<author><name>Spacemonkey</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=Installing_Code::Blocks_from_source_on_Linux&amp;diff=6201</id>
		<title>Installing Code::Blocks from source on Linux</title>
		<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php?title=Installing_Code::Blocks_from_source_on_Linux&amp;diff=6201"/>
		<updated>2009-11-19T13:55:48Z</updated>

		<summary type="html">&lt;p&gt;Spacemonkey: /* Resolving issues with Code::Blocks SVN */&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;
These are instructions on how to build Code::Blocks under Linux. These instructions should work for all Linux distros, as we'll be installing from sources.&lt;br /&gt;
&lt;br /&gt;
===Prerequisites===&lt;br /&gt;
&lt;br /&gt;
In order to successfully compile Code::Blocks, the [http://en.wikipedia.org/wiki/WxWidgets wxWidgets] User Interface library &amp;lt;u&amp;gt;must be installed&amp;lt;/u&amp;gt;. For most Linux users, this is maybe the only dependency not already installed. wxWidget can be used directly on top of the X server, in this case the variant of the wxWidget library is called wxX11. However this library [http://wiki.wxwidgets.org/WxWidgets_Compared_To_Other_Toolkits#Why_You_Shouldn.27t_Use_wxWidgets &amp;quot;is sub-par compared to other toolkits and unstable&amp;quot;]. Hence Code::Blocks uses wxGTK, the version of wxWidget based on GTK+. The exact requirement is libwxGTK-2.8.0 or later (2.8.3 is not recommanded because of some troubles). This creates an additional dependency on GTK+, consider the following:&lt;br /&gt;
&lt;br /&gt;
A possible implementation which does not exist: &lt;br /&gt;
&lt;br /&gt;
''Code::Blocks  -&amp;gt;  xwWidget (libwxX11)  -&amp;gt;  X''&lt;br /&gt;
&lt;br /&gt;
Current Code::Blocks implementation: &lt;br /&gt;
&lt;br /&gt;
''Code::Blocks  -&amp;gt;  '''xwWidget (&amp;gt; libwxGTK2.8)'''  -&amp;gt;  '''GTK+ (&amp;gt; libgtk-x11-2.0)'''  -&amp;gt;  X''&lt;br /&gt;
&lt;br /&gt;
This document helps you to install libwxGTK if necessary but does not cover the installation of GTK+. GTK+ is probably installed on your Linux anyway, so don't worry ;)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
''Note:'' All the instructions below, assume an existing directory named &amp;lt;tt&amp;gt;~/devel&amp;lt;/tt&amp;gt;. If you 'll be using a different one, adjust the path to match.&lt;br /&gt;
As a first step create this directory:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;mkdir ~/devel&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Checking the presence of GTK+ library ===&lt;br /&gt;
&lt;br /&gt;
Have a look in /usr/lib for something like &amp;quot;libgtk-x11-2.0.so&amp;quot; (Note the library must be 2.0 minimum). Alternatively, do a search with your package manager or go to your Linux distribution forum for help. If you don't want to loose time, you can even forget this check since there is a good probability that everything is already installed.&lt;br /&gt;
&lt;br /&gt;
===Library wxGTK installation===&lt;br /&gt;
&lt;br /&gt;
==== Checking the presence of libwxGTK library ====&lt;br /&gt;
&lt;br /&gt;
In your package manager, look for 'libwxgtk' keyword and verify that '''all''' libwxgtk2.8 stuffs are installed. If you find the libraries uninstalled, well '''just install them and go directly to [https://wiki.codeblocks.org/index.php?title=Installing_Code::Blocks_from_source_on_Linux#Code::Blocks_installation Code::Blocks installation]'''.&lt;br /&gt;
&lt;br /&gt;
Alternatively you can do the same in command line (to give an idea, I don't say there is only 2 packages):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;$ ls /usr/lib/libwx_gtk* //to verify the presence&lt;br /&gt;
$ sudo apt-get install libwxgtk2.8-dev&lt;br /&gt;
$ sudo apt-get install libwxgtk2.8-0&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you don't find any package you must install the library from source as described below, and you can redo this check afterwards to verify that the installation worked correctly.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
''Note for Debian (and Ubuntu?) users:'' You can use &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;$ update-alternatives --config wx-config&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
to see which version of libwx is there or not and currently active.&lt;br /&gt;
&lt;br /&gt;
====Getting wxGTK sources====&lt;br /&gt;
&lt;br /&gt;
Visit the [http://www.wxwidgets.org wxWidgets web site]. Click the &amp;quot;Download&amp;quot; button at the top of the page. Under wxWidgets 2.8.7 downloads, select wxGTK. Save the file in &amp;lt;tt&amp;gt;~/devel&amp;lt;/tt&amp;gt;. After the download finishes, switch to &amp;lt;tt&amp;gt;~/devel&amp;lt;/tt&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;cd ~/devel&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, untar the wxGTK sources:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;tar zxf wxGTK-2.8.7.tar.gz&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Switch to the wxGTK directory&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;cd wxGTK-2.8.7&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====wxWidgets build====&lt;br /&gt;
&lt;br /&gt;
Here we will create a seperate build directory instead of building from the src directory, so that we can easily rebuild with different options (unicode / ansi, monolithic / many libs, etc).&lt;br /&gt;
&lt;br /&gt;
The documentation says the default is for gtk2 to use unicode and wx &amp;gt; 2.5 to build as a monolithic library.  This doesn't appear to be the case, so these flags are passed to configure.&lt;br /&gt;
&lt;br /&gt;
 mkdir build_gtk2_shared_monolithic_unicode&lt;br /&gt;
 cd build_gtk2_shared_monolithic_unicode&lt;br /&gt;
 ../configure --prefix=/opt/wx/2.8 \&lt;br /&gt;
        --enable-xrc \&lt;br /&gt;
        --enable-monolithic \&lt;br /&gt;
        --enable-unicode&lt;br /&gt;
 make&lt;br /&gt;
 su&lt;br /&gt;
 make install&lt;br /&gt;
 exit&lt;br /&gt;
&lt;br /&gt;
Add /opt/wx/2.8/bin to the PATH (if you're shell is bash then edit /etc/profile or ~/.bash_profile)&lt;br /&gt;
(On Suse 10.1 edit /etc/profile.local, it will only be available after a new login).  an example PATH&lt;br /&gt;
 export PATH=/usr/bin:/opt/wx/2.8/bin:$PATH&lt;br /&gt;
&lt;br /&gt;
'''Note:''' On Ubuntu Hoary it was necessary to check &amp;quot;Run command as login shell&amp;quot; &lt;br /&gt;
in the gnome-terminal profile-settings, otherwise the PATH changes are not available in a gnome-terminal window.&lt;br /&gt;
&lt;br /&gt;
add /opt/wx/2.8/lib to /etc/ld.so.conf (nano /etc/ld.so.conf)&lt;br /&gt;
then run:&lt;br /&gt;
 ldconfig&lt;br /&gt;
 source /etc/profile&lt;br /&gt;
&lt;br /&gt;
That's it.  Now the linker will look in /opt/wx/2.8/lib for wx libraries and you will have a monolithic shared library unicode build.&lt;br /&gt;
&lt;br /&gt;
To check that things are working, type:&lt;br /&gt;
 wx-config --prefix&lt;br /&gt;
which should give you /opt/wx/2.8&lt;br /&gt;
 wx-config --libs&lt;br /&gt;
which should have at least&lt;br /&gt;
 -L/opt/wx/2.8/lib -lwx_gtk2-2.8&lt;br /&gt;
but can contain other flags as well.&lt;br /&gt;
 which wx-config&lt;br /&gt;
should return /opt/wx/2.8/bin/wx-config&lt;br /&gt;
&lt;br /&gt;
===Code::Blocks installation===&lt;br /&gt;
&lt;br /&gt;
====Getting Code::Blocks sources====&lt;br /&gt;
&lt;br /&gt;
You can get Code::Blocks source code [https://www.codeblocks.org/downloads/6 from the website as a tarball] or from the SVN repository (this second method is described below).&lt;br /&gt;
&lt;br /&gt;
=====From SVN repository=====&lt;br /&gt;
NOTICE: The Sourceforge CVS is no longer used although it still exists&lt;br /&gt;
&lt;br /&gt;
Enter your development directory:&lt;br /&gt;
&amp;lt;pre&amp;gt;cd ~/devel&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then checkout the source using one of [https://www.codeblocks.org/downloads/7 these] methods. This will create the directory &amp;lt;tt&amp;gt;trunk&amp;lt;/tt&amp;gt;. Change to the source code directory, by issuing the following command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;cd trunk&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you are a Gentoo user at this point, please see [[Compiling_Code::Blocks_in_Gentoo]].&lt;br /&gt;
&lt;br /&gt;
Before beginning, it is often a good idea to check you have recent versions of autoconf and automake - repositories versions are not always recent enough. (if you do not have automake, then you will get &amp;quot;cannot find aclocal&amp;quot; error).&lt;br /&gt;
&lt;br /&gt;
If you're compiling the svn trunk versions of CodeBlocks (or future versions) then the unix build has switched to autotools.  So first build wxWidgets as described above and then build CodeBlocks as follows:&lt;br /&gt;
&lt;br /&gt;
 ./bootstrap&lt;br /&gt;
&lt;br /&gt;
This sets up the configure script and its dependencies.  It only needs to be run once (after downloading the source from svn).  '''If you get errors like:'''&lt;br /&gt;
 aclocal:configure.in:61: warning: macro `AM_OPTIONS_WXCONFIG' not found in library&lt;br /&gt;
Then aclocal is having trouble finding the wxWidgets .m4 files.  You can do one of two things:&lt;br /&gt;
To just get bootstrap to find the path this time do:&lt;br /&gt;
&amp;lt;!-- *********** Bad syntax... removed 2006-08-28 by BentFX ****************************&lt;br /&gt;
 export ACLOCAL_FLAGS=&amp;quot;--acdir=`wx-config --prefix`/share/aclocal&amp;quot;&lt;br /&gt;
&lt;br /&gt;
: Note: The above command resulted in missing macros when running ./bootstrap for me. Setting an additional search path instead of overwriting like above worked for me. In case of missing macros try &lt;br /&gt;
***********************************************************************************--&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;export ACLOCAL_FLAGS=&amp;quot;-I `wx-config --prefix`/share/aclocal&amp;quot;&amp;lt;/pre&amp;gt; &amp;lt;!--[[User:Jabber|Jabber]] 06:24, 2 August 2006 (EDT)--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To change the aclocal search path more permanently do:&lt;br /&gt;
 echo `wx-config --prefix`/share/aclocal &amp;gt;&amp;gt; /usr/share/aclocal/dirlist&lt;br /&gt;
Then aclocal will also search somewhere like /opt/wx/2.6/share/aclocal&lt;br /&gt;
&lt;br /&gt;
''Note for Ubuntu users:'' The above is not the correct way to fix the AM_* errors. Rather, you only need to install the package named &amp;quot;wx-common&amp;quot; (Universe repository).&lt;br /&gt;
&lt;br /&gt;
If you get something like&lt;br /&gt;
 The usual way to define `LIBTOOL' is to add `AC_PROG_LIBTOOL'&lt;br /&gt;
&lt;br /&gt;
it can be solved by something like: (adapt path, use `wx-config --prefix` is necessary)&lt;br /&gt;
&lt;br /&gt;
 ACLOCAL_FLAGS=&amp;quot;-I /usr/share/aclocal&amp;quot; ./bootstrap&lt;br /&gt;
&lt;br /&gt;
(*Note// '''If you run ./bootstrap and get errors like''':&lt;br /&gt;
 : bad interpreter: File not found&lt;br /&gt;
then there exists a problem with DOS line-endings. i had this error after i tried to build a  codeblocks from sources which were checked out with cvs on a windows machine. After i checked out a fresh copy of codeblocks from cvs under Ubuntu linux (see above topic: Downloading the latest source package fom SVN), all errors were gone. &lt;br /&gt;
//tiwag 051008*)&amp;lt;br&amp;gt;&lt;br /&gt;
Or, instead of downloading from SVN, you might consider using the little command line tool dos2unix, which normally comes with most distributions. //lizzarddude060103&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
If configure aborts with some unspecific error message(&amp;quot;.infig.status: error: cannot find input file: Makefile&amp;quot;), you might consider also running dos2unix bootstrap acinclude.m4 codeblocks.pc.in configure.in Makefile.am before running bootstrap. Once you've run the bootstrap script, jump to next step.&lt;br /&gt;
&lt;br /&gt;
====Installing Code::Blocks sources====&lt;br /&gt;
You can read the BUILD file included in the source, but everything is very straightforward. Do:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; ./configure&lt;br /&gt;
 make&lt;br /&gt;
 make install&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you have multiple versions of wxWidgets installed or kept them inplace, you can use&lt;br /&gt;
./configure --with-wx-config=/path/to/wx-config&lt;br /&gt;
&lt;br /&gt;
To uninstall you can later run:&lt;br /&gt;
 make uninstall&lt;br /&gt;
&lt;br /&gt;
If you want to recompile everything, first run:&lt;br /&gt;
&amp;lt;pre&amp;gt; make clean&lt;br /&gt;
 make distclean&lt;br /&gt;
 make clean-bin&lt;br /&gt;
 make clean-zipfiles&amp;lt;/pre&amp;gt;&lt;br /&gt;
and then follow the above sequence for installing.&lt;br /&gt;
&lt;br /&gt;
By default, CodeBlocks will install to /usr/local.  If you want it in its own tree (so you can have multiple versions of CodeBlocks, each in its own subdirectory of /opt) replace the above ./configure command with:&lt;br /&gt;
&amp;lt;pre&amp;gt; ./configure --prefix=/opt/codeblocks-svn&amp;lt;/pre&amp;gt;&lt;br /&gt;
or similar.  Then you can later install a different build like:&lt;br /&gt;
&amp;lt;pre&amp;gt; ./configure --prefix=/opt/codeblocks2-svn&amp;lt;/pre&amp;gt;&lt;br /&gt;
followed by 'make &amp;amp;&amp;amp; make install' as usual.&lt;br /&gt;
&lt;br /&gt;
By default, CodeBlocks will not compile the contributed plugins from SVN.  If you want to compile / install them too, replace the above ./configure command with:&lt;br /&gt;
&amp;lt;pre&amp;gt; ./configure --with-contrib-plugins=all&amp;lt;/pre&amp;gt;&lt;br /&gt;
followed by 'make &amp;amp;&amp;amp; make install' as usual.&lt;br /&gt;
&lt;br /&gt;
To see a list of other options available for configuring the build of CodeBlocks do:&lt;br /&gt;
&amp;lt;pre&amp;gt; ./configure --help&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To compile under gentoo, use&lt;br /&gt;
&amp;lt;pre&amp;gt; ./configure --with-wx-config=wx-config-2.8&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Resolving issues====&lt;br /&gt;
&lt;br /&gt;
When running Code::Blocks after the installation it might happen, that the system complains:&lt;br /&gt;
 codeblocks: error while loading shared libraries: libcodeblocks.so.0: cannot open shared object file: No such file or directory&lt;br /&gt;
In that case make sure the library path where the Code::Blocks libraries where installed into is &amp;quot;known&amp;quot; to the system. For example: On Ubuntu using a default build process on a clean system will install the Code::Blocks executables to /use/local/bin and the libraries to /usr/local/lib. The latter is usually not known to a &amp;quot;clean&amp;quot; Ubuntu system. To add it to the search path for libraries do the following (as root / using sudo respectively):&lt;br /&gt;
Add the following line to the file /etc/ld.so.conf:&lt;br /&gt;
 /usr/local/lib&lt;br /&gt;
...and run:&lt;br /&gt;
 ldconfig&lt;br /&gt;
That's it - Code::Blocks should now work just fine as all libraries are being found.&lt;/div&gt;</summary>
		<author><name>Spacemonkey</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=Installing_Code::Blocks_from_source_on_Linux&amp;diff=6200</id>
		<title>Installing Code::Blocks from source on Linux</title>
		<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php?title=Installing_Code::Blocks_from_source_on_Linux&amp;diff=6200"/>
		<updated>2009-11-19T13:55:13Z</updated>

		<summary type="html">&lt;p&gt;Spacemonkey: &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;
These are instructions on how to build Code::Blocks under Linux. These instructions should work for all Linux distros, as we'll be installing from sources.&lt;br /&gt;
&lt;br /&gt;
===Prerequisites===&lt;br /&gt;
&lt;br /&gt;
In order to successfully compile Code::Blocks, the [http://en.wikipedia.org/wiki/WxWidgets wxWidgets] User Interface library &amp;lt;u&amp;gt;must be installed&amp;lt;/u&amp;gt;. For most Linux users, this is maybe the only dependency not already installed. wxWidget can be used directly on top of the X server, in this case the variant of the wxWidget library is called wxX11. However this library [http://wiki.wxwidgets.org/WxWidgets_Compared_To_Other_Toolkits#Why_You_Shouldn.27t_Use_wxWidgets &amp;quot;is sub-par compared to other toolkits and unstable&amp;quot;]. Hence Code::Blocks uses wxGTK, the version of wxWidget based on GTK+. The exact requirement is libwxGTK-2.8.0 or later (2.8.3 is not recommanded because of some troubles). This creates an additional dependency on GTK+, consider the following:&lt;br /&gt;
&lt;br /&gt;
A possible implementation which does not exist: &lt;br /&gt;
&lt;br /&gt;
''Code::Blocks  -&amp;gt;  xwWidget (libwxX11)  -&amp;gt;  X''&lt;br /&gt;
&lt;br /&gt;
Current Code::Blocks implementation: &lt;br /&gt;
&lt;br /&gt;
''Code::Blocks  -&amp;gt;  '''xwWidget (&amp;gt; libwxGTK2.8)'''  -&amp;gt;  '''GTK+ (&amp;gt; libgtk-x11-2.0)'''  -&amp;gt;  X''&lt;br /&gt;
&lt;br /&gt;
This document helps you to install libwxGTK if necessary but does not cover the installation of GTK+. GTK+ is probably installed on your Linux anyway, so don't worry ;)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
''Note:'' All the instructions below, assume an existing directory named &amp;lt;tt&amp;gt;~/devel&amp;lt;/tt&amp;gt;. If you 'll be using a different one, adjust the path to match.&lt;br /&gt;
As a first step create this directory:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;mkdir ~/devel&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Checking the presence of GTK+ library ===&lt;br /&gt;
&lt;br /&gt;
Have a look in /usr/lib for something like &amp;quot;libgtk-x11-2.0.so&amp;quot; (Note the library must be 2.0 minimum). Alternatively, do a search with your package manager or go to your Linux distribution forum for help. If you don't want to loose time, you can even forget this check since there is a good probability that everything is already installed.&lt;br /&gt;
&lt;br /&gt;
===Library wxGTK installation===&lt;br /&gt;
&lt;br /&gt;
==== Checking the presence of libwxGTK library ====&lt;br /&gt;
&lt;br /&gt;
In your package manager, look for 'libwxgtk' keyword and verify that '''all''' libwxgtk2.8 stuffs are installed. If you find the libraries uninstalled, well '''just install them and go directly to [https://wiki.codeblocks.org/index.php?title=Installing_Code::Blocks_from_source_on_Linux#Code::Blocks_installation Code::Blocks installation]'''.&lt;br /&gt;
&lt;br /&gt;
Alternatively you can do the same in command line (to give an idea, I don't say there is only 2 packages):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;$ ls /usr/lib/libwx_gtk* //to verify the presence&lt;br /&gt;
$ sudo apt-get install libwxgtk2.8-dev&lt;br /&gt;
$ sudo apt-get install libwxgtk2.8-0&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you don't find any package you must install the library from source as described below, and you can redo this check afterwards to verify that the installation worked correctly.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
''Note for Debian (and Ubuntu?) users:'' You can use &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;$ update-alternatives --config wx-config&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
to see which version of libwx is there or not and currently active.&lt;br /&gt;
&lt;br /&gt;
====Getting wxGTK sources====&lt;br /&gt;
&lt;br /&gt;
Visit the [http://www.wxwidgets.org wxWidgets web site]. Click the &amp;quot;Download&amp;quot; button at the top of the page. Under wxWidgets 2.8.7 downloads, select wxGTK. Save the file in &amp;lt;tt&amp;gt;~/devel&amp;lt;/tt&amp;gt;. After the download finishes, switch to &amp;lt;tt&amp;gt;~/devel&amp;lt;/tt&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;cd ~/devel&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, untar the wxGTK sources:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;tar zxf wxGTK-2.8.7.tar.gz&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Switch to the wxGTK directory&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;cd wxGTK-2.8.7&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====wxWidgets build====&lt;br /&gt;
&lt;br /&gt;
Here we will create a seperate build directory instead of building from the src directory, so that we can easily rebuild with different options (unicode / ansi, monolithic / many libs, etc).&lt;br /&gt;
&lt;br /&gt;
The documentation says the default is for gtk2 to use unicode and wx &amp;gt; 2.5 to build as a monolithic library.  This doesn't appear to be the case, so these flags are passed to configure.&lt;br /&gt;
&lt;br /&gt;
 mkdir build_gtk2_shared_monolithic_unicode&lt;br /&gt;
 cd build_gtk2_shared_monolithic_unicode&lt;br /&gt;
 ../configure --prefix=/opt/wx/2.8 \&lt;br /&gt;
        --enable-xrc \&lt;br /&gt;
        --enable-monolithic \&lt;br /&gt;
        --enable-unicode&lt;br /&gt;
 make&lt;br /&gt;
 su&lt;br /&gt;
 make install&lt;br /&gt;
 exit&lt;br /&gt;
&lt;br /&gt;
Add /opt/wx/2.8/bin to the PATH (if you're shell is bash then edit /etc/profile or ~/.bash_profile)&lt;br /&gt;
(On Suse 10.1 edit /etc/profile.local, it will only be available after a new login).  an example PATH&lt;br /&gt;
 export PATH=/usr/bin:/opt/wx/2.8/bin:$PATH&lt;br /&gt;
&lt;br /&gt;
'''Note:''' On Ubuntu Hoary it was necessary to check &amp;quot;Run command as login shell&amp;quot; &lt;br /&gt;
in the gnome-terminal profile-settings, otherwise the PATH changes are not available in a gnome-terminal window.&lt;br /&gt;
&lt;br /&gt;
add /opt/wx/2.8/lib to /etc/ld.so.conf (nano /etc/ld.so.conf)&lt;br /&gt;
then run:&lt;br /&gt;
 ldconfig&lt;br /&gt;
 source /etc/profile&lt;br /&gt;
&lt;br /&gt;
That's it.  Now the linker will look in /opt/wx/2.8/lib for wx libraries and you will have a monolithic shared library unicode build.&lt;br /&gt;
&lt;br /&gt;
To check that things are working, type:&lt;br /&gt;
 wx-config --prefix&lt;br /&gt;
which should give you /opt/wx/2.8&lt;br /&gt;
 wx-config --libs&lt;br /&gt;
which should have at least&lt;br /&gt;
 -L/opt/wx/2.8/lib -lwx_gtk2-2.8&lt;br /&gt;
but can contain other flags as well.&lt;br /&gt;
 which wx-config&lt;br /&gt;
should return /opt/wx/2.8/bin/wx-config&lt;br /&gt;
&lt;br /&gt;
===Code::Blocks installation===&lt;br /&gt;
&lt;br /&gt;
====Getting Code::Blocks sources====&lt;br /&gt;
&lt;br /&gt;
You can get Code::Blocks source code [https://www.codeblocks.org/downloads/6 from the website as a tarball] or from the SVN repository (this second method is described below).&lt;br /&gt;
&lt;br /&gt;
=====From SVN repository=====&lt;br /&gt;
NOTICE: The Sourceforge CVS is no longer used although it still exists&lt;br /&gt;
&lt;br /&gt;
Enter your development directory:&lt;br /&gt;
&amp;lt;pre&amp;gt;cd ~/devel&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then checkout the source using one of [https://www.codeblocks.org/downloads/7 these] methods. This will create the directory &amp;lt;tt&amp;gt;trunk&amp;lt;/tt&amp;gt;. Change to the source code directory, by issuing the following command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;cd trunk&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you are a Gentoo user at this point, please see [[Compiling_Code::Blocks_in_Gentoo]].&lt;br /&gt;
&lt;br /&gt;
Before beginning, it is often a good idea to check you have recent versions of autoconf and automake - repositories versions are not always recent enough. (if you do not have automake, then you will get &amp;quot;cannot find aclocal&amp;quot; error).&lt;br /&gt;
&lt;br /&gt;
If you're compiling the svn trunk versions of CodeBlocks (or future versions) then the unix build has switched to autotools.  So first build wxWidgets as described above and then build CodeBlocks as follows:&lt;br /&gt;
&lt;br /&gt;
 ./bootstrap&lt;br /&gt;
&lt;br /&gt;
This sets up the configure script and its dependencies.  It only needs to be run once (after downloading the source from svn).  '''If you get errors like:'''&lt;br /&gt;
 aclocal:configure.in:61: warning: macro `AM_OPTIONS_WXCONFIG' not found in library&lt;br /&gt;
Then aclocal is having trouble finding the wxWidgets .m4 files.  You can do one of two things:&lt;br /&gt;
To just get bootstrap to find the path this time do:&lt;br /&gt;
&amp;lt;!-- *********** Bad syntax... removed 2006-08-28 by BentFX ****************************&lt;br /&gt;
 export ACLOCAL_FLAGS=&amp;quot;--acdir=`wx-config --prefix`/share/aclocal&amp;quot;&lt;br /&gt;
&lt;br /&gt;
: Note: The above command resulted in missing macros when running ./bootstrap for me. Setting an additional search path instead of overwriting like above worked for me. In case of missing macros try &lt;br /&gt;
***********************************************************************************--&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;export ACLOCAL_FLAGS=&amp;quot;-I `wx-config --prefix`/share/aclocal&amp;quot;&amp;lt;/pre&amp;gt; &amp;lt;!--[[User:Jabber|Jabber]] 06:24, 2 August 2006 (EDT)--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To change the aclocal search path more permanently do:&lt;br /&gt;
 echo `wx-config --prefix`/share/aclocal &amp;gt;&amp;gt; /usr/share/aclocal/dirlist&lt;br /&gt;
Then aclocal will also search somewhere like /opt/wx/2.6/share/aclocal&lt;br /&gt;
&lt;br /&gt;
''Note for Ubuntu users:'' The above is not the correct way to fix the AM_* errors. Rather, you only need to install the package named &amp;quot;wx-common&amp;quot; (Universe repository).&lt;br /&gt;
&lt;br /&gt;
If you get something like&lt;br /&gt;
 The usual way to define `LIBTOOL' is to add `AC_PROG_LIBTOOL'&lt;br /&gt;
&lt;br /&gt;
it can be solved by something like: (adapt path, use `wx-config --prefix` is necessary)&lt;br /&gt;
&lt;br /&gt;
 ACLOCAL_FLAGS=&amp;quot;-I /usr/share/aclocal&amp;quot; ./bootstrap&lt;br /&gt;
&lt;br /&gt;
(*Note// '''If you run ./bootstrap and get errors like''':&lt;br /&gt;
 : bad interpreter: File not found&lt;br /&gt;
then there exists a problem with DOS line-endings. i had this error after i tried to build a  codeblocks from sources which were checked out with cvs on a windows machine. After i checked out a fresh copy of codeblocks from cvs under Ubuntu linux (see above topic: Downloading the latest source package fom SVN), all errors were gone. &lt;br /&gt;
//tiwag 051008*)&amp;lt;br&amp;gt;&lt;br /&gt;
Or, instead of downloading from SVN, you might consider using the little command line tool dos2unix, which normally comes with most distributions. //lizzarddude060103&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
If configure aborts with some unspecific error message(&amp;quot;.infig.status: error: cannot find input file: Makefile&amp;quot;), you might consider also running dos2unix bootstrap acinclude.m4 codeblocks.pc.in configure.in Makefile.am before running bootstrap. Once you've run the bootstrap script, jump to next step.&lt;br /&gt;
&lt;br /&gt;
====Installing Code::Blocks sources====&lt;br /&gt;
You can read the BUILD file included in the source, but everything is very straightforward. Do:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; ./configure&lt;br /&gt;
 make&lt;br /&gt;
 make install&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you have multiple versions of wxWidgets installed or kept them inplace, you can use&lt;br /&gt;
./configure --with-wx-config=/path/to/wx-config&lt;br /&gt;
&lt;br /&gt;
To uninstall you can later run:&lt;br /&gt;
 make uninstall&lt;br /&gt;
&lt;br /&gt;
If you want to recompile everything, first run:&lt;br /&gt;
&amp;lt;pre&amp;gt; make clean&lt;br /&gt;
 make distclean&lt;br /&gt;
 make clean-bin&lt;br /&gt;
 make clean-zipfiles&amp;lt;/pre&amp;gt;&lt;br /&gt;
and then follow the above sequence for installing.&lt;br /&gt;
&lt;br /&gt;
By default, CodeBlocks will install to /usr/local.  If you want it in its own tree (so you can have multiple versions of CodeBlocks, each in its own subdirectory of /opt) replace the above ./configure command with:&lt;br /&gt;
&amp;lt;pre&amp;gt; ./configure --prefix=/opt/codeblocks-svn&amp;lt;/pre&amp;gt;&lt;br /&gt;
or similar.  Then you can later install a different build like:&lt;br /&gt;
&amp;lt;pre&amp;gt; ./configure --prefix=/opt/codeblocks2-svn&amp;lt;/pre&amp;gt;&lt;br /&gt;
followed by 'make &amp;amp;&amp;amp; make install' as usual.&lt;br /&gt;
&lt;br /&gt;
By default, CodeBlocks will not compile the contributed plugins from SVN.  If you want to compile / install them too, replace the above ./configure command with:&lt;br /&gt;
&amp;lt;pre&amp;gt; ./configure --with-contrib-plugins=all&amp;lt;/pre&amp;gt;&lt;br /&gt;
followed by 'make &amp;amp;&amp;amp; make install' as usual.&lt;br /&gt;
&lt;br /&gt;
To see a list of other options available for configuring the build of CodeBlocks do:&lt;br /&gt;
&amp;lt;pre&amp;gt; ./configure --help&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To compile under gentoo, use&lt;br /&gt;
&amp;lt;pre&amp;gt; ./configure --with-wx-config=wx-config-2.8&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Resolving issues with Code::Blocks SVN====&lt;br /&gt;
&lt;br /&gt;
When running Code::Blocks after the installation it might happen, that the system complains:&lt;br /&gt;
 codeblocks: error while loading shared libraries: libcodeblocks.so.0: cannot open shared object file: No such file or directory&lt;br /&gt;
In that case make sure the library path where the Code::Blocks libraries where installed into is &amp;quot;known&amp;quot; to the system. For example: On Ubuntu using a default build process on a clean system will install the Code::Blocks executables to /use/local/bin and the libraries to /usr/local/lib. The latter is usually not known to a &amp;quot;clean&amp;quot; Ubuntu system. To add it to the search path for libraries do the following (as root / using sudo respectively):&lt;br /&gt;
Add the following line to the file /etc/ld.so.conf:&lt;br /&gt;
 /usr/local/lib&lt;br /&gt;
...and run:&lt;br /&gt;
 ldconfig&lt;br /&gt;
That's it - Code::Blocks should now work just fine as all libraries are being found.&lt;/div&gt;</summary>
		<author><name>Spacemonkey</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=Installing_Code::Blocks_from_source_on_Linux&amp;diff=6199</id>
		<title>Installing Code::Blocks from source on Linux</title>
		<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php?title=Installing_Code::Blocks_from_source_on_Linux&amp;diff=6199"/>
		<updated>2009-11-19T13:48:35Z</updated>

		<summary type="html">&lt;p&gt;Spacemonkey: /* Downloading Code::Blocks */&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;
These are instructions on how to build Code::Blocks under Linux. These instructions should work for all Linux distros, as we'll be installing from sources.&lt;br /&gt;
&lt;br /&gt;
===Prerequisites===&lt;br /&gt;
&lt;br /&gt;
In order to successfully compile Code::Blocks, the [http://en.wikipedia.org/wiki/WxWidgets wxWidgets] User Interface library &amp;lt;u&amp;gt;must be installed&amp;lt;/u&amp;gt;. For most Linux users, this is maybe the only dependency not already installed. wxWidget can be used directly on top of the X server, in this case the variant of the wxWidget library is called wxX11. However this library [http://wiki.wxwidgets.org/WxWidgets_Compared_To_Other_Toolkits#Why_You_Shouldn.27t_Use_wxWidgets &amp;quot;is sub-par compared to other toolkits and unstable&amp;quot;]. Hence Code::Blocks uses wxGTK, the version of wxWidget based on GTK+. The exact requirement is libwxGTK-2.8.0 or later (2.8.3 is not recommanded because of some troubles). This creates an additional dependency on GTK+, consider the following:&lt;br /&gt;
&lt;br /&gt;
A possible implementation which does not exist: &lt;br /&gt;
&lt;br /&gt;
''Code::Blocks  -&amp;gt;  xwWidget (libwxX11)  -&amp;gt;  X''&lt;br /&gt;
&lt;br /&gt;
Current Code::Blocks implementation: &lt;br /&gt;
&lt;br /&gt;
''Code::Blocks  -&amp;gt;  '''xwWidget (&amp;gt; libwxGTK2.8)'''  -&amp;gt;  '''GTK+ (&amp;gt; libgtk-x11-2.0)'''  -&amp;gt;  X''&lt;br /&gt;
&lt;br /&gt;
This document helps you to install libwxGTK if necessary but does not cover the installation of GTK+. GTK+ is probably installed on your Linux anyway, so don't worry ;)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
''Note:'' All the instructions below, assume an existing directory named &amp;lt;tt&amp;gt;~/devel&amp;lt;/tt&amp;gt;. If you 'll be using a different one, adjust the path to match.&lt;br /&gt;
As a first step create this directory:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;mkdir ~/devel&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Checking the presence of GTK+ library ===&lt;br /&gt;
&lt;br /&gt;
Have a look in /usr/lib for something like &amp;quot;libgtk-x11-2.0.so&amp;quot; (Note the library must be 2.0 minimum). Alternatively, do a search with your package manager or go to your Linux distribution forum for help. If you don't want to loose time, you can even forget this check since there is a good probability that everything is already installed.&lt;br /&gt;
&lt;br /&gt;
===Library wxGTK installation===&lt;br /&gt;
&lt;br /&gt;
==== Checking the presence of libwxGTK library ====&lt;br /&gt;
&lt;br /&gt;
In your package manager, look for 'libwxgtk' keyword and verify that '''all''' libwxgtk2.8 stuffs are installed. If you find the libraries uninstalled, well '''just install them and go directly to [https://wiki.codeblocks.org/index.php?title=Installing_Code::Blocks_from_source_on_Linux#Code::Blocks_installation Code::Blocks installation]'''.&lt;br /&gt;
&lt;br /&gt;
Alternatively you can do the same in command line (to give an idea, I don't say there is only 2 packages):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;$ ls /usr/lib/libwx_gtk* //to verify the presence&lt;br /&gt;
$ sudo apt-get install libwxgtk2.8-dev&lt;br /&gt;
$ sudo apt-get install libwxgtk2.8-0&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you don't find any package you must install the library from source as described below, and you can redo this check afterwards to verify that the installation worked correctly.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
''Note for Debian (and Ubuntu?) users:'' You can use &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;$ update-alternatives --config wx-config&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
to see which version of libwx is there or not and currently active.&lt;br /&gt;
&lt;br /&gt;
====Getting wxGTK sources====&lt;br /&gt;
&lt;br /&gt;
Visit the [http://www.wxwidgets.org wxWidgets web site]. Click the &amp;quot;Download&amp;quot; button at the top of the page. Under wxWidgets 2.8.7 downloads, select wxGTK. Save the file in &amp;lt;tt&amp;gt;~/devel&amp;lt;/tt&amp;gt;. After the download finishes, switch to &amp;lt;tt&amp;gt;~/devel&amp;lt;/tt&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;cd ~/devel&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, untar the wxGTK sources:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;tar zxf wxGTK-2.8.7.tar.gz&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Switch to the wxGTK directory&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;cd wxGTK-2.8.7&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====wxWidgets build====&lt;br /&gt;
&lt;br /&gt;
Here we will create a seperate build directory instead of building from the src directory, so that we can easily rebuild with different options (unicode / ansi, monolithic / many libs, etc).&lt;br /&gt;
&lt;br /&gt;
The documentation says the default is for gtk2 to use unicode and wx &amp;gt; 2.5 to build as a monolithic library.  This doesn't appear to be the case, so these flags are passed to configure.&lt;br /&gt;
&lt;br /&gt;
 mkdir build_gtk2_shared_monolithic_unicode&lt;br /&gt;
 cd build_gtk2_shared_monolithic_unicode&lt;br /&gt;
 ../configure --prefix=/opt/wx/2.8 \&lt;br /&gt;
        --enable-xrc \&lt;br /&gt;
        --enable-monolithic \&lt;br /&gt;
        --enable-unicode&lt;br /&gt;
 make&lt;br /&gt;
 su&lt;br /&gt;
 make install&lt;br /&gt;
 exit&lt;br /&gt;
&lt;br /&gt;
Add /opt/wx/2.8/bin to the PATH (if you're shell is bash then edit /etc/profile or ~/.bash_profile)&lt;br /&gt;
(On Suse 10.1 edit /etc/profile.local, it will only be available after a new login).  an example PATH&lt;br /&gt;
 export PATH=/usr/bin:/opt/wx/2.8/bin:$PATH&lt;br /&gt;
&lt;br /&gt;
'''Note:''' On Ubuntu Hoary it was necessary to check &amp;quot;Run command as login shell&amp;quot; &lt;br /&gt;
in the gnome-terminal profile-settings, otherwise the PATH changes are not available in a gnome-terminal window.&lt;br /&gt;
&lt;br /&gt;
add /opt/wx/2.8/lib to /etc/ld.so.conf (nano /etc/ld.so.conf)&lt;br /&gt;
then run:&lt;br /&gt;
 ldconfig&lt;br /&gt;
 source /etc/profile&lt;br /&gt;
&lt;br /&gt;
That's it.  Now the linker will look in /opt/wx/2.8/lib for wx libraries and you will have a monolithic shared library unicode build.&lt;br /&gt;
&lt;br /&gt;
To check that things are working, type:&lt;br /&gt;
 wx-config --prefix&lt;br /&gt;
which should give you /opt/wx/2.8&lt;br /&gt;
 wx-config --libs&lt;br /&gt;
which should have at least&lt;br /&gt;
 -L/opt/wx/2.8/lib -lwx_gtk2-2.8&lt;br /&gt;
but can contain other flags as well.&lt;br /&gt;
 which wx-config&lt;br /&gt;
should return /opt/wx/2.8/bin/wx-config&lt;br /&gt;
&lt;br /&gt;
===Code::Blocks installation===&lt;br /&gt;
&lt;br /&gt;
====Downloading Code::Blocks====&lt;br /&gt;
&lt;br /&gt;
You can get Code::Blocks source code [https://www.codeblocks.org/downloads/6 from the website as a tarball] or from the SVN repository (this second method is described below).&lt;br /&gt;
&lt;br /&gt;
=====Getting the latest sources from SVN=====&lt;br /&gt;
NOTICE: The Sourceforge CVS is no longer used although it still exists&lt;br /&gt;
&lt;br /&gt;
Enter your development directory:&lt;br /&gt;
&amp;lt;pre&amp;gt;cd ~/devel&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then checkout the source using one of [https://www.codeblocks.org/downloads/7 these] methods.&lt;br /&gt;
&lt;br /&gt;
This will create the directory &amp;lt;tt&amp;gt;trunk&amp;lt;/tt&amp;gt;.&lt;br /&gt;
Change to the source code directory, by issuing the following command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;cd trunk&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Building Code::Blocks SVN====&lt;br /&gt;
If you are a Gentoo user, please see [[Compiling_Code::Blocks_in_Gentoo]].&lt;br /&gt;
&lt;br /&gt;
Before beginning, it is often a good idea to check you have recent versions of autoconf and automake - repositories versions are not always recent enough. (if you do not have automake, then you will get &amp;quot;cannot find aclocal&amp;quot; error).&lt;br /&gt;
&lt;br /&gt;
If you're compiling the svn trunk versions of CodeBlocks (or future versions) then the unix build has switched to autotools.  So first build wxWidgets as described above and then build CodeBlocks as follows:&lt;br /&gt;
&lt;br /&gt;
 ./bootstrap&lt;br /&gt;
&lt;br /&gt;
This sets up the configure script and its dependencies.  It only needs to be run once (after downloading the source from svn).  '''If you get errors like:'''&lt;br /&gt;
 aclocal:configure.in:61: warning: macro `AM_OPTIONS_WXCONFIG' not found in library&lt;br /&gt;
Then aclocal is having trouble finding the wxWidgets .m4 files.  You can do one of two things:&lt;br /&gt;
To just get bootstrap to find the path this time do:&lt;br /&gt;
&amp;lt;!-- *********** Bad syntax... removed 2006-08-28 by BentFX ****************************&lt;br /&gt;
 export ACLOCAL_FLAGS=&amp;quot;--acdir=`wx-config --prefix`/share/aclocal&amp;quot;&lt;br /&gt;
&lt;br /&gt;
: Note: The above command resulted in missing macros when running ./bootstrap for me. Setting an additional search path instead of overwriting like above worked for me. In case of missing macros try &lt;br /&gt;
***********************************************************************************--&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;export ACLOCAL_FLAGS=&amp;quot;-I `wx-config --prefix`/share/aclocal&amp;quot;&amp;lt;/pre&amp;gt; &amp;lt;!--[[User:Jabber|Jabber]] 06:24, 2 August 2006 (EDT)--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To change the aclocal search path more permanently do:&lt;br /&gt;
 echo `wx-config --prefix`/share/aclocal &amp;gt;&amp;gt; /usr/share/aclocal/dirlist&lt;br /&gt;
Then aclocal will also search somewhere like /opt/wx/2.6/share/aclocal&lt;br /&gt;
&lt;br /&gt;
'''Note for Ubuntu users:''' The above is not the correct way to fix the AM_* errors. Rather, you only need to install the package named &amp;quot;wx-common&amp;quot; (Universe repository).&lt;br /&gt;
&lt;br /&gt;
If you get something like&lt;br /&gt;
 The usual way to define `LIBTOOL' is to add `AC_PROG_LIBTOOL'&lt;br /&gt;
&lt;br /&gt;
it can be solved by something like: (adapt path, use `wx-config --prefix` is necessary)&lt;br /&gt;
&lt;br /&gt;
 ACLOCAL_FLAGS=&amp;quot;-I /usr/share/aclocal&amp;quot; ./bootstrap&lt;br /&gt;
&lt;br /&gt;
(*Note// '''If you run ./bootstrap and get errors like''':&lt;br /&gt;
 : bad interpreter: File not found&lt;br /&gt;
then there exists a problem with DOS line-endings. i had this error after i tried to build a  codeblocks from sources which were checked out with cvs on a windows machine. After i checked out a fresh copy of codeblocks from cvs under Ubuntu linux (see above topic: Downloading the latest source package fom SVN), all errors were gone. &lt;br /&gt;
//tiwag 051008*)&amp;lt;br&amp;gt;&lt;br /&gt;
Or, instead of downloading from SVN, you might consider using the little command line tool dos2unix, which normally comes with most distributions. //lizzarddude060103&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
If configure aborts with some unspecific error message(&amp;quot;.infig.status: error: cannot find input file: Makefile&amp;quot;), you might consider also running&lt;br /&gt;
 dos2unix bootstrap acinclude.m4 codeblocks.pc.in configure.in Makefile.am&lt;br /&gt;
before running bootstrap&lt;br /&gt;
&lt;br /&gt;
Once you've run the bootstrap script, installing is as simple as:&lt;br /&gt;
 ./configure&lt;br /&gt;
 make&lt;br /&gt;
 make install&lt;br /&gt;
&lt;br /&gt;
If you have multiple versions of wxWidgets installed or kept them inplace, you can use&lt;br /&gt;
./configure --with-wx-config=/path/to/wx-config&lt;br /&gt;
&lt;br /&gt;
To uninstall you can later run:&lt;br /&gt;
 make uninstall&lt;br /&gt;
&lt;br /&gt;
If you want to recompile everything, first run:&lt;br /&gt;
 make clean&lt;br /&gt;
 make distclean&lt;br /&gt;
 make clean-bin&lt;br /&gt;
 make clean-zipfiles&lt;br /&gt;
and then follow the above sequence for installing.&lt;br /&gt;
&lt;br /&gt;
By default, CodeBlocks will install to /usr/local.  If you want it in its own tree (so you can have multiple versions of CodeBlocks, each in its own subdirectory of /opt) replace the above ./configure command with:&lt;br /&gt;
 ./configure --prefix=/opt/codeblocks-svn&lt;br /&gt;
or similar.  Then you can later install a different build like:&lt;br /&gt;
 ./configure --prefix=/opt/codeblocks2-svn&lt;br /&gt;
followed by 'make &amp;amp;&amp;amp; make install' as usual.&lt;br /&gt;
&lt;br /&gt;
By default, CodeBlocks will not compile the contributed plugins from SVN.  If you want to compile / install them too, replace the above ./configure command with:&lt;br /&gt;
 ./configure --with-contrib-plugins=all&lt;br /&gt;
followed by 'make &amp;amp;&amp;amp; make install' as usual.&lt;br /&gt;
&lt;br /&gt;
To see a list of other options available for configuring the build of CodeBlocks do:&lt;br /&gt;
 ./configure --help&lt;br /&gt;
&lt;br /&gt;
To compile under gentoo, use&lt;br /&gt;
 ./configure --with-wx-config=wx-config-2.8&lt;br /&gt;
&lt;br /&gt;
====Resolving issues with Code::Blocks SVN====&lt;br /&gt;
&lt;br /&gt;
When running Code::Blocks after the installation it might happen, that the system complains:&lt;br /&gt;
 codeblocks: error while loading shared libraries: libcodeblocks.so.0: cannot open shared object file: No such file or directory&lt;br /&gt;
In that case make sure the library path where the Code::Blocks libraries where installed into is &amp;quot;known&amp;quot; to the system. For example: On Ubuntu using a default build process on a clean system will install the Code::Blocks executables to /use/local/bin and the libraries to /usr/local/lib. The latter is usually not known to a &amp;quot;clean&amp;quot; Ubuntu system. To add it to the search path for libraries do the following (as root / using sudo respectively):&lt;br /&gt;
Add the following line to the file /etc/ld.so.conf:&lt;br /&gt;
 /usr/local/lib&lt;br /&gt;
...and run:&lt;br /&gt;
 ldconfig&lt;br /&gt;
That's it - Code::Blocks should now work just fine as all libraries are being found.&lt;/div&gt;</summary>
		<author><name>Spacemonkey</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=Installing_Code::Blocks_from_source_on_Linux&amp;diff=6198</id>
		<title>Installing Code::Blocks from source on Linux</title>
		<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php?title=Installing_Code::Blocks_from_source_on_Linux&amp;diff=6198"/>
		<updated>2009-11-19T13:47:14Z</updated>

		<summary type="html">&lt;p&gt;Spacemonkey: /* Downloading Code::Blocks */&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;
These are instructions on how to build Code::Blocks under Linux. These instructions should work for all Linux distros, as we'll be installing from sources.&lt;br /&gt;
&lt;br /&gt;
===Prerequisites===&lt;br /&gt;
&lt;br /&gt;
In order to successfully compile Code::Blocks, the [http://en.wikipedia.org/wiki/WxWidgets wxWidgets] User Interface library &amp;lt;u&amp;gt;must be installed&amp;lt;/u&amp;gt;. For most Linux users, this is maybe the only dependency not already installed. wxWidget can be used directly on top of the X server, in this case the variant of the wxWidget library is called wxX11. However this library [http://wiki.wxwidgets.org/WxWidgets_Compared_To_Other_Toolkits#Why_You_Shouldn.27t_Use_wxWidgets &amp;quot;is sub-par compared to other toolkits and unstable&amp;quot;]. Hence Code::Blocks uses wxGTK, the version of wxWidget based on GTK+. The exact requirement is libwxGTK-2.8.0 or later (2.8.3 is not recommanded because of some troubles). This creates an additional dependency on GTK+, consider the following:&lt;br /&gt;
&lt;br /&gt;
A possible implementation which does not exist: &lt;br /&gt;
&lt;br /&gt;
''Code::Blocks  -&amp;gt;  xwWidget (libwxX11)  -&amp;gt;  X''&lt;br /&gt;
&lt;br /&gt;
Current Code::Blocks implementation: &lt;br /&gt;
&lt;br /&gt;
''Code::Blocks  -&amp;gt;  '''xwWidget (&amp;gt; libwxGTK2.8)'''  -&amp;gt;  '''GTK+ (&amp;gt; libgtk-x11-2.0)'''  -&amp;gt;  X''&lt;br /&gt;
&lt;br /&gt;
This document helps you to install libwxGTK if necessary but does not cover the installation of GTK+. GTK+ is probably installed on your Linux anyway, so don't worry ;)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
''Note:'' All the instructions below, assume an existing directory named &amp;lt;tt&amp;gt;~/devel&amp;lt;/tt&amp;gt;. If you 'll be using a different one, adjust the path to match.&lt;br /&gt;
As a first step create this directory:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;mkdir ~/devel&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Checking the presence of GTK+ library ===&lt;br /&gt;
&lt;br /&gt;
Have a look in /usr/lib for something like &amp;quot;libgtk-x11-2.0.so&amp;quot; (Note the library must be 2.0 minimum). Alternatively, do a search with your package manager or go to your Linux distribution forum for help. If you don't want to loose time, you can even forget this check since there is a good probability that everything is already installed.&lt;br /&gt;
&lt;br /&gt;
===Library wxGTK installation===&lt;br /&gt;
&lt;br /&gt;
==== Checking the presence of libwxGTK library ====&lt;br /&gt;
&lt;br /&gt;
In your package manager, look for 'libwxgtk' keyword and verify that '''all''' libwxgtk2.8 stuffs are installed. If you find the libraries uninstalled, well '''just install them and go directly to [https://wiki.codeblocks.org/index.php?title=Installing_Code::Blocks_from_source_on_Linux#Code::Blocks_installation Code::Blocks installation]'''.&lt;br /&gt;
&lt;br /&gt;
Alternatively you can do the same in command line (to give an idea, I don't say there is only 2 packages):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;$ ls /usr/lib/libwx_gtk* //to verify the presence&lt;br /&gt;
$ sudo apt-get install libwxgtk2.8-dev&lt;br /&gt;
$ sudo apt-get install libwxgtk2.8-0&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you don't find any package you must install the library from source as described below, and you can redo this check afterwards to verify that the installation worked correctly.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
''Note for Debian (and Ubuntu?) users:'' You can use &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;$ update-alternatives --config wx-config&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
to see which version of libwx is there or not and currently active.&lt;br /&gt;
&lt;br /&gt;
====Getting wxGTK sources====&lt;br /&gt;
&lt;br /&gt;
Visit the [http://www.wxwidgets.org wxWidgets web site]. Click the &amp;quot;Download&amp;quot; button at the top of the page. Under wxWidgets 2.8.7 downloads, select wxGTK. Save the file in &amp;lt;tt&amp;gt;~/devel&amp;lt;/tt&amp;gt;. After the download finishes, switch to &amp;lt;tt&amp;gt;~/devel&amp;lt;/tt&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;cd ~/devel&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, untar the wxGTK sources:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;tar zxf wxGTK-2.8.7.tar.gz&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Switch to the wxGTK directory&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;cd wxGTK-2.8.7&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====wxWidgets build====&lt;br /&gt;
&lt;br /&gt;
Here we will create a seperate build directory instead of building from the src directory, so that we can easily rebuild with different options (unicode / ansi, monolithic / many libs, etc).&lt;br /&gt;
&lt;br /&gt;
The documentation says the default is for gtk2 to use unicode and wx &amp;gt; 2.5 to build as a monolithic library.  This doesn't appear to be the case, so these flags are passed to configure.&lt;br /&gt;
&lt;br /&gt;
 mkdir build_gtk2_shared_monolithic_unicode&lt;br /&gt;
 cd build_gtk2_shared_monolithic_unicode&lt;br /&gt;
 ../configure --prefix=/opt/wx/2.8 \&lt;br /&gt;
        --enable-xrc \&lt;br /&gt;
        --enable-monolithic \&lt;br /&gt;
        --enable-unicode&lt;br /&gt;
 make&lt;br /&gt;
 su&lt;br /&gt;
 make install&lt;br /&gt;
 exit&lt;br /&gt;
&lt;br /&gt;
Add /opt/wx/2.8/bin to the PATH (if you're shell is bash then edit /etc/profile or ~/.bash_profile)&lt;br /&gt;
(On Suse 10.1 edit /etc/profile.local, it will only be available after a new login).  an example PATH&lt;br /&gt;
 export PATH=/usr/bin:/opt/wx/2.8/bin:$PATH&lt;br /&gt;
&lt;br /&gt;
'''Note:''' On Ubuntu Hoary it was necessary to check &amp;quot;Run command as login shell&amp;quot; &lt;br /&gt;
in the gnome-terminal profile-settings, otherwise the PATH changes are not available in a gnome-terminal window.&lt;br /&gt;
&lt;br /&gt;
add /opt/wx/2.8/lib to /etc/ld.so.conf (nano /etc/ld.so.conf)&lt;br /&gt;
then run:&lt;br /&gt;
 ldconfig&lt;br /&gt;
 source /etc/profile&lt;br /&gt;
&lt;br /&gt;
That's it.  Now the linker will look in /opt/wx/2.8/lib for wx libraries and you will have a monolithic shared library unicode build.&lt;br /&gt;
&lt;br /&gt;
To check that things are working, type:&lt;br /&gt;
 wx-config --prefix&lt;br /&gt;
which should give you /opt/wx/2.8&lt;br /&gt;
 wx-config --libs&lt;br /&gt;
which should have at least&lt;br /&gt;
 -L/opt/wx/2.8/lib -lwx_gtk2-2.8&lt;br /&gt;
but can contain other flags as well.&lt;br /&gt;
 which wx-config&lt;br /&gt;
should return /opt/wx/2.8/bin/wx-config&lt;br /&gt;
&lt;br /&gt;
===Code::Blocks installation===&lt;br /&gt;
&lt;br /&gt;
====Downloading Code::Blocks====&lt;br /&gt;
&lt;br /&gt;
You can get Code::Blocks source code from the website as a tarball or from the SVN repository (this second method is described below).&lt;br /&gt;
&lt;br /&gt;
=====Getting the latest sources from SVN=====&lt;br /&gt;
'''IMPORTANT NOTICE: The Sourceforge CVS is no longer used although it still exists'''&lt;br /&gt;
&lt;br /&gt;
Enter your development directory:&lt;br /&gt;
&amp;lt;pre&amp;gt;cd ~/devel&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then checkout the source using one of [https://www.codeblocks.org/downloads/7 these] methods.&lt;br /&gt;
&lt;br /&gt;
This will create the directory &amp;lt;tt&amp;gt;trunk&amp;lt;/tt&amp;gt;.&lt;br /&gt;
Change to the source code directory, by issuing the following command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;cd trunk&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Building Code::Blocks SVN====&lt;br /&gt;
If you are a Gentoo user, please see [[Compiling_Code::Blocks_in_Gentoo]].&lt;br /&gt;
&lt;br /&gt;
Before beginning, it is often a good idea to check you have recent versions of autoconf and automake - repositories versions are not always recent enough. (if you do not have automake, then you will get &amp;quot;cannot find aclocal&amp;quot; error).&lt;br /&gt;
&lt;br /&gt;
If you're compiling the svn trunk versions of CodeBlocks (or future versions) then the unix build has switched to autotools.  So first build wxWidgets as described above and then build CodeBlocks as follows:&lt;br /&gt;
&lt;br /&gt;
 ./bootstrap&lt;br /&gt;
&lt;br /&gt;
This sets up the configure script and its dependencies.  It only needs to be run once (after downloading the source from svn).  '''If you get errors like:'''&lt;br /&gt;
 aclocal:configure.in:61: warning: macro `AM_OPTIONS_WXCONFIG' not found in library&lt;br /&gt;
Then aclocal is having trouble finding the wxWidgets .m4 files.  You can do one of two things:&lt;br /&gt;
To just get bootstrap to find the path this time do:&lt;br /&gt;
&amp;lt;!-- *********** Bad syntax... removed 2006-08-28 by BentFX ****************************&lt;br /&gt;
 export ACLOCAL_FLAGS=&amp;quot;--acdir=`wx-config --prefix`/share/aclocal&amp;quot;&lt;br /&gt;
&lt;br /&gt;
: Note: The above command resulted in missing macros when running ./bootstrap for me. Setting an additional search path instead of overwriting like above worked for me. In case of missing macros try &lt;br /&gt;
***********************************************************************************--&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;export ACLOCAL_FLAGS=&amp;quot;-I `wx-config --prefix`/share/aclocal&amp;quot;&amp;lt;/pre&amp;gt; &amp;lt;!--[[User:Jabber|Jabber]] 06:24, 2 August 2006 (EDT)--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To change the aclocal search path more permanently do:&lt;br /&gt;
 echo `wx-config --prefix`/share/aclocal &amp;gt;&amp;gt; /usr/share/aclocal/dirlist&lt;br /&gt;
Then aclocal will also search somewhere like /opt/wx/2.6/share/aclocal&lt;br /&gt;
&lt;br /&gt;
'''Note for Ubuntu users:''' The above is not the correct way to fix the AM_* errors. Rather, you only need to install the package named &amp;quot;wx-common&amp;quot; (Universe repository).&lt;br /&gt;
&lt;br /&gt;
If you get something like&lt;br /&gt;
 The usual way to define `LIBTOOL' is to add `AC_PROG_LIBTOOL'&lt;br /&gt;
&lt;br /&gt;
it can be solved by something like: (adapt path, use `wx-config --prefix` is necessary)&lt;br /&gt;
&lt;br /&gt;
 ACLOCAL_FLAGS=&amp;quot;-I /usr/share/aclocal&amp;quot; ./bootstrap&lt;br /&gt;
&lt;br /&gt;
(*Note// '''If you run ./bootstrap and get errors like''':&lt;br /&gt;
 : bad interpreter: File not found&lt;br /&gt;
then there exists a problem with DOS line-endings. i had this error after i tried to build a  codeblocks from sources which were checked out with cvs on a windows machine. After i checked out a fresh copy of codeblocks from cvs under Ubuntu linux (see above topic: Downloading the latest source package fom SVN), all errors were gone. &lt;br /&gt;
//tiwag 051008*)&amp;lt;br&amp;gt;&lt;br /&gt;
Or, instead of downloading from SVN, you might consider using the little command line tool dos2unix, which normally comes with most distributions. //lizzarddude060103&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
If configure aborts with some unspecific error message(&amp;quot;.infig.status: error: cannot find input file: Makefile&amp;quot;), you might consider also running&lt;br /&gt;
 dos2unix bootstrap acinclude.m4 codeblocks.pc.in configure.in Makefile.am&lt;br /&gt;
before running bootstrap&lt;br /&gt;
&lt;br /&gt;
Once you've run the bootstrap script, installing is as simple as:&lt;br /&gt;
 ./configure&lt;br /&gt;
 make&lt;br /&gt;
 make install&lt;br /&gt;
&lt;br /&gt;
If you have multiple versions of wxWidgets installed or kept them inplace, you can use&lt;br /&gt;
./configure --with-wx-config=/path/to/wx-config&lt;br /&gt;
&lt;br /&gt;
To uninstall you can later run:&lt;br /&gt;
 make uninstall&lt;br /&gt;
&lt;br /&gt;
If you want to recompile everything, first run:&lt;br /&gt;
 make clean&lt;br /&gt;
 make distclean&lt;br /&gt;
 make clean-bin&lt;br /&gt;
 make clean-zipfiles&lt;br /&gt;
and then follow the above sequence for installing.&lt;br /&gt;
&lt;br /&gt;
By default, CodeBlocks will install to /usr/local.  If you want it in its own tree (so you can have multiple versions of CodeBlocks, each in its own subdirectory of /opt) replace the above ./configure command with:&lt;br /&gt;
 ./configure --prefix=/opt/codeblocks-svn&lt;br /&gt;
or similar.  Then you can later install a different build like:&lt;br /&gt;
 ./configure --prefix=/opt/codeblocks2-svn&lt;br /&gt;
followed by 'make &amp;amp;&amp;amp; make install' as usual.&lt;br /&gt;
&lt;br /&gt;
By default, CodeBlocks will not compile the contributed plugins from SVN.  If you want to compile / install them too, replace the above ./configure command with:&lt;br /&gt;
 ./configure --with-contrib-plugins=all&lt;br /&gt;
followed by 'make &amp;amp;&amp;amp; make install' as usual.&lt;br /&gt;
&lt;br /&gt;
To see a list of other options available for configuring the build of CodeBlocks do:&lt;br /&gt;
 ./configure --help&lt;br /&gt;
&lt;br /&gt;
To compile under gentoo, use&lt;br /&gt;
 ./configure --with-wx-config=wx-config-2.8&lt;br /&gt;
&lt;br /&gt;
====Resolving issues with Code::Blocks SVN====&lt;br /&gt;
&lt;br /&gt;
When running Code::Blocks after the installation it might happen, that the system complains:&lt;br /&gt;
 codeblocks: error while loading shared libraries: libcodeblocks.so.0: cannot open shared object file: No such file or directory&lt;br /&gt;
In that case make sure the library path where the Code::Blocks libraries where installed into is &amp;quot;known&amp;quot; to the system. For example: On Ubuntu using a default build process on a clean system will install the Code::Blocks executables to /use/local/bin and the libraries to /usr/local/lib. The latter is usually not known to a &amp;quot;clean&amp;quot; Ubuntu system. To add it to the search path for libraries do the following (as root / using sudo respectively):&lt;br /&gt;
Add the following line to the file /etc/ld.so.conf:&lt;br /&gt;
 /usr/local/lib&lt;br /&gt;
...and run:&lt;br /&gt;
 ldconfig&lt;br /&gt;
That's it - Code::Blocks should now work just fine as all libraries are being found.&lt;/div&gt;</summary>
		<author><name>Spacemonkey</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=Installing_Code::Blocks_from_source_on_Linux&amp;diff=6197</id>
		<title>Installing Code::Blocks from source on Linux</title>
		<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php?title=Installing_Code::Blocks_from_source_on_Linux&amp;diff=6197"/>
		<updated>2009-11-19T13:45:07Z</updated>

		<summary type="html">&lt;p&gt;Spacemonkey: /* Checking the presence of libwxGTK library */&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;
These are instructions on how to build Code::Blocks under Linux. These instructions should work for all Linux distros, as we'll be installing from sources.&lt;br /&gt;
&lt;br /&gt;
===Prerequisites===&lt;br /&gt;
&lt;br /&gt;
In order to successfully compile Code::Blocks, the [http://en.wikipedia.org/wiki/WxWidgets wxWidgets] User Interface library &amp;lt;u&amp;gt;must be installed&amp;lt;/u&amp;gt;. For most Linux users, this is maybe the only dependency not already installed. wxWidget can be used directly on top of the X server, in this case the variant of the wxWidget library is called wxX11. However this library [http://wiki.wxwidgets.org/WxWidgets_Compared_To_Other_Toolkits#Why_You_Shouldn.27t_Use_wxWidgets &amp;quot;is sub-par compared to other toolkits and unstable&amp;quot;]. Hence Code::Blocks uses wxGTK, the version of wxWidget based on GTK+. The exact requirement is libwxGTK-2.8.0 or later (2.8.3 is not recommanded because of some troubles). This creates an additional dependency on GTK+, consider the following:&lt;br /&gt;
&lt;br /&gt;
A possible implementation which does not exist: &lt;br /&gt;
&lt;br /&gt;
''Code::Blocks  -&amp;gt;  xwWidget (libwxX11)  -&amp;gt;  X''&lt;br /&gt;
&lt;br /&gt;
Current Code::Blocks implementation: &lt;br /&gt;
&lt;br /&gt;
''Code::Blocks  -&amp;gt;  '''xwWidget (&amp;gt; libwxGTK2.8)'''  -&amp;gt;  '''GTK+ (&amp;gt; libgtk-x11-2.0)'''  -&amp;gt;  X''&lt;br /&gt;
&lt;br /&gt;
This document helps you to install libwxGTK if necessary but does not cover the installation of GTK+. GTK+ is probably installed on your Linux anyway, so don't worry ;)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
''Note:'' All the instructions below, assume an existing directory named &amp;lt;tt&amp;gt;~/devel&amp;lt;/tt&amp;gt;. If you 'll be using a different one, adjust the path to match.&lt;br /&gt;
As a first step create this directory:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;mkdir ~/devel&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Checking the presence of GTK+ library ===&lt;br /&gt;
&lt;br /&gt;
Have a look in /usr/lib for something like &amp;quot;libgtk-x11-2.0.so&amp;quot; (Note the library must be 2.0 minimum). Alternatively, do a search with your package manager or go to your Linux distribution forum for help. If you don't want to loose time, you can even forget this check since there is a good probability that everything is already installed.&lt;br /&gt;
&lt;br /&gt;
===Library wxGTK installation===&lt;br /&gt;
&lt;br /&gt;
==== Checking the presence of libwxGTK library ====&lt;br /&gt;
&lt;br /&gt;
In your package manager, look for 'libwxgtk' keyword and verify that '''all''' libwxgtk2.8 stuffs are installed. If you find the libraries uninstalled, well '''just install them and go directly to [https://wiki.codeblocks.org/index.php?title=Installing_Code::Blocks_from_source_on_Linux#Code::Blocks_installation Code::Blocks installation]'''.&lt;br /&gt;
&lt;br /&gt;
Alternatively you can do the same in command line (to give an idea, I don't say there is only 2 packages):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;$ ls /usr/lib/libwx_gtk* //to verify the presence&lt;br /&gt;
$ sudo apt-get install libwxgtk2.8-dev&lt;br /&gt;
$ sudo apt-get install libwxgtk2.8-0&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you don't find any package you must install the library from source as described below, and you can redo this check afterwards to verify that the installation worked correctly.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
''Note for Debian (and Ubuntu?) users:'' You can use &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;$ update-alternatives --config wx-config&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
to see which version of libwx is there or not and currently active.&lt;br /&gt;
&lt;br /&gt;
====Getting wxGTK sources====&lt;br /&gt;
&lt;br /&gt;
Visit the [http://www.wxwidgets.org wxWidgets web site]. Click the &amp;quot;Download&amp;quot; button at the top of the page. Under wxWidgets 2.8.7 downloads, select wxGTK. Save the file in &amp;lt;tt&amp;gt;~/devel&amp;lt;/tt&amp;gt;. After the download finishes, switch to &amp;lt;tt&amp;gt;~/devel&amp;lt;/tt&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;cd ~/devel&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, untar the wxGTK sources:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;tar zxf wxGTK-2.8.7.tar.gz&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Switch to the wxGTK directory&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;cd wxGTK-2.8.7&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====wxWidgets build====&lt;br /&gt;
&lt;br /&gt;
Here we will create a seperate build directory instead of building from the src directory, so that we can easily rebuild with different options (unicode / ansi, monolithic / many libs, etc).&lt;br /&gt;
&lt;br /&gt;
The documentation says the default is for gtk2 to use unicode and wx &amp;gt; 2.5 to build as a monolithic library.  This doesn't appear to be the case, so these flags are passed to configure.&lt;br /&gt;
&lt;br /&gt;
 mkdir build_gtk2_shared_monolithic_unicode&lt;br /&gt;
 cd build_gtk2_shared_monolithic_unicode&lt;br /&gt;
 ../configure --prefix=/opt/wx/2.8 \&lt;br /&gt;
        --enable-xrc \&lt;br /&gt;
        --enable-monolithic \&lt;br /&gt;
        --enable-unicode&lt;br /&gt;
 make&lt;br /&gt;
 su&lt;br /&gt;
 make install&lt;br /&gt;
 exit&lt;br /&gt;
&lt;br /&gt;
Add /opt/wx/2.8/bin to the PATH (if you're shell is bash then edit /etc/profile or ~/.bash_profile)&lt;br /&gt;
(On Suse 10.1 edit /etc/profile.local, it will only be available after a new login).  an example PATH&lt;br /&gt;
 export PATH=/usr/bin:/opt/wx/2.8/bin:$PATH&lt;br /&gt;
&lt;br /&gt;
'''Note:''' On Ubuntu Hoary it was necessary to check &amp;quot;Run command as login shell&amp;quot; &lt;br /&gt;
in the gnome-terminal profile-settings, otherwise the PATH changes are not available in a gnome-terminal window.&lt;br /&gt;
&lt;br /&gt;
add /opt/wx/2.8/lib to /etc/ld.so.conf (nano /etc/ld.so.conf)&lt;br /&gt;
then run:&lt;br /&gt;
 ldconfig&lt;br /&gt;
 source /etc/profile&lt;br /&gt;
&lt;br /&gt;
That's it.  Now the linker will look in /opt/wx/2.8/lib for wx libraries and you will have a monolithic shared library unicode build.&lt;br /&gt;
&lt;br /&gt;
To check that things are working, type:&lt;br /&gt;
 wx-config --prefix&lt;br /&gt;
which should give you /opt/wx/2.8&lt;br /&gt;
 wx-config --libs&lt;br /&gt;
which should have at least&lt;br /&gt;
 -L/opt/wx/2.8/lib -lwx_gtk2-2.8&lt;br /&gt;
but can contain other flags as well.&lt;br /&gt;
 which wx-config&lt;br /&gt;
should return /opt/wx/2.8/bin/wx-config&lt;br /&gt;
&lt;br /&gt;
===Code::Blocks installation===&lt;br /&gt;
&lt;br /&gt;
====Downloading Code::Blocks====&lt;br /&gt;
&lt;br /&gt;
You can get Code::Blocks source code in one way:&lt;br /&gt;
* Get the latest sources from the SVN repository.&lt;br /&gt;
This method is described below.&lt;br /&gt;
&lt;br /&gt;
=====Getting the latest sources from SVN=====&lt;br /&gt;
'''IMPORTANT NOTICE: The Sourceforge CVS is no longer used although it still exists'''&lt;br /&gt;
&lt;br /&gt;
Enter your development directory:&lt;br /&gt;
&amp;lt;pre&amp;gt;cd ~/devel&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then checkout the source using one of [https://www.codeblocks.org/downloads/7 these] methods.&lt;br /&gt;
&lt;br /&gt;
This will create the directory &amp;lt;tt&amp;gt;trunk&amp;lt;/tt&amp;gt;.&lt;br /&gt;
Change to the source code directory, by issuing the following command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;cd trunk&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Building Code::Blocks SVN====&lt;br /&gt;
If you are a Gentoo user, please see [[Compiling_Code::Blocks_in_Gentoo]].&lt;br /&gt;
&lt;br /&gt;
Before beginning, it is often a good idea to check you have recent versions of autoconf and automake - repositories versions are not always recent enough. (if you do not have automake, then you will get &amp;quot;cannot find aclocal&amp;quot; error).&lt;br /&gt;
&lt;br /&gt;
If you're compiling the svn trunk versions of CodeBlocks (or future versions) then the unix build has switched to autotools.  So first build wxWidgets as described above and then build CodeBlocks as follows:&lt;br /&gt;
&lt;br /&gt;
 ./bootstrap&lt;br /&gt;
&lt;br /&gt;
This sets up the configure script and its dependencies.  It only needs to be run once (after downloading the source from svn).  '''If you get errors like:'''&lt;br /&gt;
 aclocal:configure.in:61: warning: macro `AM_OPTIONS_WXCONFIG' not found in library&lt;br /&gt;
Then aclocal is having trouble finding the wxWidgets .m4 files.  You can do one of two things:&lt;br /&gt;
To just get bootstrap to find the path this time do:&lt;br /&gt;
&amp;lt;!-- *********** Bad syntax... removed 2006-08-28 by BentFX ****************************&lt;br /&gt;
 export ACLOCAL_FLAGS=&amp;quot;--acdir=`wx-config --prefix`/share/aclocal&amp;quot;&lt;br /&gt;
&lt;br /&gt;
: Note: The above command resulted in missing macros when running ./bootstrap for me. Setting an additional search path instead of overwriting like above worked for me. In case of missing macros try &lt;br /&gt;
***********************************************************************************--&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;export ACLOCAL_FLAGS=&amp;quot;-I `wx-config --prefix`/share/aclocal&amp;quot;&amp;lt;/pre&amp;gt; &amp;lt;!--[[User:Jabber|Jabber]] 06:24, 2 August 2006 (EDT)--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To change the aclocal search path more permanently do:&lt;br /&gt;
 echo `wx-config --prefix`/share/aclocal &amp;gt;&amp;gt; /usr/share/aclocal/dirlist&lt;br /&gt;
Then aclocal will also search somewhere like /opt/wx/2.6/share/aclocal&lt;br /&gt;
&lt;br /&gt;
'''Note for Ubuntu users:''' The above is not the correct way to fix the AM_* errors. Rather, you only need to install the package named &amp;quot;wx-common&amp;quot; (Universe repository).&lt;br /&gt;
&lt;br /&gt;
If you get something like&lt;br /&gt;
 The usual way to define `LIBTOOL' is to add `AC_PROG_LIBTOOL'&lt;br /&gt;
&lt;br /&gt;
it can be solved by something like: (adapt path, use `wx-config --prefix` is necessary)&lt;br /&gt;
&lt;br /&gt;
 ACLOCAL_FLAGS=&amp;quot;-I /usr/share/aclocal&amp;quot; ./bootstrap&lt;br /&gt;
&lt;br /&gt;
(*Note// '''If you run ./bootstrap and get errors like''':&lt;br /&gt;
 : bad interpreter: File not found&lt;br /&gt;
then there exists a problem with DOS line-endings. i had this error after i tried to build a  codeblocks from sources which were checked out with cvs on a windows machine. After i checked out a fresh copy of codeblocks from cvs under Ubuntu linux (see above topic: Downloading the latest source package fom SVN), all errors were gone. &lt;br /&gt;
//tiwag 051008*)&amp;lt;br&amp;gt;&lt;br /&gt;
Or, instead of downloading from SVN, you might consider using the little command line tool dos2unix, which normally comes with most distributions. //lizzarddude060103&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
If configure aborts with some unspecific error message(&amp;quot;.infig.status: error: cannot find input file: Makefile&amp;quot;), you might consider also running&lt;br /&gt;
 dos2unix bootstrap acinclude.m4 codeblocks.pc.in configure.in Makefile.am&lt;br /&gt;
before running bootstrap&lt;br /&gt;
&lt;br /&gt;
Once you've run the bootstrap script, installing is as simple as:&lt;br /&gt;
 ./configure&lt;br /&gt;
 make&lt;br /&gt;
 make install&lt;br /&gt;
&lt;br /&gt;
If you have multiple versions of wxWidgets installed or kept them inplace, you can use&lt;br /&gt;
./configure --with-wx-config=/path/to/wx-config&lt;br /&gt;
&lt;br /&gt;
To uninstall you can later run:&lt;br /&gt;
 make uninstall&lt;br /&gt;
&lt;br /&gt;
If you want to recompile everything, first run:&lt;br /&gt;
 make clean&lt;br /&gt;
 make distclean&lt;br /&gt;
 make clean-bin&lt;br /&gt;
 make clean-zipfiles&lt;br /&gt;
and then follow the above sequence for installing.&lt;br /&gt;
&lt;br /&gt;
By default, CodeBlocks will install to /usr/local.  If you want it in its own tree (so you can have multiple versions of CodeBlocks, each in its own subdirectory of /opt) replace the above ./configure command with:&lt;br /&gt;
 ./configure --prefix=/opt/codeblocks-svn&lt;br /&gt;
or similar.  Then you can later install a different build like:&lt;br /&gt;
 ./configure --prefix=/opt/codeblocks2-svn&lt;br /&gt;
followed by 'make &amp;amp;&amp;amp; make install' as usual.&lt;br /&gt;
&lt;br /&gt;
By default, CodeBlocks will not compile the contributed plugins from SVN.  If you want to compile / install them too, replace the above ./configure command with:&lt;br /&gt;
 ./configure --with-contrib-plugins=all&lt;br /&gt;
followed by 'make &amp;amp;&amp;amp; make install' as usual.&lt;br /&gt;
&lt;br /&gt;
To see a list of other options available for configuring the build of CodeBlocks do:&lt;br /&gt;
 ./configure --help&lt;br /&gt;
&lt;br /&gt;
To compile under gentoo, use&lt;br /&gt;
 ./configure --with-wx-config=wx-config-2.8&lt;br /&gt;
&lt;br /&gt;
====Resolving issues with Code::Blocks SVN====&lt;br /&gt;
&lt;br /&gt;
When running Code::Blocks after the installation it might happen, that the system complains:&lt;br /&gt;
 codeblocks: error while loading shared libraries: libcodeblocks.so.0: cannot open shared object file: No such file or directory&lt;br /&gt;
In that case make sure the library path where the Code::Blocks libraries where installed into is &amp;quot;known&amp;quot; to the system. For example: On Ubuntu using a default build process on a clean system will install the Code::Blocks executables to /use/local/bin and the libraries to /usr/local/lib. The latter is usually not known to a &amp;quot;clean&amp;quot; Ubuntu system. To add it to the search path for libraries do the following (as root / using sudo respectively):&lt;br /&gt;
Add the following line to the file /etc/ld.so.conf:&lt;br /&gt;
 /usr/local/lib&lt;br /&gt;
...and run:&lt;br /&gt;
 ldconfig&lt;br /&gt;
That's it - Code::Blocks should now work just fine as all libraries are being found.&lt;/div&gt;</summary>
		<author><name>Spacemonkey</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=Installing_Code::Blocks_from_source_on_Linux&amp;diff=6196</id>
		<title>Installing Code::Blocks from source on Linux</title>
		<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php?title=Installing_Code::Blocks_from_source_on_Linux&amp;diff=6196"/>
		<updated>2009-11-19T13:44:41Z</updated>

		<summary type="html">&lt;p&gt;Spacemonkey: /* Checking the presence of libwxGTK library */&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;
These are instructions on how to build Code::Blocks under Linux. These instructions should work for all Linux distros, as we'll be installing from sources.&lt;br /&gt;
&lt;br /&gt;
===Prerequisites===&lt;br /&gt;
&lt;br /&gt;
In order to successfully compile Code::Blocks, the [http://en.wikipedia.org/wiki/WxWidgets wxWidgets] User Interface library &amp;lt;u&amp;gt;must be installed&amp;lt;/u&amp;gt;. For most Linux users, this is maybe the only dependency not already installed. wxWidget can be used directly on top of the X server, in this case the variant of the wxWidget library is called wxX11. However this library [http://wiki.wxwidgets.org/WxWidgets_Compared_To_Other_Toolkits#Why_You_Shouldn.27t_Use_wxWidgets &amp;quot;is sub-par compared to other toolkits and unstable&amp;quot;]. Hence Code::Blocks uses wxGTK, the version of wxWidget based on GTK+. The exact requirement is libwxGTK-2.8.0 or later (2.8.3 is not recommanded because of some troubles). This creates an additional dependency on GTK+, consider the following:&lt;br /&gt;
&lt;br /&gt;
A possible implementation which does not exist: &lt;br /&gt;
&lt;br /&gt;
''Code::Blocks  -&amp;gt;  xwWidget (libwxX11)  -&amp;gt;  X''&lt;br /&gt;
&lt;br /&gt;
Current Code::Blocks implementation: &lt;br /&gt;
&lt;br /&gt;
''Code::Blocks  -&amp;gt;  '''xwWidget (&amp;gt; libwxGTK2.8)'''  -&amp;gt;  '''GTK+ (&amp;gt; libgtk-x11-2.0)'''  -&amp;gt;  X''&lt;br /&gt;
&lt;br /&gt;
This document helps you to install libwxGTK if necessary but does not cover the installation of GTK+. GTK+ is probably installed on your Linux anyway, so don't worry ;)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
''Note:'' All the instructions below, assume an existing directory named &amp;lt;tt&amp;gt;~/devel&amp;lt;/tt&amp;gt;. If you 'll be using a different one, adjust the path to match.&lt;br /&gt;
As a first step create this directory:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;mkdir ~/devel&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Checking the presence of GTK+ library ===&lt;br /&gt;
&lt;br /&gt;
Have a look in /usr/lib for something like &amp;quot;libgtk-x11-2.0.so&amp;quot; (Note the library must be 2.0 minimum). Alternatively, do a search with your package manager or go to your Linux distribution forum for help. If you don't want to loose time, you can even forget this check since there is a good probability that everything is already installed.&lt;br /&gt;
&lt;br /&gt;
===Library wxGTK installation===&lt;br /&gt;
&lt;br /&gt;
==== Checking the presence of libwxGTK library ====&lt;br /&gt;
&lt;br /&gt;
In your package manager, look for 'libwxgtk' keyword and verify that '''all''' libwxgtk2.8 stuffs are installed. If you find the libraries uninstalled, well '''just install them and go directly to [[Code::Blocks installation]]'''.&lt;br /&gt;
&lt;br /&gt;
Alternatively you can do the same in command line (to give an idea, I don't say there is only 2 packages):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;$ ls /usr/lib/libwx_gtk* //to verify the presence&lt;br /&gt;
$ sudo apt-get install libwxgtk2.8-dev&lt;br /&gt;
$ sudo apt-get install libwxgtk2.8-0&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you don't find any package you must install the library from source as described below, and you can redo this check afterwards to verify that the installation worked correctly.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
''Note for Debian (and Ubuntu?) users:'' You can use &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;$ update-alternatives --config wx-config&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
to see which version of libwx is there or not and currently active.&lt;br /&gt;
&lt;br /&gt;
====Getting wxGTK sources====&lt;br /&gt;
&lt;br /&gt;
Visit the [http://www.wxwidgets.org wxWidgets web site]. Click the &amp;quot;Download&amp;quot; button at the top of the page. Under wxWidgets 2.8.7 downloads, select wxGTK. Save the file in &amp;lt;tt&amp;gt;~/devel&amp;lt;/tt&amp;gt;. After the download finishes, switch to &amp;lt;tt&amp;gt;~/devel&amp;lt;/tt&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;cd ~/devel&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, untar the wxGTK sources:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;tar zxf wxGTK-2.8.7.tar.gz&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Switch to the wxGTK directory&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;cd wxGTK-2.8.7&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====wxWidgets build====&lt;br /&gt;
&lt;br /&gt;
Here we will create a seperate build directory instead of building from the src directory, so that we can easily rebuild with different options (unicode / ansi, monolithic / many libs, etc).&lt;br /&gt;
&lt;br /&gt;
The documentation says the default is for gtk2 to use unicode and wx &amp;gt; 2.5 to build as a monolithic library.  This doesn't appear to be the case, so these flags are passed to configure.&lt;br /&gt;
&lt;br /&gt;
 mkdir build_gtk2_shared_monolithic_unicode&lt;br /&gt;
 cd build_gtk2_shared_monolithic_unicode&lt;br /&gt;
 ../configure --prefix=/opt/wx/2.8 \&lt;br /&gt;
        --enable-xrc \&lt;br /&gt;
        --enable-monolithic \&lt;br /&gt;
        --enable-unicode&lt;br /&gt;
 make&lt;br /&gt;
 su&lt;br /&gt;
 make install&lt;br /&gt;
 exit&lt;br /&gt;
&lt;br /&gt;
Add /opt/wx/2.8/bin to the PATH (if you're shell is bash then edit /etc/profile or ~/.bash_profile)&lt;br /&gt;
(On Suse 10.1 edit /etc/profile.local, it will only be available after a new login).  an example PATH&lt;br /&gt;
 export PATH=/usr/bin:/opt/wx/2.8/bin:$PATH&lt;br /&gt;
&lt;br /&gt;
'''Note:''' On Ubuntu Hoary it was necessary to check &amp;quot;Run command as login shell&amp;quot; &lt;br /&gt;
in the gnome-terminal profile-settings, otherwise the PATH changes are not available in a gnome-terminal window.&lt;br /&gt;
&lt;br /&gt;
add /opt/wx/2.8/lib to /etc/ld.so.conf (nano /etc/ld.so.conf)&lt;br /&gt;
then run:&lt;br /&gt;
 ldconfig&lt;br /&gt;
 source /etc/profile&lt;br /&gt;
&lt;br /&gt;
That's it.  Now the linker will look in /opt/wx/2.8/lib for wx libraries and you will have a monolithic shared library unicode build.&lt;br /&gt;
&lt;br /&gt;
To check that things are working, type:&lt;br /&gt;
 wx-config --prefix&lt;br /&gt;
which should give you /opt/wx/2.8&lt;br /&gt;
 wx-config --libs&lt;br /&gt;
which should have at least&lt;br /&gt;
 -L/opt/wx/2.8/lib -lwx_gtk2-2.8&lt;br /&gt;
but can contain other flags as well.&lt;br /&gt;
 which wx-config&lt;br /&gt;
should return /opt/wx/2.8/bin/wx-config&lt;br /&gt;
&lt;br /&gt;
===Code::Blocks installation===&lt;br /&gt;
&lt;br /&gt;
====Downloading Code::Blocks====&lt;br /&gt;
&lt;br /&gt;
You can get Code::Blocks source code in one way:&lt;br /&gt;
* Get the latest sources from the SVN repository.&lt;br /&gt;
This method is described below.&lt;br /&gt;
&lt;br /&gt;
=====Getting the latest sources from SVN=====&lt;br /&gt;
'''IMPORTANT NOTICE: The Sourceforge CVS is no longer used although it still exists'''&lt;br /&gt;
&lt;br /&gt;
Enter your development directory:&lt;br /&gt;
&amp;lt;pre&amp;gt;cd ~/devel&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then checkout the source using one of [https://www.codeblocks.org/downloads/7 these] methods.&lt;br /&gt;
&lt;br /&gt;
This will create the directory &amp;lt;tt&amp;gt;trunk&amp;lt;/tt&amp;gt;.&lt;br /&gt;
Change to the source code directory, by issuing the following command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;cd trunk&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Building Code::Blocks SVN====&lt;br /&gt;
If you are a Gentoo user, please see [[Compiling_Code::Blocks_in_Gentoo]].&lt;br /&gt;
&lt;br /&gt;
Before beginning, it is often a good idea to check you have recent versions of autoconf and automake - repositories versions are not always recent enough. (if you do not have automake, then you will get &amp;quot;cannot find aclocal&amp;quot; error).&lt;br /&gt;
&lt;br /&gt;
If you're compiling the svn trunk versions of CodeBlocks (or future versions) then the unix build has switched to autotools.  So first build wxWidgets as described above and then build CodeBlocks as follows:&lt;br /&gt;
&lt;br /&gt;
 ./bootstrap&lt;br /&gt;
&lt;br /&gt;
This sets up the configure script and its dependencies.  It only needs to be run once (after downloading the source from svn).  '''If you get errors like:'''&lt;br /&gt;
 aclocal:configure.in:61: warning: macro `AM_OPTIONS_WXCONFIG' not found in library&lt;br /&gt;
Then aclocal is having trouble finding the wxWidgets .m4 files.  You can do one of two things:&lt;br /&gt;
To just get bootstrap to find the path this time do:&lt;br /&gt;
&amp;lt;!-- *********** Bad syntax... removed 2006-08-28 by BentFX ****************************&lt;br /&gt;
 export ACLOCAL_FLAGS=&amp;quot;--acdir=`wx-config --prefix`/share/aclocal&amp;quot;&lt;br /&gt;
&lt;br /&gt;
: Note: The above command resulted in missing macros when running ./bootstrap for me. Setting an additional search path instead of overwriting like above worked for me. In case of missing macros try &lt;br /&gt;
***********************************************************************************--&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;export ACLOCAL_FLAGS=&amp;quot;-I `wx-config --prefix`/share/aclocal&amp;quot;&amp;lt;/pre&amp;gt; &amp;lt;!--[[User:Jabber|Jabber]] 06:24, 2 August 2006 (EDT)--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To change the aclocal search path more permanently do:&lt;br /&gt;
 echo `wx-config --prefix`/share/aclocal &amp;gt;&amp;gt; /usr/share/aclocal/dirlist&lt;br /&gt;
Then aclocal will also search somewhere like /opt/wx/2.6/share/aclocal&lt;br /&gt;
&lt;br /&gt;
'''Note for Ubuntu users:''' The above is not the correct way to fix the AM_* errors. Rather, you only need to install the package named &amp;quot;wx-common&amp;quot; (Universe repository).&lt;br /&gt;
&lt;br /&gt;
If you get something like&lt;br /&gt;
 The usual way to define `LIBTOOL' is to add `AC_PROG_LIBTOOL'&lt;br /&gt;
&lt;br /&gt;
it can be solved by something like: (adapt path, use `wx-config --prefix` is necessary)&lt;br /&gt;
&lt;br /&gt;
 ACLOCAL_FLAGS=&amp;quot;-I /usr/share/aclocal&amp;quot; ./bootstrap&lt;br /&gt;
&lt;br /&gt;
(*Note// '''If you run ./bootstrap and get errors like''':&lt;br /&gt;
 : bad interpreter: File not found&lt;br /&gt;
then there exists a problem with DOS line-endings. i had this error after i tried to build a  codeblocks from sources which were checked out with cvs on a windows machine. After i checked out a fresh copy of codeblocks from cvs under Ubuntu linux (see above topic: Downloading the latest source package fom SVN), all errors were gone. &lt;br /&gt;
//tiwag 051008*)&amp;lt;br&amp;gt;&lt;br /&gt;
Or, instead of downloading from SVN, you might consider using the little command line tool dos2unix, which normally comes with most distributions. //lizzarddude060103&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
If configure aborts with some unspecific error message(&amp;quot;.infig.status: error: cannot find input file: Makefile&amp;quot;), you might consider also running&lt;br /&gt;
 dos2unix bootstrap acinclude.m4 codeblocks.pc.in configure.in Makefile.am&lt;br /&gt;
before running bootstrap&lt;br /&gt;
&lt;br /&gt;
Once you've run the bootstrap script, installing is as simple as:&lt;br /&gt;
 ./configure&lt;br /&gt;
 make&lt;br /&gt;
 make install&lt;br /&gt;
&lt;br /&gt;
If you have multiple versions of wxWidgets installed or kept them inplace, you can use&lt;br /&gt;
./configure --with-wx-config=/path/to/wx-config&lt;br /&gt;
&lt;br /&gt;
To uninstall you can later run:&lt;br /&gt;
 make uninstall&lt;br /&gt;
&lt;br /&gt;
If you want to recompile everything, first run:&lt;br /&gt;
 make clean&lt;br /&gt;
 make distclean&lt;br /&gt;
 make clean-bin&lt;br /&gt;
 make clean-zipfiles&lt;br /&gt;
and then follow the above sequence for installing.&lt;br /&gt;
&lt;br /&gt;
By default, CodeBlocks will install to /usr/local.  If you want it in its own tree (so you can have multiple versions of CodeBlocks, each in its own subdirectory of /opt) replace the above ./configure command with:&lt;br /&gt;
 ./configure --prefix=/opt/codeblocks-svn&lt;br /&gt;
or similar.  Then you can later install a different build like:&lt;br /&gt;
 ./configure --prefix=/opt/codeblocks2-svn&lt;br /&gt;
followed by 'make &amp;amp;&amp;amp; make install' as usual.&lt;br /&gt;
&lt;br /&gt;
By default, CodeBlocks will not compile the contributed plugins from SVN.  If you want to compile / install them too, replace the above ./configure command with:&lt;br /&gt;
 ./configure --with-contrib-plugins=all&lt;br /&gt;
followed by 'make &amp;amp;&amp;amp; make install' as usual.&lt;br /&gt;
&lt;br /&gt;
To see a list of other options available for configuring the build of CodeBlocks do:&lt;br /&gt;
 ./configure --help&lt;br /&gt;
&lt;br /&gt;
To compile under gentoo, use&lt;br /&gt;
 ./configure --with-wx-config=wx-config-2.8&lt;br /&gt;
&lt;br /&gt;
====Resolving issues with Code::Blocks SVN====&lt;br /&gt;
&lt;br /&gt;
When running Code::Blocks after the installation it might happen, that the system complains:&lt;br /&gt;
 codeblocks: error while loading shared libraries: libcodeblocks.so.0: cannot open shared object file: No such file or directory&lt;br /&gt;
In that case make sure the library path where the Code::Blocks libraries where installed into is &amp;quot;known&amp;quot; to the system. For example: On Ubuntu using a default build process on a clean system will install the Code::Blocks executables to /use/local/bin and the libraries to /usr/local/lib. The latter is usually not known to a &amp;quot;clean&amp;quot; Ubuntu system. To add it to the search path for libraries do the following (as root / using sudo respectively):&lt;br /&gt;
Add the following line to the file /etc/ld.so.conf:&lt;br /&gt;
 /usr/local/lib&lt;br /&gt;
...and run:&lt;br /&gt;
 ldconfig&lt;br /&gt;
That's it - Code::Blocks should now work just fine as all libraries are being found.&lt;/div&gt;</summary>
		<author><name>Spacemonkey</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=Installing_Code::Blocks_from_source_on_Linux&amp;diff=6195</id>
		<title>Installing Code::Blocks from source on Linux</title>
		<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php?title=Installing_Code::Blocks_from_source_on_Linux&amp;diff=6195"/>
		<updated>2009-11-19T13:44:08Z</updated>

		<summary type="html">&lt;p&gt;Spacemonkey: /* Checking the presence of libwxGTK library */&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;
These are instructions on how to build Code::Blocks under Linux. These instructions should work for all Linux distros, as we'll be installing from sources.&lt;br /&gt;
&lt;br /&gt;
===Prerequisites===&lt;br /&gt;
&lt;br /&gt;
In order to successfully compile Code::Blocks, the [http://en.wikipedia.org/wiki/WxWidgets wxWidgets] User Interface library &amp;lt;u&amp;gt;must be installed&amp;lt;/u&amp;gt;. For most Linux users, this is maybe the only dependency not already installed. wxWidget can be used directly on top of the X server, in this case the variant of the wxWidget library is called wxX11. However this library [http://wiki.wxwidgets.org/WxWidgets_Compared_To_Other_Toolkits#Why_You_Shouldn.27t_Use_wxWidgets &amp;quot;is sub-par compared to other toolkits and unstable&amp;quot;]. Hence Code::Blocks uses wxGTK, the version of wxWidget based on GTK+. The exact requirement is libwxGTK-2.8.0 or later (2.8.3 is not recommanded because of some troubles). This creates an additional dependency on GTK+, consider the following:&lt;br /&gt;
&lt;br /&gt;
A possible implementation which does not exist: &lt;br /&gt;
&lt;br /&gt;
''Code::Blocks  -&amp;gt;  xwWidget (libwxX11)  -&amp;gt;  X''&lt;br /&gt;
&lt;br /&gt;
Current Code::Blocks implementation: &lt;br /&gt;
&lt;br /&gt;
''Code::Blocks  -&amp;gt;  '''xwWidget (&amp;gt; libwxGTK2.8)'''  -&amp;gt;  '''GTK+ (&amp;gt; libgtk-x11-2.0)'''  -&amp;gt;  X''&lt;br /&gt;
&lt;br /&gt;
This document helps you to install libwxGTK if necessary but does not cover the installation of GTK+. GTK+ is probably installed on your Linux anyway, so don't worry ;)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
''Note:'' All the instructions below, assume an existing directory named &amp;lt;tt&amp;gt;~/devel&amp;lt;/tt&amp;gt;. If you 'll be using a different one, adjust the path to match.&lt;br /&gt;
As a first step create this directory:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;mkdir ~/devel&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Checking the presence of GTK+ library ===&lt;br /&gt;
&lt;br /&gt;
Have a look in /usr/lib for something like &amp;quot;libgtk-x11-2.0.so&amp;quot; (Note the library must be 2.0 minimum). Alternatively, do a search with your package manager or go to your Linux distribution forum for help. If you don't want to loose time, you can even forget this check since there is a good probability that everything is already installed.&lt;br /&gt;
&lt;br /&gt;
===Library wxGTK installation===&lt;br /&gt;
&lt;br /&gt;
==== Checking the presence of libwxGTK library ====&lt;br /&gt;
&lt;br /&gt;
In your package manager, look for 'libwxgtk' keyword and verify that '''all''' libwxgtk2.8 stuffs are installed. If you find the libraries uninstalled, well '''just install them and go directly to [[https://wiki.codeblocks.org/index.php?title=Installing_Code::Blocks_from_source_on_Linux#Code::Blocks_installation Code::Blocks installation]]'''.&lt;br /&gt;
&lt;br /&gt;
Alternatively you can do the same in command line (to give an idea, I don't say there is only 2 packages):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;$ ls /usr/lib/libwx_gtk* //to verify the presence&lt;br /&gt;
$ sudo apt-get install libwxgtk2.8-dev&lt;br /&gt;
$ sudo apt-get install libwxgtk2.8-0&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you don't find any package you must install the library from source as described below, and you can redo this check afterwards to verify that the installation worked correctly.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
''Note for Debian (and Ubuntu?) users:'' You can use &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;$ update-alternatives --config wx-config&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
to see which version of libwx is there or not and currently active.&lt;br /&gt;
&lt;br /&gt;
====Getting wxGTK sources====&lt;br /&gt;
&lt;br /&gt;
Visit the [http://www.wxwidgets.org wxWidgets web site]. Click the &amp;quot;Download&amp;quot; button at the top of the page. Under wxWidgets 2.8.7 downloads, select wxGTK. Save the file in &amp;lt;tt&amp;gt;~/devel&amp;lt;/tt&amp;gt;. After the download finishes, switch to &amp;lt;tt&amp;gt;~/devel&amp;lt;/tt&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;cd ~/devel&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, untar the wxGTK sources:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;tar zxf wxGTK-2.8.7.tar.gz&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Switch to the wxGTK directory&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;cd wxGTK-2.8.7&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====wxWidgets build====&lt;br /&gt;
&lt;br /&gt;
Here we will create a seperate build directory instead of building from the src directory, so that we can easily rebuild with different options (unicode / ansi, monolithic / many libs, etc).&lt;br /&gt;
&lt;br /&gt;
The documentation says the default is for gtk2 to use unicode and wx &amp;gt; 2.5 to build as a monolithic library.  This doesn't appear to be the case, so these flags are passed to configure.&lt;br /&gt;
&lt;br /&gt;
 mkdir build_gtk2_shared_monolithic_unicode&lt;br /&gt;
 cd build_gtk2_shared_monolithic_unicode&lt;br /&gt;
 ../configure --prefix=/opt/wx/2.8 \&lt;br /&gt;
        --enable-xrc \&lt;br /&gt;
        --enable-monolithic \&lt;br /&gt;
        --enable-unicode&lt;br /&gt;
 make&lt;br /&gt;
 su&lt;br /&gt;
 make install&lt;br /&gt;
 exit&lt;br /&gt;
&lt;br /&gt;
Add /opt/wx/2.8/bin to the PATH (if you're shell is bash then edit /etc/profile or ~/.bash_profile)&lt;br /&gt;
(On Suse 10.1 edit /etc/profile.local, it will only be available after a new login).  an example PATH&lt;br /&gt;
 export PATH=/usr/bin:/opt/wx/2.8/bin:$PATH&lt;br /&gt;
&lt;br /&gt;
'''Note:''' On Ubuntu Hoary it was necessary to check &amp;quot;Run command as login shell&amp;quot; &lt;br /&gt;
in the gnome-terminal profile-settings, otherwise the PATH changes are not available in a gnome-terminal window.&lt;br /&gt;
&lt;br /&gt;
add /opt/wx/2.8/lib to /etc/ld.so.conf (nano /etc/ld.so.conf)&lt;br /&gt;
then run:&lt;br /&gt;
 ldconfig&lt;br /&gt;
 source /etc/profile&lt;br /&gt;
&lt;br /&gt;
That's it.  Now the linker will look in /opt/wx/2.8/lib for wx libraries and you will have a monolithic shared library unicode build.&lt;br /&gt;
&lt;br /&gt;
To check that things are working, type:&lt;br /&gt;
 wx-config --prefix&lt;br /&gt;
which should give you /opt/wx/2.8&lt;br /&gt;
 wx-config --libs&lt;br /&gt;
which should have at least&lt;br /&gt;
 -L/opt/wx/2.8/lib -lwx_gtk2-2.8&lt;br /&gt;
but can contain other flags as well.&lt;br /&gt;
 which wx-config&lt;br /&gt;
should return /opt/wx/2.8/bin/wx-config&lt;br /&gt;
&lt;br /&gt;
===Code::Blocks installation===&lt;br /&gt;
&lt;br /&gt;
====Downloading Code::Blocks====&lt;br /&gt;
&lt;br /&gt;
You can get Code::Blocks source code in one way:&lt;br /&gt;
* Get the latest sources from the SVN repository.&lt;br /&gt;
This method is described below.&lt;br /&gt;
&lt;br /&gt;
=====Getting the latest sources from SVN=====&lt;br /&gt;
'''IMPORTANT NOTICE: The Sourceforge CVS is no longer used although it still exists'''&lt;br /&gt;
&lt;br /&gt;
Enter your development directory:&lt;br /&gt;
&amp;lt;pre&amp;gt;cd ~/devel&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then checkout the source using one of [https://www.codeblocks.org/downloads/7 these] methods.&lt;br /&gt;
&lt;br /&gt;
This will create the directory &amp;lt;tt&amp;gt;trunk&amp;lt;/tt&amp;gt;.&lt;br /&gt;
Change to the source code directory, by issuing the following command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;cd trunk&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Building Code::Blocks SVN====&lt;br /&gt;
If you are a Gentoo user, please see [[Compiling_Code::Blocks_in_Gentoo]].&lt;br /&gt;
&lt;br /&gt;
Before beginning, it is often a good idea to check you have recent versions of autoconf and automake - repositories versions are not always recent enough. (if you do not have automake, then you will get &amp;quot;cannot find aclocal&amp;quot; error).&lt;br /&gt;
&lt;br /&gt;
If you're compiling the svn trunk versions of CodeBlocks (or future versions) then the unix build has switched to autotools.  So first build wxWidgets as described above and then build CodeBlocks as follows:&lt;br /&gt;
&lt;br /&gt;
 ./bootstrap&lt;br /&gt;
&lt;br /&gt;
This sets up the configure script and its dependencies.  It only needs to be run once (after downloading the source from svn).  '''If you get errors like:'''&lt;br /&gt;
 aclocal:configure.in:61: warning: macro `AM_OPTIONS_WXCONFIG' not found in library&lt;br /&gt;
Then aclocal is having trouble finding the wxWidgets .m4 files.  You can do one of two things:&lt;br /&gt;
To just get bootstrap to find the path this time do:&lt;br /&gt;
&amp;lt;!-- *********** Bad syntax... removed 2006-08-28 by BentFX ****************************&lt;br /&gt;
 export ACLOCAL_FLAGS=&amp;quot;--acdir=`wx-config --prefix`/share/aclocal&amp;quot;&lt;br /&gt;
&lt;br /&gt;
: Note: The above command resulted in missing macros when running ./bootstrap for me. Setting an additional search path instead of overwriting like above worked for me. In case of missing macros try &lt;br /&gt;
***********************************************************************************--&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;export ACLOCAL_FLAGS=&amp;quot;-I `wx-config --prefix`/share/aclocal&amp;quot;&amp;lt;/pre&amp;gt; &amp;lt;!--[[User:Jabber|Jabber]] 06:24, 2 August 2006 (EDT)--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To change the aclocal search path more permanently do:&lt;br /&gt;
 echo `wx-config --prefix`/share/aclocal &amp;gt;&amp;gt; /usr/share/aclocal/dirlist&lt;br /&gt;
Then aclocal will also search somewhere like /opt/wx/2.6/share/aclocal&lt;br /&gt;
&lt;br /&gt;
'''Note for Ubuntu users:''' The above is not the correct way to fix the AM_* errors. Rather, you only need to install the package named &amp;quot;wx-common&amp;quot; (Universe repository).&lt;br /&gt;
&lt;br /&gt;
If you get something like&lt;br /&gt;
 The usual way to define `LIBTOOL' is to add `AC_PROG_LIBTOOL'&lt;br /&gt;
&lt;br /&gt;
it can be solved by something like: (adapt path, use `wx-config --prefix` is necessary)&lt;br /&gt;
&lt;br /&gt;
 ACLOCAL_FLAGS=&amp;quot;-I /usr/share/aclocal&amp;quot; ./bootstrap&lt;br /&gt;
&lt;br /&gt;
(*Note// '''If you run ./bootstrap and get errors like''':&lt;br /&gt;
 : bad interpreter: File not found&lt;br /&gt;
then there exists a problem with DOS line-endings. i had this error after i tried to build a  codeblocks from sources which were checked out with cvs on a windows machine. After i checked out a fresh copy of codeblocks from cvs under Ubuntu linux (see above topic: Downloading the latest source package fom SVN), all errors were gone. &lt;br /&gt;
//tiwag 051008*)&amp;lt;br&amp;gt;&lt;br /&gt;
Or, instead of downloading from SVN, you might consider using the little command line tool dos2unix, which normally comes with most distributions. //lizzarddude060103&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
If configure aborts with some unspecific error message(&amp;quot;.infig.status: error: cannot find input file: Makefile&amp;quot;), you might consider also running&lt;br /&gt;
 dos2unix bootstrap acinclude.m4 codeblocks.pc.in configure.in Makefile.am&lt;br /&gt;
before running bootstrap&lt;br /&gt;
&lt;br /&gt;
Once you've run the bootstrap script, installing is as simple as:&lt;br /&gt;
 ./configure&lt;br /&gt;
 make&lt;br /&gt;
 make install&lt;br /&gt;
&lt;br /&gt;
If you have multiple versions of wxWidgets installed or kept them inplace, you can use&lt;br /&gt;
./configure --with-wx-config=/path/to/wx-config&lt;br /&gt;
&lt;br /&gt;
To uninstall you can later run:&lt;br /&gt;
 make uninstall&lt;br /&gt;
&lt;br /&gt;
If you want to recompile everything, first run:&lt;br /&gt;
 make clean&lt;br /&gt;
 make distclean&lt;br /&gt;
 make clean-bin&lt;br /&gt;
 make clean-zipfiles&lt;br /&gt;
and then follow the above sequence for installing.&lt;br /&gt;
&lt;br /&gt;
By default, CodeBlocks will install to /usr/local.  If you want it in its own tree (so you can have multiple versions of CodeBlocks, each in its own subdirectory of /opt) replace the above ./configure command with:&lt;br /&gt;
 ./configure --prefix=/opt/codeblocks-svn&lt;br /&gt;
or similar.  Then you can later install a different build like:&lt;br /&gt;
 ./configure --prefix=/opt/codeblocks2-svn&lt;br /&gt;
followed by 'make &amp;amp;&amp;amp; make install' as usual.&lt;br /&gt;
&lt;br /&gt;
By default, CodeBlocks will not compile the contributed plugins from SVN.  If you want to compile / install them too, replace the above ./configure command with:&lt;br /&gt;
 ./configure --with-contrib-plugins=all&lt;br /&gt;
followed by 'make &amp;amp;&amp;amp; make install' as usual.&lt;br /&gt;
&lt;br /&gt;
To see a list of other options available for configuring the build of CodeBlocks do:&lt;br /&gt;
 ./configure --help&lt;br /&gt;
&lt;br /&gt;
To compile under gentoo, use&lt;br /&gt;
 ./configure --with-wx-config=wx-config-2.8&lt;br /&gt;
&lt;br /&gt;
====Resolving issues with Code::Blocks SVN====&lt;br /&gt;
&lt;br /&gt;
When running Code::Blocks after the installation it might happen, that the system complains:&lt;br /&gt;
 codeblocks: error while loading shared libraries: libcodeblocks.so.0: cannot open shared object file: No such file or directory&lt;br /&gt;
In that case make sure the library path where the Code::Blocks libraries where installed into is &amp;quot;known&amp;quot; to the system. For example: On Ubuntu using a default build process on a clean system will install the Code::Blocks executables to /use/local/bin and the libraries to /usr/local/lib. The latter is usually not known to a &amp;quot;clean&amp;quot; Ubuntu system. To add it to the search path for libraries do the following (as root / using sudo respectively):&lt;br /&gt;
Add the following line to the file /etc/ld.so.conf:&lt;br /&gt;
 /usr/local/lib&lt;br /&gt;
...and run:&lt;br /&gt;
 ldconfig&lt;br /&gt;
That's it - Code::Blocks should now work just fine as all libraries are being found.&lt;/div&gt;</summary>
		<author><name>Spacemonkey</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=Installing_Code::Blocks_from_source_on_Linux&amp;diff=6194</id>
		<title>Installing Code::Blocks from source on Linux</title>
		<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php?title=Installing_Code::Blocks_from_source_on_Linux&amp;diff=6194"/>
		<updated>2009-11-19T13:43:09Z</updated>

		<summary type="html">&lt;p&gt;Spacemonkey: /* Checking the presence of libwxGTK library */&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;
These are instructions on how to build Code::Blocks under Linux. These instructions should work for all Linux distros, as we'll be installing from sources.&lt;br /&gt;
&lt;br /&gt;
===Prerequisites===&lt;br /&gt;
&lt;br /&gt;
In order to successfully compile Code::Blocks, the [http://en.wikipedia.org/wiki/WxWidgets wxWidgets] User Interface library &amp;lt;u&amp;gt;must be installed&amp;lt;/u&amp;gt;. For most Linux users, this is maybe the only dependency not already installed. wxWidget can be used directly on top of the X server, in this case the variant of the wxWidget library is called wxX11. However this library [http://wiki.wxwidgets.org/WxWidgets_Compared_To_Other_Toolkits#Why_You_Shouldn.27t_Use_wxWidgets &amp;quot;is sub-par compared to other toolkits and unstable&amp;quot;]. Hence Code::Blocks uses wxGTK, the version of wxWidget based on GTK+. The exact requirement is libwxGTK-2.8.0 or later (2.8.3 is not recommanded because of some troubles). This creates an additional dependency on GTK+, consider the following:&lt;br /&gt;
&lt;br /&gt;
A possible implementation which does not exist: &lt;br /&gt;
&lt;br /&gt;
''Code::Blocks  -&amp;gt;  xwWidget (libwxX11)  -&amp;gt;  X''&lt;br /&gt;
&lt;br /&gt;
Current Code::Blocks implementation: &lt;br /&gt;
&lt;br /&gt;
''Code::Blocks  -&amp;gt;  '''xwWidget (&amp;gt; libwxGTK2.8)'''  -&amp;gt;  '''GTK+ (&amp;gt; libgtk-x11-2.0)'''  -&amp;gt;  X''&lt;br /&gt;
&lt;br /&gt;
This document helps you to install libwxGTK if necessary but does not cover the installation of GTK+. GTK+ is probably installed on your Linux anyway, so don't worry ;)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
''Note:'' All the instructions below, assume an existing directory named &amp;lt;tt&amp;gt;~/devel&amp;lt;/tt&amp;gt;. If you 'll be using a different one, adjust the path to match.&lt;br /&gt;
As a first step create this directory:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;mkdir ~/devel&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Checking the presence of GTK+ library ===&lt;br /&gt;
&lt;br /&gt;
Have a look in /usr/lib for something like &amp;quot;libgtk-x11-2.0.so&amp;quot; (Note the library must be 2.0 minimum). Alternatively, do a search with your package manager or go to your Linux distribution forum for help. If you don't want to loose time, you can even forget this check since there is a good probability that everything is already installed.&lt;br /&gt;
&lt;br /&gt;
===Library wxGTK installation===&lt;br /&gt;
&lt;br /&gt;
==== Checking the presence of libwxGTK library ====&lt;br /&gt;
&lt;br /&gt;
In your package manager, look for 'libwxgtk' keyword and verify that '''all''' libwxgtk2.8 stuffs are installed. If you find the libraries uninstalled, well '''just install them and go directly to Code::Blocks installation'''.&lt;br /&gt;
&lt;br /&gt;
Alternatively you can do the same in command line (to give an idea, I don't say there is only 2 packages):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;$ ls /usr/lib/libwx_gtk* //to verify the presence&lt;br /&gt;
$ sudo apt-get install libwxgtk2.8-dev&lt;br /&gt;
$ sudo apt-get install libwxgtk2.8-0&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you don't find any package you must install the library from source as described below, and you can redo this check afterwards to verify that the installation worked correctly.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
''Note for Debian (and Ubuntu?) users:'' You can use &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;$ update-alternatives --config wx-config&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
to see which version of libwx is there or not and currently active.&lt;br /&gt;
&lt;br /&gt;
====Getting wxGTK sources====&lt;br /&gt;
&lt;br /&gt;
Visit the [http://www.wxwidgets.org wxWidgets web site]. Click the &amp;quot;Download&amp;quot; button at the top of the page. Under wxWidgets 2.8.7 downloads, select wxGTK. Save the file in &amp;lt;tt&amp;gt;~/devel&amp;lt;/tt&amp;gt;. After the download finishes, switch to &amp;lt;tt&amp;gt;~/devel&amp;lt;/tt&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;cd ~/devel&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, untar the wxGTK sources:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;tar zxf wxGTK-2.8.7.tar.gz&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Switch to the wxGTK directory&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;cd wxGTK-2.8.7&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====wxWidgets build====&lt;br /&gt;
&lt;br /&gt;
Here we will create a seperate build directory instead of building from the src directory, so that we can easily rebuild with different options (unicode / ansi, monolithic / many libs, etc).&lt;br /&gt;
&lt;br /&gt;
The documentation says the default is for gtk2 to use unicode and wx &amp;gt; 2.5 to build as a monolithic library.  This doesn't appear to be the case, so these flags are passed to configure.&lt;br /&gt;
&lt;br /&gt;
 mkdir build_gtk2_shared_monolithic_unicode&lt;br /&gt;
 cd build_gtk2_shared_monolithic_unicode&lt;br /&gt;
 ../configure --prefix=/opt/wx/2.8 \&lt;br /&gt;
        --enable-xrc \&lt;br /&gt;
        --enable-monolithic \&lt;br /&gt;
        --enable-unicode&lt;br /&gt;
 make&lt;br /&gt;
 su&lt;br /&gt;
 make install&lt;br /&gt;
 exit&lt;br /&gt;
&lt;br /&gt;
Add /opt/wx/2.8/bin to the PATH (if you're shell is bash then edit /etc/profile or ~/.bash_profile)&lt;br /&gt;
(On Suse 10.1 edit /etc/profile.local, it will only be available after a new login).  an example PATH&lt;br /&gt;
 export PATH=/usr/bin:/opt/wx/2.8/bin:$PATH&lt;br /&gt;
&lt;br /&gt;
'''Note:''' On Ubuntu Hoary it was necessary to check &amp;quot;Run command as login shell&amp;quot; &lt;br /&gt;
in the gnome-terminal profile-settings, otherwise the PATH changes are not available in a gnome-terminal window.&lt;br /&gt;
&lt;br /&gt;
add /opt/wx/2.8/lib to /etc/ld.so.conf (nano /etc/ld.so.conf)&lt;br /&gt;
then run:&lt;br /&gt;
 ldconfig&lt;br /&gt;
 source /etc/profile&lt;br /&gt;
&lt;br /&gt;
That's it.  Now the linker will look in /opt/wx/2.8/lib for wx libraries and you will have a monolithic shared library unicode build.&lt;br /&gt;
&lt;br /&gt;
To check that things are working, type:&lt;br /&gt;
 wx-config --prefix&lt;br /&gt;
which should give you /opt/wx/2.8&lt;br /&gt;
 wx-config --libs&lt;br /&gt;
which should have at least&lt;br /&gt;
 -L/opt/wx/2.8/lib -lwx_gtk2-2.8&lt;br /&gt;
but can contain other flags as well.&lt;br /&gt;
 which wx-config&lt;br /&gt;
should return /opt/wx/2.8/bin/wx-config&lt;br /&gt;
&lt;br /&gt;
===Code::Blocks installation===&lt;br /&gt;
&lt;br /&gt;
====Downloading Code::Blocks====&lt;br /&gt;
&lt;br /&gt;
You can get Code::Blocks source code in one way:&lt;br /&gt;
* Get the latest sources from the SVN repository.&lt;br /&gt;
This method is described below.&lt;br /&gt;
&lt;br /&gt;
=====Getting the latest sources from SVN=====&lt;br /&gt;
'''IMPORTANT NOTICE: The Sourceforge CVS is no longer used although it still exists'''&lt;br /&gt;
&lt;br /&gt;
Enter your development directory:&lt;br /&gt;
&amp;lt;pre&amp;gt;cd ~/devel&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then checkout the source using one of [https://www.codeblocks.org/downloads/7 these] methods.&lt;br /&gt;
&lt;br /&gt;
This will create the directory &amp;lt;tt&amp;gt;trunk&amp;lt;/tt&amp;gt;.&lt;br /&gt;
Change to the source code directory, by issuing the following command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;cd trunk&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Building Code::Blocks SVN====&lt;br /&gt;
If you are a Gentoo user, please see [[Compiling_Code::Blocks_in_Gentoo]].&lt;br /&gt;
&lt;br /&gt;
Before beginning, it is often a good idea to check you have recent versions of autoconf and automake - repositories versions are not always recent enough. (if you do not have automake, then you will get &amp;quot;cannot find aclocal&amp;quot; error).&lt;br /&gt;
&lt;br /&gt;
If you're compiling the svn trunk versions of CodeBlocks (or future versions) then the unix build has switched to autotools.  So first build wxWidgets as described above and then build CodeBlocks as follows:&lt;br /&gt;
&lt;br /&gt;
 ./bootstrap&lt;br /&gt;
&lt;br /&gt;
This sets up the configure script and its dependencies.  It only needs to be run once (after downloading the source from svn).  '''If you get errors like:'''&lt;br /&gt;
 aclocal:configure.in:61: warning: macro `AM_OPTIONS_WXCONFIG' not found in library&lt;br /&gt;
Then aclocal is having trouble finding the wxWidgets .m4 files.  You can do one of two things:&lt;br /&gt;
To just get bootstrap to find the path this time do:&lt;br /&gt;
&amp;lt;!-- *********** Bad syntax... removed 2006-08-28 by BentFX ****************************&lt;br /&gt;
 export ACLOCAL_FLAGS=&amp;quot;--acdir=`wx-config --prefix`/share/aclocal&amp;quot;&lt;br /&gt;
&lt;br /&gt;
: Note: The above command resulted in missing macros when running ./bootstrap for me. Setting an additional search path instead of overwriting like above worked for me. In case of missing macros try &lt;br /&gt;
***********************************************************************************--&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;export ACLOCAL_FLAGS=&amp;quot;-I `wx-config --prefix`/share/aclocal&amp;quot;&amp;lt;/pre&amp;gt; &amp;lt;!--[[User:Jabber|Jabber]] 06:24, 2 August 2006 (EDT)--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To change the aclocal search path more permanently do:&lt;br /&gt;
 echo `wx-config --prefix`/share/aclocal &amp;gt;&amp;gt; /usr/share/aclocal/dirlist&lt;br /&gt;
Then aclocal will also search somewhere like /opt/wx/2.6/share/aclocal&lt;br /&gt;
&lt;br /&gt;
'''Note for Ubuntu users:''' The above is not the correct way to fix the AM_* errors. Rather, you only need to install the package named &amp;quot;wx-common&amp;quot; (Universe repository).&lt;br /&gt;
&lt;br /&gt;
If you get something like&lt;br /&gt;
 The usual way to define `LIBTOOL' is to add `AC_PROG_LIBTOOL'&lt;br /&gt;
&lt;br /&gt;
it can be solved by something like: (adapt path, use `wx-config --prefix` is necessary)&lt;br /&gt;
&lt;br /&gt;
 ACLOCAL_FLAGS=&amp;quot;-I /usr/share/aclocal&amp;quot; ./bootstrap&lt;br /&gt;
&lt;br /&gt;
(*Note// '''If you run ./bootstrap and get errors like''':&lt;br /&gt;
 : bad interpreter: File not found&lt;br /&gt;
then there exists a problem with DOS line-endings. i had this error after i tried to build a  codeblocks from sources which were checked out with cvs on a windows machine. After i checked out a fresh copy of codeblocks from cvs under Ubuntu linux (see above topic: Downloading the latest source package fom SVN), all errors were gone. &lt;br /&gt;
//tiwag 051008*)&amp;lt;br&amp;gt;&lt;br /&gt;
Or, instead of downloading from SVN, you might consider using the little command line tool dos2unix, which normally comes with most distributions. //lizzarddude060103&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
If configure aborts with some unspecific error message(&amp;quot;.infig.status: error: cannot find input file: Makefile&amp;quot;), you might consider also running&lt;br /&gt;
 dos2unix bootstrap acinclude.m4 codeblocks.pc.in configure.in Makefile.am&lt;br /&gt;
before running bootstrap&lt;br /&gt;
&lt;br /&gt;
Once you've run the bootstrap script, installing is as simple as:&lt;br /&gt;
 ./configure&lt;br /&gt;
 make&lt;br /&gt;
 make install&lt;br /&gt;
&lt;br /&gt;
If you have multiple versions of wxWidgets installed or kept them inplace, you can use&lt;br /&gt;
./configure --with-wx-config=/path/to/wx-config&lt;br /&gt;
&lt;br /&gt;
To uninstall you can later run:&lt;br /&gt;
 make uninstall&lt;br /&gt;
&lt;br /&gt;
If you want to recompile everything, first run:&lt;br /&gt;
 make clean&lt;br /&gt;
 make distclean&lt;br /&gt;
 make clean-bin&lt;br /&gt;
 make clean-zipfiles&lt;br /&gt;
and then follow the above sequence for installing.&lt;br /&gt;
&lt;br /&gt;
By default, CodeBlocks will install to /usr/local.  If you want it in its own tree (so you can have multiple versions of CodeBlocks, each in its own subdirectory of /opt) replace the above ./configure command with:&lt;br /&gt;
 ./configure --prefix=/opt/codeblocks-svn&lt;br /&gt;
or similar.  Then you can later install a different build like:&lt;br /&gt;
 ./configure --prefix=/opt/codeblocks2-svn&lt;br /&gt;
followed by 'make &amp;amp;&amp;amp; make install' as usual.&lt;br /&gt;
&lt;br /&gt;
By default, CodeBlocks will not compile the contributed plugins from SVN.  If you want to compile / install them too, replace the above ./configure command with:&lt;br /&gt;
 ./configure --with-contrib-plugins=all&lt;br /&gt;
followed by 'make &amp;amp;&amp;amp; make install' as usual.&lt;br /&gt;
&lt;br /&gt;
To see a list of other options available for configuring the build of CodeBlocks do:&lt;br /&gt;
 ./configure --help&lt;br /&gt;
&lt;br /&gt;
To compile under gentoo, use&lt;br /&gt;
 ./configure --with-wx-config=wx-config-2.8&lt;br /&gt;
&lt;br /&gt;
====Resolving issues with Code::Blocks SVN====&lt;br /&gt;
&lt;br /&gt;
When running Code::Blocks after the installation it might happen, that the system complains:&lt;br /&gt;
 codeblocks: error while loading shared libraries: libcodeblocks.so.0: cannot open shared object file: No such file or directory&lt;br /&gt;
In that case make sure the library path where the Code::Blocks libraries where installed into is &amp;quot;known&amp;quot; to the system. For example: On Ubuntu using a default build process on a clean system will install the Code::Blocks executables to /use/local/bin and the libraries to /usr/local/lib. The latter is usually not known to a &amp;quot;clean&amp;quot; Ubuntu system. To add it to the search path for libraries do the following (as root / using sudo respectively):&lt;br /&gt;
Add the following line to the file /etc/ld.so.conf:&lt;br /&gt;
 /usr/local/lib&lt;br /&gt;
...and run:&lt;br /&gt;
 ldconfig&lt;br /&gt;
That's it - Code::Blocks should now work just fine as all libraries are being found.&lt;/div&gt;</summary>
		<author><name>Spacemonkey</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=Installing_Code::Blocks_from_source_on_Linux&amp;diff=6193</id>
		<title>Installing Code::Blocks from source on Linux</title>
		<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php?title=Installing_Code::Blocks_from_source_on_Linux&amp;diff=6193"/>
		<updated>2009-11-19T13:42:38Z</updated>

		<summary type="html">&lt;p&gt;Spacemonkey: /* Checking the presence of libwxGTK library */&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;
These are instructions on how to build Code::Blocks under Linux. These instructions should work for all Linux distros, as we'll be installing from sources.&lt;br /&gt;
&lt;br /&gt;
===Prerequisites===&lt;br /&gt;
&lt;br /&gt;
In order to successfully compile Code::Blocks, the [http://en.wikipedia.org/wiki/WxWidgets wxWidgets] User Interface library &amp;lt;u&amp;gt;must be installed&amp;lt;/u&amp;gt;. For most Linux users, this is maybe the only dependency not already installed. wxWidget can be used directly on top of the X server, in this case the variant of the wxWidget library is called wxX11. However this library [http://wiki.wxwidgets.org/WxWidgets_Compared_To_Other_Toolkits#Why_You_Shouldn.27t_Use_wxWidgets &amp;quot;is sub-par compared to other toolkits and unstable&amp;quot;]. Hence Code::Blocks uses wxGTK, the version of wxWidget based on GTK+. The exact requirement is libwxGTK-2.8.0 or later (2.8.3 is not recommanded because of some troubles). This creates an additional dependency on GTK+, consider the following:&lt;br /&gt;
&lt;br /&gt;
A possible implementation which does not exist: &lt;br /&gt;
&lt;br /&gt;
''Code::Blocks  -&amp;gt;  xwWidget (libwxX11)  -&amp;gt;  X''&lt;br /&gt;
&lt;br /&gt;
Current Code::Blocks implementation: &lt;br /&gt;
&lt;br /&gt;
''Code::Blocks  -&amp;gt;  '''xwWidget (&amp;gt; libwxGTK2.8)'''  -&amp;gt;  '''GTK+ (&amp;gt; libgtk-x11-2.0)'''  -&amp;gt;  X''&lt;br /&gt;
&lt;br /&gt;
This document helps you to install libwxGTK if necessary but does not cover the installation of GTK+. GTK+ is probably installed on your Linux anyway, so don't worry ;)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
''Note:'' All the instructions below, assume an existing directory named &amp;lt;tt&amp;gt;~/devel&amp;lt;/tt&amp;gt;. If you 'll be using a different one, adjust the path to match.&lt;br /&gt;
As a first step create this directory:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;mkdir ~/devel&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Checking the presence of GTK+ library ===&lt;br /&gt;
&lt;br /&gt;
Have a look in /usr/lib for something like &amp;quot;libgtk-x11-2.0.so&amp;quot; (Note the library must be 2.0 minimum). Alternatively, do a search with your package manager or go to your Linux distribution forum for help. If you don't want to loose time, you can even forget this check since there is a good probability that everything is already installed.&lt;br /&gt;
&lt;br /&gt;
===Library wxGTK installation===&lt;br /&gt;
&lt;br /&gt;
==== Checking the presence of libwxGTK library ====&lt;br /&gt;
&lt;br /&gt;
In your package manager, look for 'libwxgtk' keyword and verify that '''all''' libwxgtk2.8 stuffs are installed. If you find the libraries uninstalled, well '''just install them and go directly to Code::Blocks installation'''.&lt;br /&gt;
&lt;br /&gt;
Alternatively you can do the same in command line (to give an idea, I don't say there is only 2 packages):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;$ ls /usr/lib/libwx_gtk* //to verify the presence&lt;br /&gt;
$ sudo apt-get install libwxgtk2.8-dev&lt;br /&gt;
$ sudo apt-get install libwxgtk2.8-0&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you don't find any package must install the library from source as described below, and you can redo this check afterwards to verify that the installation worked correctly.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
''Note for Debian (and Ubuntu?) users:'' You can use &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;$ update-alternatives --config wx-config&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
to see which version of libwx is there or not and currently active.&lt;br /&gt;
&lt;br /&gt;
====Getting wxGTK sources====&lt;br /&gt;
&lt;br /&gt;
Visit the [http://www.wxwidgets.org wxWidgets web site]. Click the &amp;quot;Download&amp;quot; button at the top of the page. Under wxWidgets 2.8.7 downloads, select wxGTK. Save the file in &amp;lt;tt&amp;gt;~/devel&amp;lt;/tt&amp;gt;. After the download finishes, switch to &amp;lt;tt&amp;gt;~/devel&amp;lt;/tt&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;cd ~/devel&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, untar the wxGTK sources:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;tar zxf wxGTK-2.8.7.tar.gz&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Switch to the wxGTK directory&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;cd wxGTK-2.8.7&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====wxWidgets build====&lt;br /&gt;
&lt;br /&gt;
Here we will create a seperate build directory instead of building from the src directory, so that we can easily rebuild with different options (unicode / ansi, monolithic / many libs, etc).&lt;br /&gt;
&lt;br /&gt;
The documentation says the default is for gtk2 to use unicode and wx &amp;gt; 2.5 to build as a monolithic library.  This doesn't appear to be the case, so these flags are passed to configure.&lt;br /&gt;
&lt;br /&gt;
 mkdir build_gtk2_shared_monolithic_unicode&lt;br /&gt;
 cd build_gtk2_shared_monolithic_unicode&lt;br /&gt;
 ../configure --prefix=/opt/wx/2.8 \&lt;br /&gt;
        --enable-xrc \&lt;br /&gt;
        --enable-monolithic \&lt;br /&gt;
        --enable-unicode&lt;br /&gt;
 make&lt;br /&gt;
 su&lt;br /&gt;
 make install&lt;br /&gt;
 exit&lt;br /&gt;
&lt;br /&gt;
Add /opt/wx/2.8/bin to the PATH (if you're shell is bash then edit /etc/profile or ~/.bash_profile)&lt;br /&gt;
(On Suse 10.1 edit /etc/profile.local, it will only be available after a new login).  an example PATH&lt;br /&gt;
 export PATH=/usr/bin:/opt/wx/2.8/bin:$PATH&lt;br /&gt;
&lt;br /&gt;
'''Note:''' On Ubuntu Hoary it was necessary to check &amp;quot;Run command as login shell&amp;quot; &lt;br /&gt;
in the gnome-terminal profile-settings, otherwise the PATH changes are not available in a gnome-terminal window.&lt;br /&gt;
&lt;br /&gt;
add /opt/wx/2.8/lib to /etc/ld.so.conf (nano /etc/ld.so.conf)&lt;br /&gt;
then run:&lt;br /&gt;
 ldconfig&lt;br /&gt;
 source /etc/profile&lt;br /&gt;
&lt;br /&gt;
That's it.  Now the linker will look in /opt/wx/2.8/lib for wx libraries and you will have a monolithic shared library unicode build.&lt;br /&gt;
&lt;br /&gt;
To check that things are working, type:&lt;br /&gt;
 wx-config --prefix&lt;br /&gt;
which should give you /opt/wx/2.8&lt;br /&gt;
 wx-config --libs&lt;br /&gt;
which should have at least&lt;br /&gt;
 -L/opt/wx/2.8/lib -lwx_gtk2-2.8&lt;br /&gt;
but can contain other flags as well.&lt;br /&gt;
 which wx-config&lt;br /&gt;
should return /opt/wx/2.8/bin/wx-config&lt;br /&gt;
&lt;br /&gt;
===Code::Blocks installation===&lt;br /&gt;
&lt;br /&gt;
====Downloading Code::Blocks====&lt;br /&gt;
&lt;br /&gt;
You can get Code::Blocks source code in one way:&lt;br /&gt;
* Get the latest sources from the SVN repository.&lt;br /&gt;
This method is described below.&lt;br /&gt;
&lt;br /&gt;
=====Getting the latest sources from SVN=====&lt;br /&gt;
'''IMPORTANT NOTICE: The Sourceforge CVS is no longer used although it still exists'''&lt;br /&gt;
&lt;br /&gt;
Enter your development directory:&lt;br /&gt;
&amp;lt;pre&amp;gt;cd ~/devel&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then checkout the source using one of [https://www.codeblocks.org/downloads/7 these] methods.&lt;br /&gt;
&lt;br /&gt;
This will create the directory &amp;lt;tt&amp;gt;trunk&amp;lt;/tt&amp;gt;.&lt;br /&gt;
Change to the source code directory, by issuing the following command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;cd trunk&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Building Code::Blocks SVN====&lt;br /&gt;
If you are a Gentoo user, please see [[Compiling_Code::Blocks_in_Gentoo]].&lt;br /&gt;
&lt;br /&gt;
Before beginning, it is often a good idea to check you have recent versions of autoconf and automake - repositories versions are not always recent enough. (if you do not have automake, then you will get &amp;quot;cannot find aclocal&amp;quot; error).&lt;br /&gt;
&lt;br /&gt;
If you're compiling the svn trunk versions of CodeBlocks (or future versions) then the unix build has switched to autotools.  So first build wxWidgets as described above and then build CodeBlocks as follows:&lt;br /&gt;
&lt;br /&gt;
 ./bootstrap&lt;br /&gt;
&lt;br /&gt;
This sets up the configure script and its dependencies.  It only needs to be run once (after downloading the source from svn).  '''If you get errors like:'''&lt;br /&gt;
 aclocal:configure.in:61: warning: macro `AM_OPTIONS_WXCONFIG' not found in library&lt;br /&gt;
Then aclocal is having trouble finding the wxWidgets .m4 files.  You can do one of two things:&lt;br /&gt;
To just get bootstrap to find the path this time do:&lt;br /&gt;
&amp;lt;!-- *********** Bad syntax... removed 2006-08-28 by BentFX ****************************&lt;br /&gt;
 export ACLOCAL_FLAGS=&amp;quot;--acdir=`wx-config --prefix`/share/aclocal&amp;quot;&lt;br /&gt;
&lt;br /&gt;
: Note: The above command resulted in missing macros when running ./bootstrap for me. Setting an additional search path instead of overwriting like above worked for me. In case of missing macros try &lt;br /&gt;
***********************************************************************************--&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;export ACLOCAL_FLAGS=&amp;quot;-I `wx-config --prefix`/share/aclocal&amp;quot;&amp;lt;/pre&amp;gt; &amp;lt;!--[[User:Jabber|Jabber]] 06:24, 2 August 2006 (EDT)--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To change the aclocal search path more permanently do:&lt;br /&gt;
 echo `wx-config --prefix`/share/aclocal &amp;gt;&amp;gt; /usr/share/aclocal/dirlist&lt;br /&gt;
Then aclocal will also search somewhere like /opt/wx/2.6/share/aclocal&lt;br /&gt;
&lt;br /&gt;
'''Note for Ubuntu users:''' The above is not the correct way to fix the AM_* errors. Rather, you only need to install the package named &amp;quot;wx-common&amp;quot; (Universe repository).&lt;br /&gt;
&lt;br /&gt;
If you get something like&lt;br /&gt;
 The usual way to define `LIBTOOL' is to add `AC_PROG_LIBTOOL'&lt;br /&gt;
&lt;br /&gt;
it can be solved by something like: (adapt path, use `wx-config --prefix` is necessary)&lt;br /&gt;
&lt;br /&gt;
 ACLOCAL_FLAGS=&amp;quot;-I /usr/share/aclocal&amp;quot; ./bootstrap&lt;br /&gt;
&lt;br /&gt;
(*Note// '''If you run ./bootstrap and get errors like''':&lt;br /&gt;
 : bad interpreter: File not found&lt;br /&gt;
then there exists a problem with DOS line-endings. i had this error after i tried to build a  codeblocks from sources which were checked out with cvs on a windows machine. After i checked out a fresh copy of codeblocks from cvs under Ubuntu linux (see above topic: Downloading the latest source package fom SVN), all errors were gone. &lt;br /&gt;
//tiwag 051008*)&amp;lt;br&amp;gt;&lt;br /&gt;
Or, instead of downloading from SVN, you might consider using the little command line tool dos2unix, which normally comes with most distributions. //lizzarddude060103&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
If configure aborts with some unspecific error message(&amp;quot;.infig.status: error: cannot find input file: Makefile&amp;quot;), you might consider also running&lt;br /&gt;
 dos2unix bootstrap acinclude.m4 codeblocks.pc.in configure.in Makefile.am&lt;br /&gt;
before running bootstrap&lt;br /&gt;
&lt;br /&gt;
Once you've run the bootstrap script, installing is as simple as:&lt;br /&gt;
 ./configure&lt;br /&gt;
 make&lt;br /&gt;
 make install&lt;br /&gt;
&lt;br /&gt;
If you have multiple versions of wxWidgets installed or kept them inplace, you can use&lt;br /&gt;
./configure --with-wx-config=/path/to/wx-config&lt;br /&gt;
&lt;br /&gt;
To uninstall you can later run:&lt;br /&gt;
 make uninstall&lt;br /&gt;
&lt;br /&gt;
If you want to recompile everything, first run:&lt;br /&gt;
 make clean&lt;br /&gt;
 make distclean&lt;br /&gt;
 make clean-bin&lt;br /&gt;
 make clean-zipfiles&lt;br /&gt;
and then follow the above sequence for installing.&lt;br /&gt;
&lt;br /&gt;
By default, CodeBlocks will install to /usr/local.  If you want it in its own tree (so you can have multiple versions of CodeBlocks, each in its own subdirectory of /opt) replace the above ./configure command with:&lt;br /&gt;
 ./configure --prefix=/opt/codeblocks-svn&lt;br /&gt;
or similar.  Then you can later install a different build like:&lt;br /&gt;
 ./configure --prefix=/opt/codeblocks2-svn&lt;br /&gt;
followed by 'make &amp;amp;&amp;amp; make install' as usual.&lt;br /&gt;
&lt;br /&gt;
By default, CodeBlocks will not compile the contributed plugins from SVN.  If you want to compile / install them too, replace the above ./configure command with:&lt;br /&gt;
 ./configure --with-contrib-plugins=all&lt;br /&gt;
followed by 'make &amp;amp;&amp;amp; make install' as usual.&lt;br /&gt;
&lt;br /&gt;
To see a list of other options available for configuring the build of CodeBlocks do:&lt;br /&gt;
 ./configure --help&lt;br /&gt;
&lt;br /&gt;
To compile under gentoo, use&lt;br /&gt;
 ./configure --with-wx-config=wx-config-2.8&lt;br /&gt;
&lt;br /&gt;
====Resolving issues with Code::Blocks SVN====&lt;br /&gt;
&lt;br /&gt;
When running Code::Blocks after the installation it might happen, that the system complains:&lt;br /&gt;
 codeblocks: error while loading shared libraries: libcodeblocks.so.0: cannot open shared object file: No such file or directory&lt;br /&gt;
In that case make sure the library path where the Code::Blocks libraries where installed into is &amp;quot;known&amp;quot; to the system. For example: On Ubuntu using a default build process on a clean system will install the Code::Blocks executables to /use/local/bin and the libraries to /usr/local/lib. The latter is usually not known to a &amp;quot;clean&amp;quot; Ubuntu system. To add it to the search path for libraries do the following (as root / using sudo respectively):&lt;br /&gt;
Add the following line to the file /etc/ld.so.conf:&lt;br /&gt;
 /usr/local/lib&lt;br /&gt;
...and run:&lt;br /&gt;
 ldconfig&lt;br /&gt;
That's it - Code::Blocks should now work just fine as all libraries are being found.&lt;/div&gt;</summary>
		<author><name>Spacemonkey</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=Installing_Code::Blocks_from_source_on_Linux&amp;diff=6192</id>
		<title>Installing Code::Blocks from source on Linux</title>
		<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php?title=Installing_Code::Blocks_from_source_on_Linux&amp;diff=6192"/>
		<updated>2009-11-19T13:41:03Z</updated>

		<summary type="html">&lt;p&gt;Spacemonkey: /* Checking the presence of libwxGTK library */&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;
These are instructions on how to build Code::Blocks under Linux. These instructions should work for all Linux distros, as we'll be installing from sources.&lt;br /&gt;
&lt;br /&gt;
===Prerequisites===&lt;br /&gt;
&lt;br /&gt;
In order to successfully compile Code::Blocks, the [http://en.wikipedia.org/wiki/WxWidgets wxWidgets] User Interface library &amp;lt;u&amp;gt;must be installed&amp;lt;/u&amp;gt;. For most Linux users, this is maybe the only dependency not already installed. wxWidget can be used directly on top of the X server, in this case the variant of the wxWidget library is called wxX11. However this library [http://wiki.wxwidgets.org/WxWidgets_Compared_To_Other_Toolkits#Why_You_Shouldn.27t_Use_wxWidgets &amp;quot;is sub-par compared to other toolkits and unstable&amp;quot;]. Hence Code::Blocks uses wxGTK, the version of wxWidget based on GTK+. The exact requirement is libwxGTK-2.8.0 or later (2.8.3 is not recommanded because of some troubles). This creates an additional dependency on GTK+, consider the following:&lt;br /&gt;
&lt;br /&gt;
A possible implementation which does not exist: &lt;br /&gt;
&lt;br /&gt;
''Code::Blocks  -&amp;gt;  xwWidget (libwxX11)  -&amp;gt;  X''&lt;br /&gt;
&lt;br /&gt;
Current Code::Blocks implementation: &lt;br /&gt;
&lt;br /&gt;
''Code::Blocks  -&amp;gt;  '''xwWidget (&amp;gt; libwxGTK2.8)'''  -&amp;gt;  '''GTK+ (&amp;gt; libgtk-x11-2.0)'''  -&amp;gt;  X''&lt;br /&gt;
&lt;br /&gt;
This document helps you to install libwxGTK if necessary but does not cover the installation of GTK+. GTK+ is probably installed on your Linux anyway, so don't worry ;)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
''Note:'' All the instructions below, assume an existing directory named &amp;lt;tt&amp;gt;~/devel&amp;lt;/tt&amp;gt;. If you 'll be using a different one, adjust the path to match.&lt;br /&gt;
As a first step create this directory:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;mkdir ~/devel&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Checking the presence of GTK+ library ===&lt;br /&gt;
&lt;br /&gt;
Have a look in /usr/lib for something like &amp;quot;libgtk-x11-2.0.so&amp;quot; (Note the library must be 2.0 minimum). Alternatively, do a search with your package manager or go to your Linux distribution forum for help. If you don't want to loose time, you can even forget this check since there is a good probability that everything is already installed.&lt;br /&gt;
&lt;br /&gt;
===Library wxGTK installation===&lt;br /&gt;
&lt;br /&gt;
==== Checking the presence of libwxGTK library ====&lt;br /&gt;
&lt;br /&gt;
In your package manager, look for 'libwxgtk' keyword and verify that '''all''' libwxgtk2.8 stuffs are installed. If you find the libraries uninstalled, well '''just install them and go directly to Code::Blocks installation'''.&lt;br /&gt;
&lt;br /&gt;
Alternatively you can do the same in command line:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;$ ls /usr/lib/libwx_gtk* //to verify the presence&lt;br /&gt;
$ sudo apt-get install libwxgtk2.8-dev&lt;br /&gt;
$ sudo apt-get install libwxgtk2.8-0&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and verify that you get some outputs. If you see nothing you must install the library as described below, and you can redo this check afterwards to verify that the installation worked correctly.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
''Note for Debian (and Ubuntu?) users:'' You can use &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;$ update-alternatives --config wx-config&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
to see which version of libwx is there or not and currently active. If you have different versions, select one superior to 2.8.0, if you have nothing go to next step.&lt;br /&gt;
&lt;br /&gt;
====Getting wxGTK sources====&lt;br /&gt;
&lt;br /&gt;
Visit the [http://www.wxwidgets.org wxWidgets web site]. Click the &amp;quot;Download&amp;quot; button at the top of the page. Under wxWidgets 2.8.7 downloads, select wxGTK. Save the file in &amp;lt;tt&amp;gt;~/devel&amp;lt;/tt&amp;gt;. After the download finishes, switch to &amp;lt;tt&amp;gt;~/devel&amp;lt;/tt&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;cd ~/devel&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, untar the wxGTK sources:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;tar zxf wxGTK-2.8.7.tar.gz&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Switch to the wxGTK directory&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;cd wxGTK-2.8.7&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====wxWidgets build====&lt;br /&gt;
&lt;br /&gt;
Here we will create a seperate build directory instead of building from the src directory, so that we can easily rebuild with different options (unicode / ansi, monolithic / many libs, etc).&lt;br /&gt;
&lt;br /&gt;
The documentation says the default is for gtk2 to use unicode and wx &amp;gt; 2.5 to build as a monolithic library.  This doesn't appear to be the case, so these flags are passed to configure.&lt;br /&gt;
&lt;br /&gt;
 mkdir build_gtk2_shared_monolithic_unicode&lt;br /&gt;
 cd build_gtk2_shared_monolithic_unicode&lt;br /&gt;
 ../configure --prefix=/opt/wx/2.8 \&lt;br /&gt;
        --enable-xrc \&lt;br /&gt;
        --enable-monolithic \&lt;br /&gt;
        --enable-unicode&lt;br /&gt;
 make&lt;br /&gt;
 su&lt;br /&gt;
 make install&lt;br /&gt;
 exit&lt;br /&gt;
&lt;br /&gt;
Add /opt/wx/2.8/bin to the PATH (if you're shell is bash then edit /etc/profile or ~/.bash_profile)&lt;br /&gt;
(On Suse 10.1 edit /etc/profile.local, it will only be available after a new login).  an example PATH&lt;br /&gt;
 export PATH=/usr/bin:/opt/wx/2.8/bin:$PATH&lt;br /&gt;
&lt;br /&gt;
'''Note:''' On Ubuntu Hoary it was necessary to check &amp;quot;Run command as login shell&amp;quot; &lt;br /&gt;
in the gnome-terminal profile-settings, otherwise the PATH changes are not available in a gnome-terminal window.&lt;br /&gt;
&lt;br /&gt;
add /opt/wx/2.8/lib to /etc/ld.so.conf (nano /etc/ld.so.conf)&lt;br /&gt;
then run:&lt;br /&gt;
 ldconfig&lt;br /&gt;
 source /etc/profile&lt;br /&gt;
&lt;br /&gt;
That's it.  Now the linker will look in /opt/wx/2.8/lib for wx libraries and you will have a monolithic shared library unicode build.&lt;br /&gt;
&lt;br /&gt;
To check that things are working, type:&lt;br /&gt;
 wx-config --prefix&lt;br /&gt;
which should give you /opt/wx/2.8&lt;br /&gt;
 wx-config --libs&lt;br /&gt;
which should have at least&lt;br /&gt;
 -L/opt/wx/2.8/lib -lwx_gtk2-2.8&lt;br /&gt;
but can contain other flags as well.&lt;br /&gt;
 which wx-config&lt;br /&gt;
should return /opt/wx/2.8/bin/wx-config&lt;br /&gt;
&lt;br /&gt;
===Code::Blocks installation===&lt;br /&gt;
&lt;br /&gt;
====Downloading Code::Blocks====&lt;br /&gt;
&lt;br /&gt;
You can get Code::Blocks source code in one way:&lt;br /&gt;
* Get the latest sources from the SVN repository.&lt;br /&gt;
This method is described below.&lt;br /&gt;
&lt;br /&gt;
=====Getting the latest sources from SVN=====&lt;br /&gt;
'''IMPORTANT NOTICE: The Sourceforge CVS is no longer used although it still exists'''&lt;br /&gt;
&lt;br /&gt;
Enter your development directory:&lt;br /&gt;
&amp;lt;pre&amp;gt;cd ~/devel&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then checkout the source using one of [https://www.codeblocks.org/downloads/7 these] methods.&lt;br /&gt;
&lt;br /&gt;
This will create the directory &amp;lt;tt&amp;gt;trunk&amp;lt;/tt&amp;gt;.&lt;br /&gt;
Change to the source code directory, by issuing the following command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;cd trunk&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Building Code::Blocks SVN====&lt;br /&gt;
If you are a Gentoo user, please see [[Compiling_Code::Blocks_in_Gentoo]].&lt;br /&gt;
&lt;br /&gt;
Before beginning, it is often a good idea to check you have recent versions of autoconf and automake - repositories versions are not always recent enough. (if you do not have automake, then you will get &amp;quot;cannot find aclocal&amp;quot; error).&lt;br /&gt;
&lt;br /&gt;
If you're compiling the svn trunk versions of CodeBlocks (or future versions) then the unix build has switched to autotools.  So first build wxWidgets as described above and then build CodeBlocks as follows:&lt;br /&gt;
&lt;br /&gt;
 ./bootstrap&lt;br /&gt;
&lt;br /&gt;
This sets up the configure script and its dependencies.  It only needs to be run once (after downloading the source from svn).  '''If you get errors like:'''&lt;br /&gt;
 aclocal:configure.in:61: warning: macro `AM_OPTIONS_WXCONFIG' not found in library&lt;br /&gt;
Then aclocal is having trouble finding the wxWidgets .m4 files.  You can do one of two things:&lt;br /&gt;
To just get bootstrap to find the path this time do:&lt;br /&gt;
&amp;lt;!-- *********** Bad syntax... removed 2006-08-28 by BentFX ****************************&lt;br /&gt;
 export ACLOCAL_FLAGS=&amp;quot;--acdir=`wx-config --prefix`/share/aclocal&amp;quot;&lt;br /&gt;
&lt;br /&gt;
: Note: The above command resulted in missing macros when running ./bootstrap for me. Setting an additional search path instead of overwriting like above worked for me. In case of missing macros try &lt;br /&gt;
***********************************************************************************--&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;export ACLOCAL_FLAGS=&amp;quot;-I `wx-config --prefix`/share/aclocal&amp;quot;&amp;lt;/pre&amp;gt; &amp;lt;!--[[User:Jabber|Jabber]] 06:24, 2 August 2006 (EDT)--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To change the aclocal search path more permanently do:&lt;br /&gt;
 echo `wx-config --prefix`/share/aclocal &amp;gt;&amp;gt; /usr/share/aclocal/dirlist&lt;br /&gt;
Then aclocal will also search somewhere like /opt/wx/2.6/share/aclocal&lt;br /&gt;
&lt;br /&gt;
'''Note for Ubuntu users:''' The above is not the correct way to fix the AM_* errors. Rather, you only need to install the package named &amp;quot;wx-common&amp;quot; (Universe repository).&lt;br /&gt;
&lt;br /&gt;
If you get something like&lt;br /&gt;
 The usual way to define `LIBTOOL' is to add `AC_PROG_LIBTOOL'&lt;br /&gt;
&lt;br /&gt;
it can be solved by something like: (adapt path, use `wx-config --prefix` is necessary)&lt;br /&gt;
&lt;br /&gt;
 ACLOCAL_FLAGS=&amp;quot;-I /usr/share/aclocal&amp;quot; ./bootstrap&lt;br /&gt;
&lt;br /&gt;
(*Note// '''If you run ./bootstrap and get errors like''':&lt;br /&gt;
 : bad interpreter: File not found&lt;br /&gt;
then there exists a problem with DOS line-endings. i had this error after i tried to build a  codeblocks from sources which were checked out with cvs on a windows machine. After i checked out a fresh copy of codeblocks from cvs under Ubuntu linux (see above topic: Downloading the latest source package fom SVN), all errors were gone. &lt;br /&gt;
//tiwag 051008*)&amp;lt;br&amp;gt;&lt;br /&gt;
Or, instead of downloading from SVN, you might consider using the little command line tool dos2unix, which normally comes with most distributions. //lizzarddude060103&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
If configure aborts with some unspecific error message(&amp;quot;.infig.status: error: cannot find input file: Makefile&amp;quot;), you might consider also running&lt;br /&gt;
 dos2unix bootstrap acinclude.m4 codeblocks.pc.in configure.in Makefile.am&lt;br /&gt;
before running bootstrap&lt;br /&gt;
&lt;br /&gt;
Once you've run the bootstrap script, installing is as simple as:&lt;br /&gt;
 ./configure&lt;br /&gt;
 make&lt;br /&gt;
 make install&lt;br /&gt;
&lt;br /&gt;
If you have multiple versions of wxWidgets installed or kept them inplace, you can use&lt;br /&gt;
./configure --with-wx-config=/path/to/wx-config&lt;br /&gt;
&lt;br /&gt;
To uninstall you can later run:&lt;br /&gt;
 make uninstall&lt;br /&gt;
&lt;br /&gt;
If you want to recompile everything, first run:&lt;br /&gt;
 make clean&lt;br /&gt;
 make distclean&lt;br /&gt;
 make clean-bin&lt;br /&gt;
 make clean-zipfiles&lt;br /&gt;
and then follow the above sequence for installing.&lt;br /&gt;
&lt;br /&gt;
By default, CodeBlocks will install to /usr/local.  If you want it in its own tree (so you can have multiple versions of CodeBlocks, each in its own subdirectory of /opt) replace the above ./configure command with:&lt;br /&gt;
 ./configure --prefix=/opt/codeblocks-svn&lt;br /&gt;
or similar.  Then you can later install a different build like:&lt;br /&gt;
 ./configure --prefix=/opt/codeblocks2-svn&lt;br /&gt;
followed by 'make &amp;amp;&amp;amp; make install' as usual.&lt;br /&gt;
&lt;br /&gt;
By default, CodeBlocks will not compile the contributed plugins from SVN.  If you want to compile / install them too, replace the above ./configure command with:&lt;br /&gt;
 ./configure --with-contrib-plugins=all&lt;br /&gt;
followed by 'make &amp;amp;&amp;amp; make install' as usual.&lt;br /&gt;
&lt;br /&gt;
To see a list of other options available for configuring the build of CodeBlocks do:&lt;br /&gt;
 ./configure --help&lt;br /&gt;
&lt;br /&gt;
To compile under gentoo, use&lt;br /&gt;
 ./configure --with-wx-config=wx-config-2.8&lt;br /&gt;
&lt;br /&gt;
====Resolving issues with Code::Blocks SVN====&lt;br /&gt;
&lt;br /&gt;
When running Code::Blocks after the installation it might happen, that the system complains:&lt;br /&gt;
 codeblocks: error while loading shared libraries: libcodeblocks.so.0: cannot open shared object file: No such file or directory&lt;br /&gt;
In that case make sure the library path where the Code::Blocks libraries where installed into is &amp;quot;known&amp;quot; to the system. For example: On Ubuntu using a default build process on a clean system will install the Code::Blocks executables to /use/local/bin and the libraries to /usr/local/lib. The latter is usually not known to a &amp;quot;clean&amp;quot; Ubuntu system. To add it to the search path for libraries do the following (as root / using sudo respectively):&lt;br /&gt;
Add the following line to the file /etc/ld.so.conf:&lt;br /&gt;
 /usr/local/lib&lt;br /&gt;
...and run:&lt;br /&gt;
 ldconfig&lt;br /&gt;
That's it - Code::Blocks should now work just fine as all libraries are being found.&lt;/div&gt;</summary>
		<author><name>Spacemonkey</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=Installing_Code::Blocks_from_source_on_Linux&amp;diff=6191</id>
		<title>Installing Code::Blocks from source on Linux</title>
		<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php?title=Installing_Code::Blocks_from_source_on_Linux&amp;diff=6191"/>
		<updated>2009-11-19T13:40:17Z</updated>

		<summary type="html">&lt;p&gt;Spacemonkey: /* wxGTK installation */&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;
These are instructions on how to build Code::Blocks under Linux. These instructions should work for all Linux distros, as we'll be installing from sources.&lt;br /&gt;
&lt;br /&gt;
===Prerequisites===&lt;br /&gt;
&lt;br /&gt;
In order to successfully compile Code::Blocks, the [http://en.wikipedia.org/wiki/WxWidgets wxWidgets] User Interface library &amp;lt;u&amp;gt;must be installed&amp;lt;/u&amp;gt;. For most Linux users, this is maybe the only dependency not already installed. wxWidget can be used directly on top of the X server, in this case the variant of the wxWidget library is called wxX11. However this library [http://wiki.wxwidgets.org/WxWidgets_Compared_To_Other_Toolkits#Why_You_Shouldn.27t_Use_wxWidgets &amp;quot;is sub-par compared to other toolkits and unstable&amp;quot;]. Hence Code::Blocks uses wxGTK, the version of wxWidget based on GTK+. The exact requirement is libwxGTK-2.8.0 or later (2.8.3 is not recommanded because of some troubles). This creates an additional dependency on GTK+, consider the following:&lt;br /&gt;
&lt;br /&gt;
A possible implementation which does not exist: &lt;br /&gt;
&lt;br /&gt;
''Code::Blocks  -&amp;gt;  xwWidget (libwxX11)  -&amp;gt;  X''&lt;br /&gt;
&lt;br /&gt;
Current Code::Blocks implementation: &lt;br /&gt;
&lt;br /&gt;
''Code::Blocks  -&amp;gt;  '''xwWidget (&amp;gt; libwxGTK2.8)'''  -&amp;gt;  '''GTK+ (&amp;gt; libgtk-x11-2.0)'''  -&amp;gt;  X''&lt;br /&gt;
&lt;br /&gt;
This document helps you to install libwxGTK if necessary but does not cover the installation of GTK+. GTK+ is probably installed on your Linux anyway, so don't worry ;)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
''Note:'' All the instructions below, assume an existing directory named &amp;lt;tt&amp;gt;~/devel&amp;lt;/tt&amp;gt;. If you 'll be using a different one, adjust the path to match.&lt;br /&gt;
As a first step create this directory:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;mkdir ~/devel&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Checking the presence of GTK+ library ===&lt;br /&gt;
&lt;br /&gt;
Have a look in /usr/lib for something like &amp;quot;libgtk-x11-2.0.so&amp;quot; (Note the library must be 2.0 minimum). Alternatively, do a search with your package manager or go to your Linux distribution forum for help. If you don't want to loose time, you can even forget this check since there is a good probability that everything is already installed.&lt;br /&gt;
&lt;br /&gt;
===Library wxGTK installation===&lt;br /&gt;
&lt;br /&gt;
==== Checking the presence of libwxGTK library ====&lt;br /&gt;
&lt;br /&gt;
In your package manager, look for 'libwxgtk' keyword and verify that '''all''' libwxgtk2.8 stuffs are installed. If you find the libraries uninstalled, well '''just install them and go directly to Code::Blocks installation'''.&lt;br /&gt;
&lt;br /&gt;
Alternatively you do the same in command line:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;$ ls /usr/lib/libwx_gtk* //to verify the presence&lt;br /&gt;
$ sudo apt-get install libwxgtk2.8-dev&lt;br /&gt;
$ sudo apt-get install libwxgtk2.8-0&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and verify that you get some outputs. If you see nothing you must install the library as described below, and you can redo this check afterwards to verify that the installation worked correctly.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
''Note for Debian (and Ubuntu?) users:'' You can use &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;$ update-alternatives --config wx-config&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
to see which version of libwx is there or not and currently active. If you have different versions, select one superior to 2.8.0, if you have nothing go to next step.&lt;br /&gt;
&lt;br /&gt;
====Getting wxGTK sources====&lt;br /&gt;
&lt;br /&gt;
Visit the [http://www.wxwidgets.org wxWidgets web site]. Click the &amp;quot;Download&amp;quot; button at the top of the page. Under wxWidgets 2.8.7 downloads, select wxGTK. Save the file in &amp;lt;tt&amp;gt;~/devel&amp;lt;/tt&amp;gt;. After the download finishes, switch to &amp;lt;tt&amp;gt;~/devel&amp;lt;/tt&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;cd ~/devel&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, untar the wxGTK sources:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;tar zxf wxGTK-2.8.7.tar.gz&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Switch to the wxGTK directory&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;cd wxGTK-2.8.7&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====wxWidgets build====&lt;br /&gt;
&lt;br /&gt;
Here we will create a seperate build directory instead of building from the src directory, so that we can easily rebuild with different options (unicode / ansi, monolithic / many libs, etc).&lt;br /&gt;
&lt;br /&gt;
The documentation says the default is for gtk2 to use unicode and wx &amp;gt; 2.5 to build as a monolithic library.  This doesn't appear to be the case, so these flags are passed to configure.&lt;br /&gt;
&lt;br /&gt;
 mkdir build_gtk2_shared_monolithic_unicode&lt;br /&gt;
 cd build_gtk2_shared_monolithic_unicode&lt;br /&gt;
 ../configure --prefix=/opt/wx/2.8 \&lt;br /&gt;
        --enable-xrc \&lt;br /&gt;
        --enable-monolithic \&lt;br /&gt;
        --enable-unicode&lt;br /&gt;
 make&lt;br /&gt;
 su&lt;br /&gt;
 make install&lt;br /&gt;
 exit&lt;br /&gt;
&lt;br /&gt;
Add /opt/wx/2.8/bin to the PATH (if you're shell is bash then edit /etc/profile or ~/.bash_profile)&lt;br /&gt;
(On Suse 10.1 edit /etc/profile.local, it will only be available after a new login).  an example PATH&lt;br /&gt;
 export PATH=/usr/bin:/opt/wx/2.8/bin:$PATH&lt;br /&gt;
&lt;br /&gt;
'''Note:''' On Ubuntu Hoary it was necessary to check &amp;quot;Run command as login shell&amp;quot; &lt;br /&gt;
in the gnome-terminal profile-settings, otherwise the PATH changes are not available in a gnome-terminal window.&lt;br /&gt;
&lt;br /&gt;
add /opt/wx/2.8/lib to /etc/ld.so.conf (nano /etc/ld.so.conf)&lt;br /&gt;
then run:&lt;br /&gt;
 ldconfig&lt;br /&gt;
 source /etc/profile&lt;br /&gt;
&lt;br /&gt;
That's it.  Now the linker will look in /opt/wx/2.8/lib for wx libraries and you will have a monolithic shared library unicode build.&lt;br /&gt;
&lt;br /&gt;
To check that things are working, type:&lt;br /&gt;
 wx-config --prefix&lt;br /&gt;
which should give you /opt/wx/2.8&lt;br /&gt;
 wx-config --libs&lt;br /&gt;
which should have at least&lt;br /&gt;
 -L/opt/wx/2.8/lib -lwx_gtk2-2.8&lt;br /&gt;
but can contain other flags as well.&lt;br /&gt;
 which wx-config&lt;br /&gt;
should return /opt/wx/2.8/bin/wx-config&lt;br /&gt;
&lt;br /&gt;
===Code::Blocks installation===&lt;br /&gt;
&lt;br /&gt;
====Downloading Code::Blocks====&lt;br /&gt;
&lt;br /&gt;
You can get Code::Blocks source code in one way:&lt;br /&gt;
* Get the latest sources from the SVN repository.&lt;br /&gt;
This method is described below.&lt;br /&gt;
&lt;br /&gt;
=====Getting the latest sources from SVN=====&lt;br /&gt;
'''IMPORTANT NOTICE: The Sourceforge CVS is no longer used although it still exists'''&lt;br /&gt;
&lt;br /&gt;
Enter your development directory:&lt;br /&gt;
&amp;lt;pre&amp;gt;cd ~/devel&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then checkout the source using one of [https://www.codeblocks.org/downloads/7 these] methods.&lt;br /&gt;
&lt;br /&gt;
This will create the directory &amp;lt;tt&amp;gt;trunk&amp;lt;/tt&amp;gt;.&lt;br /&gt;
Change to the source code directory, by issuing the following command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;cd trunk&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Building Code::Blocks SVN====&lt;br /&gt;
If you are a Gentoo user, please see [[Compiling_Code::Blocks_in_Gentoo]].&lt;br /&gt;
&lt;br /&gt;
Before beginning, it is often a good idea to check you have recent versions of autoconf and automake - repositories versions are not always recent enough. (if you do not have automake, then you will get &amp;quot;cannot find aclocal&amp;quot; error).&lt;br /&gt;
&lt;br /&gt;
If you're compiling the svn trunk versions of CodeBlocks (or future versions) then the unix build has switched to autotools.  So first build wxWidgets as described above and then build CodeBlocks as follows:&lt;br /&gt;
&lt;br /&gt;
 ./bootstrap&lt;br /&gt;
&lt;br /&gt;
This sets up the configure script and its dependencies.  It only needs to be run once (after downloading the source from svn).  '''If you get errors like:'''&lt;br /&gt;
 aclocal:configure.in:61: warning: macro `AM_OPTIONS_WXCONFIG' not found in library&lt;br /&gt;
Then aclocal is having trouble finding the wxWidgets .m4 files.  You can do one of two things:&lt;br /&gt;
To just get bootstrap to find the path this time do:&lt;br /&gt;
&amp;lt;!-- *********** Bad syntax... removed 2006-08-28 by BentFX ****************************&lt;br /&gt;
 export ACLOCAL_FLAGS=&amp;quot;--acdir=`wx-config --prefix`/share/aclocal&amp;quot;&lt;br /&gt;
&lt;br /&gt;
: Note: The above command resulted in missing macros when running ./bootstrap for me. Setting an additional search path instead of overwriting like above worked for me. In case of missing macros try &lt;br /&gt;
***********************************************************************************--&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;export ACLOCAL_FLAGS=&amp;quot;-I `wx-config --prefix`/share/aclocal&amp;quot;&amp;lt;/pre&amp;gt; &amp;lt;!--[[User:Jabber|Jabber]] 06:24, 2 August 2006 (EDT)--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To change the aclocal search path more permanently do:&lt;br /&gt;
 echo `wx-config --prefix`/share/aclocal &amp;gt;&amp;gt; /usr/share/aclocal/dirlist&lt;br /&gt;
Then aclocal will also search somewhere like /opt/wx/2.6/share/aclocal&lt;br /&gt;
&lt;br /&gt;
'''Note for Ubuntu users:''' The above is not the correct way to fix the AM_* errors. Rather, you only need to install the package named &amp;quot;wx-common&amp;quot; (Universe repository).&lt;br /&gt;
&lt;br /&gt;
If you get something like&lt;br /&gt;
 The usual way to define `LIBTOOL' is to add `AC_PROG_LIBTOOL'&lt;br /&gt;
&lt;br /&gt;
it can be solved by something like: (adapt path, use `wx-config --prefix` is necessary)&lt;br /&gt;
&lt;br /&gt;
 ACLOCAL_FLAGS=&amp;quot;-I /usr/share/aclocal&amp;quot; ./bootstrap&lt;br /&gt;
&lt;br /&gt;
(*Note// '''If you run ./bootstrap and get errors like''':&lt;br /&gt;
 : bad interpreter: File not found&lt;br /&gt;
then there exists a problem with DOS line-endings. i had this error after i tried to build a  codeblocks from sources which were checked out with cvs on a windows machine. After i checked out a fresh copy of codeblocks from cvs under Ubuntu linux (see above topic: Downloading the latest source package fom SVN), all errors were gone. &lt;br /&gt;
//tiwag 051008*)&amp;lt;br&amp;gt;&lt;br /&gt;
Or, instead of downloading from SVN, you might consider using the little command line tool dos2unix, which normally comes with most distributions. //lizzarddude060103&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
If configure aborts with some unspecific error message(&amp;quot;.infig.status: error: cannot find input file: Makefile&amp;quot;), you might consider also running&lt;br /&gt;
 dos2unix bootstrap acinclude.m4 codeblocks.pc.in configure.in Makefile.am&lt;br /&gt;
before running bootstrap&lt;br /&gt;
&lt;br /&gt;
Once you've run the bootstrap script, installing is as simple as:&lt;br /&gt;
 ./configure&lt;br /&gt;
 make&lt;br /&gt;
 make install&lt;br /&gt;
&lt;br /&gt;
If you have multiple versions of wxWidgets installed or kept them inplace, you can use&lt;br /&gt;
./configure --with-wx-config=/path/to/wx-config&lt;br /&gt;
&lt;br /&gt;
To uninstall you can later run:&lt;br /&gt;
 make uninstall&lt;br /&gt;
&lt;br /&gt;
If you want to recompile everything, first run:&lt;br /&gt;
 make clean&lt;br /&gt;
 make distclean&lt;br /&gt;
 make clean-bin&lt;br /&gt;
 make clean-zipfiles&lt;br /&gt;
and then follow the above sequence for installing.&lt;br /&gt;
&lt;br /&gt;
By default, CodeBlocks will install to /usr/local.  If you want it in its own tree (so you can have multiple versions of CodeBlocks, each in its own subdirectory of /opt) replace the above ./configure command with:&lt;br /&gt;
 ./configure --prefix=/opt/codeblocks-svn&lt;br /&gt;
or similar.  Then you can later install a different build like:&lt;br /&gt;
 ./configure --prefix=/opt/codeblocks2-svn&lt;br /&gt;
followed by 'make &amp;amp;&amp;amp; make install' as usual.&lt;br /&gt;
&lt;br /&gt;
By default, CodeBlocks will not compile the contributed plugins from SVN.  If you want to compile / install them too, replace the above ./configure command with:&lt;br /&gt;
 ./configure --with-contrib-plugins=all&lt;br /&gt;
followed by 'make &amp;amp;&amp;amp; make install' as usual.&lt;br /&gt;
&lt;br /&gt;
To see a list of other options available for configuring the build of CodeBlocks do:&lt;br /&gt;
 ./configure --help&lt;br /&gt;
&lt;br /&gt;
To compile under gentoo, use&lt;br /&gt;
 ./configure --with-wx-config=wx-config-2.8&lt;br /&gt;
&lt;br /&gt;
====Resolving issues with Code::Blocks SVN====&lt;br /&gt;
&lt;br /&gt;
When running Code::Blocks after the installation it might happen, that the system complains:&lt;br /&gt;
 codeblocks: error while loading shared libraries: libcodeblocks.so.0: cannot open shared object file: No such file or directory&lt;br /&gt;
In that case make sure the library path where the Code::Blocks libraries where installed into is &amp;quot;known&amp;quot; to the system. For example: On Ubuntu using a default build process on a clean system will install the Code::Blocks executables to /use/local/bin and the libraries to /usr/local/lib. The latter is usually not known to a &amp;quot;clean&amp;quot; Ubuntu system. To add it to the search path for libraries do the following (as root / using sudo respectively):&lt;br /&gt;
Add the following line to the file /etc/ld.so.conf:&lt;br /&gt;
 /usr/local/lib&lt;br /&gt;
...and run:&lt;br /&gt;
 ldconfig&lt;br /&gt;
That's it - Code::Blocks should now work just fine as all libraries are being found.&lt;/div&gt;</summary>
		<author><name>Spacemonkey</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=Installing_Code::Blocks_from_source_on_Linux&amp;diff=6190</id>
		<title>Installing Code::Blocks from source on Linux</title>
		<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php?title=Installing_Code::Blocks_from_source_on_Linux&amp;diff=6190"/>
		<updated>2009-11-19T13:39:51Z</updated>

		<summary type="html">&lt;p&gt;Spacemonkey: /* Checking the presence of GTK+ library */&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;
These are instructions on how to build Code::Blocks under Linux. These instructions should work for all Linux distros, as we'll be installing from sources.&lt;br /&gt;
&lt;br /&gt;
===Prerequisites===&lt;br /&gt;
&lt;br /&gt;
In order to successfully compile Code::Blocks, the [http://en.wikipedia.org/wiki/WxWidgets wxWidgets] User Interface library &amp;lt;u&amp;gt;must be installed&amp;lt;/u&amp;gt;. For most Linux users, this is maybe the only dependency not already installed. wxWidget can be used directly on top of the X server, in this case the variant of the wxWidget library is called wxX11. However this library [http://wiki.wxwidgets.org/WxWidgets_Compared_To_Other_Toolkits#Why_You_Shouldn.27t_Use_wxWidgets &amp;quot;is sub-par compared to other toolkits and unstable&amp;quot;]. Hence Code::Blocks uses wxGTK, the version of wxWidget based on GTK+. The exact requirement is libwxGTK-2.8.0 or later (2.8.3 is not recommanded because of some troubles). This creates an additional dependency on GTK+, consider the following:&lt;br /&gt;
&lt;br /&gt;
A possible implementation which does not exist: &lt;br /&gt;
&lt;br /&gt;
''Code::Blocks  -&amp;gt;  xwWidget (libwxX11)  -&amp;gt;  X''&lt;br /&gt;
&lt;br /&gt;
Current Code::Blocks implementation: &lt;br /&gt;
&lt;br /&gt;
''Code::Blocks  -&amp;gt;  '''xwWidget (&amp;gt; libwxGTK2.8)'''  -&amp;gt;  '''GTK+ (&amp;gt; libgtk-x11-2.0)'''  -&amp;gt;  X''&lt;br /&gt;
&lt;br /&gt;
This document helps you to install libwxGTK if necessary but does not cover the installation of GTK+. GTK+ is probably installed on your Linux anyway, so don't worry ;)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
''Note:'' All the instructions below, assume an existing directory named &amp;lt;tt&amp;gt;~/devel&amp;lt;/tt&amp;gt;. If you 'll be using a different one, adjust the path to match.&lt;br /&gt;
As a first step create this directory:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;mkdir ~/devel&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Checking the presence of GTK+ library ===&lt;br /&gt;
&lt;br /&gt;
Have a look in /usr/lib for something like &amp;quot;libgtk-x11-2.0.so&amp;quot; (Note the library must be 2.0 minimum). Alternatively, do a search with your package manager or go to your Linux distribution forum for help. If you don't want to loose time, you can even forget this check since there is a good probability that everything is already installed.&lt;br /&gt;
&lt;br /&gt;
===wxGTK installation===&lt;br /&gt;
&lt;br /&gt;
==== Checking the presence of libwxGTK library ====&lt;br /&gt;
&lt;br /&gt;
In your package manager, look for 'libwxgtk' keyword and verify that '''all''' libwxgtk2.8 stuffs are installed. If you find the libraries uninstalled, well '''just install them and go directly to Code::Blocks installation'''.&lt;br /&gt;
&lt;br /&gt;
Alternatively you do the same in command line:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;$ ls /usr/lib/libwx_gtk* //to verify the presence&lt;br /&gt;
$ sudo apt-get install libwxgtk2.8-dev&lt;br /&gt;
$ sudo apt-get install libwxgtk2.8-0&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and verify that you get some outputs. If you see nothing you must install the library as described below, and you can redo this check afterwards to verify that the installation worked correctly.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
''Note for Debian (and Ubuntu?) users:'' You can use &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;$ update-alternatives --config wx-config&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
to see which version of libwx is there or not and currently active. If you have different versions, select one superior to 2.8.0, if you have nothing go to next step.&lt;br /&gt;
&lt;br /&gt;
====Getting wxGTK sources====&lt;br /&gt;
&lt;br /&gt;
Visit the [http://www.wxwidgets.org wxWidgets web site]. Click the &amp;quot;Download&amp;quot; button at the top of the page. Under wxWidgets 2.8.7 downloads, select wxGTK. Save the file in &amp;lt;tt&amp;gt;~/devel&amp;lt;/tt&amp;gt;. After the download finishes, switch to &amp;lt;tt&amp;gt;~/devel&amp;lt;/tt&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;cd ~/devel&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, untar the wxGTK sources:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;tar zxf wxGTK-2.8.7.tar.gz&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Switch to the wxGTK directory&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;cd wxGTK-2.8.7&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====wxWidgets build====&lt;br /&gt;
&lt;br /&gt;
Here we will create a seperate build directory instead of building from the src directory, so that we can easily rebuild with different options (unicode / ansi, monolithic / many libs, etc).&lt;br /&gt;
&lt;br /&gt;
The documentation says the default is for gtk2 to use unicode and wx &amp;gt; 2.5 to build as a monolithic library.  This doesn't appear to be the case, so these flags are passed to configure.&lt;br /&gt;
&lt;br /&gt;
 mkdir build_gtk2_shared_monolithic_unicode&lt;br /&gt;
 cd build_gtk2_shared_monolithic_unicode&lt;br /&gt;
 ../configure --prefix=/opt/wx/2.8 \&lt;br /&gt;
        --enable-xrc \&lt;br /&gt;
        --enable-monolithic \&lt;br /&gt;
        --enable-unicode&lt;br /&gt;
 make&lt;br /&gt;
 su&lt;br /&gt;
 make install&lt;br /&gt;
 exit&lt;br /&gt;
&lt;br /&gt;
Add /opt/wx/2.8/bin to the PATH (if you're shell is bash then edit /etc/profile or ~/.bash_profile)&lt;br /&gt;
(On Suse 10.1 edit /etc/profile.local, it will only be available after a new login).  an example PATH&lt;br /&gt;
 export PATH=/usr/bin:/opt/wx/2.8/bin:$PATH&lt;br /&gt;
&lt;br /&gt;
'''Note:''' On Ubuntu Hoary it was necessary to check &amp;quot;Run command as login shell&amp;quot; &lt;br /&gt;
in the gnome-terminal profile-settings, otherwise the PATH changes are not available in a gnome-terminal window.&lt;br /&gt;
&lt;br /&gt;
add /opt/wx/2.8/lib to /etc/ld.so.conf (nano /etc/ld.so.conf)&lt;br /&gt;
then run:&lt;br /&gt;
 ldconfig&lt;br /&gt;
 source /etc/profile&lt;br /&gt;
&lt;br /&gt;
That's it.  Now the linker will look in /opt/wx/2.8/lib for wx libraries and you will have a monolithic shared library unicode build.&lt;br /&gt;
&lt;br /&gt;
To check that things are working, type:&lt;br /&gt;
 wx-config --prefix&lt;br /&gt;
which should give you /opt/wx/2.8&lt;br /&gt;
 wx-config --libs&lt;br /&gt;
which should have at least&lt;br /&gt;
 -L/opt/wx/2.8/lib -lwx_gtk2-2.8&lt;br /&gt;
but can contain other flags as well.&lt;br /&gt;
 which wx-config&lt;br /&gt;
should return /opt/wx/2.8/bin/wx-config&lt;br /&gt;
&lt;br /&gt;
===Code::Blocks installation===&lt;br /&gt;
&lt;br /&gt;
====Downloading Code::Blocks====&lt;br /&gt;
&lt;br /&gt;
You can get Code::Blocks source code in one way:&lt;br /&gt;
* Get the latest sources from the SVN repository.&lt;br /&gt;
This method is described below.&lt;br /&gt;
&lt;br /&gt;
=====Getting the latest sources from SVN=====&lt;br /&gt;
'''IMPORTANT NOTICE: The Sourceforge CVS is no longer used although it still exists'''&lt;br /&gt;
&lt;br /&gt;
Enter your development directory:&lt;br /&gt;
&amp;lt;pre&amp;gt;cd ~/devel&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then checkout the source using one of [https://www.codeblocks.org/downloads/7 these] methods.&lt;br /&gt;
&lt;br /&gt;
This will create the directory &amp;lt;tt&amp;gt;trunk&amp;lt;/tt&amp;gt;.&lt;br /&gt;
Change to the source code directory, by issuing the following command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;cd trunk&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Building Code::Blocks SVN====&lt;br /&gt;
If you are a Gentoo user, please see [[Compiling_Code::Blocks_in_Gentoo]].&lt;br /&gt;
&lt;br /&gt;
Before beginning, it is often a good idea to check you have recent versions of autoconf and automake - repositories versions are not always recent enough. (if you do not have automake, then you will get &amp;quot;cannot find aclocal&amp;quot; error).&lt;br /&gt;
&lt;br /&gt;
If you're compiling the svn trunk versions of CodeBlocks (or future versions) then the unix build has switched to autotools.  So first build wxWidgets as described above and then build CodeBlocks as follows:&lt;br /&gt;
&lt;br /&gt;
 ./bootstrap&lt;br /&gt;
&lt;br /&gt;
This sets up the configure script and its dependencies.  It only needs to be run once (after downloading the source from svn).  '''If you get errors like:'''&lt;br /&gt;
 aclocal:configure.in:61: warning: macro `AM_OPTIONS_WXCONFIG' not found in library&lt;br /&gt;
Then aclocal is having trouble finding the wxWidgets .m4 files.  You can do one of two things:&lt;br /&gt;
To just get bootstrap to find the path this time do:&lt;br /&gt;
&amp;lt;!-- *********** Bad syntax... removed 2006-08-28 by BentFX ****************************&lt;br /&gt;
 export ACLOCAL_FLAGS=&amp;quot;--acdir=`wx-config --prefix`/share/aclocal&amp;quot;&lt;br /&gt;
&lt;br /&gt;
: Note: The above command resulted in missing macros when running ./bootstrap for me. Setting an additional search path instead of overwriting like above worked for me. In case of missing macros try &lt;br /&gt;
***********************************************************************************--&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;export ACLOCAL_FLAGS=&amp;quot;-I `wx-config --prefix`/share/aclocal&amp;quot;&amp;lt;/pre&amp;gt; &amp;lt;!--[[User:Jabber|Jabber]] 06:24, 2 August 2006 (EDT)--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To change the aclocal search path more permanently do:&lt;br /&gt;
 echo `wx-config --prefix`/share/aclocal &amp;gt;&amp;gt; /usr/share/aclocal/dirlist&lt;br /&gt;
Then aclocal will also search somewhere like /opt/wx/2.6/share/aclocal&lt;br /&gt;
&lt;br /&gt;
'''Note for Ubuntu users:''' The above is not the correct way to fix the AM_* errors. Rather, you only need to install the package named &amp;quot;wx-common&amp;quot; (Universe repository).&lt;br /&gt;
&lt;br /&gt;
If you get something like&lt;br /&gt;
 The usual way to define `LIBTOOL' is to add `AC_PROG_LIBTOOL'&lt;br /&gt;
&lt;br /&gt;
it can be solved by something like: (adapt path, use `wx-config --prefix` is necessary)&lt;br /&gt;
&lt;br /&gt;
 ACLOCAL_FLAGS=&amp;quot;-I /usr/share/aclocal&amp;quot; ./bootstrap&lt;br /&gt;
&lt;br /&gt;
(*Note// '''If you run ./bootstrap and get errors like''':&lt;br /&gt;
 : bad interpreter: File not found&lt;br /&gt;
then there exists a problem with DOS line-endings. i had this error after i tried to build a  codeblocks from sources which were checked out with cvs on a windows machine. After i checked out a fresh copy of codeblocks from cvs under Ubuntu linux (see above topic: Downloading the latest source package fom SVN), all errors were gone. &lt;br /&gt;
//tiwag 051008*)&amp;lt;br&amp;gt;&lt;br /&gt;
Or, instead of downloading from SVN, you might consider using the little command line tool dos2unix, which normally comes with most distributions. //lizzarddude060103&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
If configure aborts with some unspecific error message(&amp;quot;.infig.status: error: cannot find input file: Makefile&amp;quot;), you might consider also running&lt;br /&gt;
 dos2unix bootstrap acinclude.m4 codeblocks.pc.in configure.in Makefile.am&lt;br /&gt;
before running bootstrap&lt;br /&gt;
&lt;br /&gt;
Once you've run the bootstrap script, installing is as simple as:&lt;br /&gt;
 ./configure&lt;br /&gt;
 make&lt;br /&gt;
 make install&lt;br /&gt;
&lt;br /&gt;
If you have multiple versions of wxWidgets installed or kept them inplace, you can use&lt;br /&gt;
./configure --with-wx-config=/path/to/wx-config&lt;br /&gt;
&lt;br /&gt;
To uninstall you can later run:&lt;br /&gt;
 make uninstall&lt;br /&gt;
&lt;br /&gt;
If you want to recompile everything, first run:&lt;br /&gt;
 make clean&lt;br /&gt;
 make distclean&lt;br /&gt;
 make clean-bin&lt;br /&gt;
 make clean-zipfiles&lt;br /&gt;
and then follow the above sequence for installing.&lt;br /&gt;
&lt;br /&gt;
By default, CodeBlocks will install to /usr/local.  If you want it in its own tree (so you can have multiple versions of CodeBlocks, each in its own subdirectory of /opt) replace the above ./configure command with:&lt;br /&gt;
 ./configure --prefix=/opt/codeblocks-svn&lt;br /&gt;
or similar.  Then you can later install a different build like:&lt;br /&gt;
 ./configure --prefix=/opt/codeblocks2-svn&lt;br /&gt;
followed by 'make &amp;amp;&amp;amp; make install' as usual.&lt;br /&gt;
&lt;br /&gt;
By default, CodeBlocks will not compile the contributed plugins from SVN.  If you want to compile / install them too, replace the above ./configure command with:&lt;br /&gt;
 ./configure --with-contrib-plugins=all&lt;br /&gt;
followed by 'make &amp;amp;&amp;amp; make install' as usual.&lt;br /&gt;
&lt;br /&gt;
To see a list of other options available for configuring the build of CodeBlocks do:&lt;br /&gt;
 ./configure --help&lt;br /&gt;
&lt;br /&gt;
To compile under gentoo, use&lt;br /&gt;
 ./configure --with-wx-config=wx-config-2.8&lt;br /&gt;
&lt;br /&gt;
====Resolving issues with Code::Blocks SVN====&lt;br /&gt;
&lt;br /&gt;
When running Code::Blocks after the installation it might happen, that the system complains:&lt;br /&gt;
 codeblocks: error while loading shared libraries: libcodeblocks.so.0: cannot open shared object file: No such file or directory&lt;br /&gt;
In that case make sure the library path where the Code::Blocks libraries where installed into is &amp;quot;known&amp;quot; to the system. For example: On Ubuntu using a default build process on a clean system will install the Code::Blocks executables to /use/local/bin and the libraries to /usr/local/lib. The latter is usually not known to a &amp;quot;clean&amp;quot; Ubuntu system. To add it to the search path for libraries do the following (as root / using sudo respectively):&lt;br /&gt;
Add the following line to the file /etc/ld.so.conf:&lt;br /&gt;
 /usr/local/lib&lt;br /&gt;
...and run:&lt;br /&gt;
 ldconfig&lt;br /&gt;
That's it - Code::Blocks should now work just fine as all libraries are being found.&lt;/div&gt;</summary>
		<author><name>Spacemonkey</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=Installing_Code::Blocks_from_source_on_Linux&amp;diff=6189</id>
		<title>Installing Code::Blocks from source on Linux</title>
		<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php?title=Installing_Code::Blocks_from_source_on_Linux&amp;diff=6189"/>
		<updated>2009-11-19T13:38:46Z</updated>

		<summary type="html">&lt;p&gt;Spacemonkey: /* Checking the presence of libwxGTK library */&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;
These are instructions on how to build Code::Blocks under Linux. These instructions should work for all Linux distros, as we'll be installing from sources.&lt;br /&gt;
&lt;br /&gt;
===Prerequisites===&lt;br /&gt;
&lt;br /&gt;
In order to successfully compile Code::Blocks, the [http://en.wikipedia.org/wiki/WxWidgets wxWidgets] User Interface library &amp;lt;u&amp;gt;must be installed&amp;lt;/u&amp;gt;. For most Linux users, this is maybe the only dependency not already installed. wxWidget can be used directly on top of the X server, in this case the variant of the wxWidget library is called wxX11. However this library [http://wiki.wxwidgets.org/WxWidgets_Compared_To_Other_Toolkits#Why_You_Shouldn.27t_Use_wxWidgets &amp;quot;is sub-par compared to other toolkits and unstable&amp;quot;]. Hence Code::Blocks uses wxGTK, the version of wxWidget based on GTK+. The exact requirement is libwxGTK-2.8.0 or later (2.8.3 is not recommanded because of some troubles). This creates an additional dependency on GTK+, consider the following:&lt;br /&gt;
&lt;br /&gt;
A possible implementation which does not exist: &lt;br /&gt;
&lt;br /&gt;
''Code::Blocks  -&amp;gt;  xwWidget (libwxX11)  -&amp;gt;  X''&lt;br /&gt;
&lt;br /&gt;
Current Code::Blocks implementation: &lt;br /&gt;
&lt;br /&gt;
''Code::Blocks  -&amp;gt;  '''xwWidget (&amp;gt; libwxGTK2.8)'''  -&amp;gt;  '''GTK+ (&amp;gt; libgtk-x11-2.0)'''  -&amp;gt;  X''&lt;br /&gt;
&lt;br /&gt;
This document helps you to install libwxGTK if necessary but does not cover the installation of GTK+. GTK+ is probably installed on your Linux anyway, so don't worry ;)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
''Note:'' All the instructions below, assume an existing directory named &amp;lt;tt&amp;gt;~/devel&amp;lt;/tt&amp;gt;. If you 'll be using a different one, adjust the path to match.&lt;br /&gt;
As a first step create this directory:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;mkdir ~/devel&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Checking the presence of GTK+ library ===&lt;br /&gt;
&lt;br /&gt;
Have a look in /usr/lib for something like &amp;quot;libgtk-x11-2.0.so&amp;quot; (Note the library must be 2.0 minimum). Alternatively, do a search with your package manager or go to your Linux distribution forum for help. If you don't want to loose time, you can even forget this check since there is a good probability that everything is already installed. If you use Gnome you can definitely forget this check and go to the next step, the library is already there!&lt;br /&gt;
&lt;br /&gt;
===wxGTK installation===&lt;br /&gt;
&lt;br /&gt;
==== Checking the presence of libwxGTK library ====&lt;br /&gt;
&lt;br /&gt;
In your package manager, look for 'libwxgtk' keyword and verify that '''all''' libwxgtk2.8 stuffs are installed. If you find the libraries uninstalled, well '''just install them and go directly to Code::Blocks installation'''.&lt;br /&gt;
&lt;br /&gt;
Alternatively you do the same in command line:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;$ ls /usr/lib/libwx_gtk* //to verify the presence&lt;br /&gt;
$ sudo apt-get install libwxgtk2.8-dev&lt;br /&gt;
$ sudo apt-get install libwxgtk2.8-0&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and verify that you get some outputs. If you see nothing you must install the library as described below, and you can redo this check afterwards to verify that the installation worked correctly.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
''Note for Debian (and Ubuntu?) users:'' You can use &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;$ update-alternatives --config wx-config&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
to see which version of libwx is there or not and currently active. If you have different versions, select one superior to 2.8.0, if you have nothing go to next step.&lt;br /&gt;
&lt;br /&gt;
====Getting wxGTK sources====&lt;br /&gt;
&lt;br /&gt;
Visit the [http://www.wxwidgets.org wxWidgets web site]. Click the &amp;quot;Download&amp;quot; button at the top of the page. Under wxWidgets 2.8.7 downloads, select wxGTK. Save the file in &amp;lt;tt&amp;gt;~/devel&amp;lt;/tt&amp;gt;. After the download finishes, switch to &amp;lt;tt&amp;gt;~/devel&amp;lt;/tt&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;cd ~/devel&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, untar the wxGTK sources:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;tar zxf wxGTK-2.8.7.tar.gz&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Switch to the wxGTK directory&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;cd wxGTK-2.8.7&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====wxWidgets build====&lt;br /&gt;
&lt;br /&gt;
Here we will create a seperate build directory instead of building from the src directory, so that we can easily rebuild with different options (unicode / ansi, monolithic / many libs, etc).&lt;br /&gt;
&lt;br /&gt;
The documentation says the default is for gtk2 to use unicode and wx &amp;gt; 2.5 to build as a monolithic library.  This doesn't appear to be the case, so these flags are passed to configure.&lt;br /&gt;
&lt;br /&gt;
 mkdir build_gtk2_shared_monolithic_unicode&lt;br /&gt;
 cd build_gtk2_shared_monolithic_unicode&lt;br /&gt;
 ../configure --prefix=/opt/wx/2.8 \&lt;br /&gt;
        --enable-xrc \&lt;br /&gt;
        --enable-monolithic \&lt;br /&gt;
        --enable-unicode&lt;br /&gt;
 make&lt;br /&gt;
 su&lt;br /&gt;
 make install&lt;br /&gt;
 exit&lt;br /&gt;
&lt;br /&gt;
Add /opt/wx/2.8/bin to the PATH (if you're shell is bash then edit /etc/profile or ~/.bash_profile)&lt;br /&gt;
(On Suse 10.1 edit /etc/profile.local, it will only be available after a new login).  an example PATH&lt;br /&gt;
 export PATH=/usr/bin:/opt/wx/2.8/bin:$PATH&lt;br /&gt;
&lt;br /&gt;
'''Note:''' On Ubuntu Hoary it was necessary to check &amp;quot;Run command as login shell&amp;quot; &lt;br /&gt;
in the gnome-terminal profile-settings, otherwise the PATH changes are not available in a gnome-terminal window.&lt;br /&gt;
&lt;br /&gt;
add /opt/wx/2.8/lib to /etc/ld.so.conf (nano /etc/ld.so.conf)&lt;br /&gt;
then run:&lt;br /&gt;
 ldconfig&lt;br /&gt;
 source /etc/profile&lt;br /&gt;
&lt;br /&gt;
That's it.  Now the linker will look in /opt/wx/2.8/lib for wx libraries and you will have a monolithic shared library unicode build.&lt;br /&gt;
&lt;br /&gt;
To check that things are working, type:&lt;br /&gt;
 wx-config --prefix&lt;br /&gt;
which should give you /opt/wx/2.8&lt;br /&gt;
 wx-config --libs&lt;br /&gt;
which should have at least&lt;br /&gt;
 -L/opt/wx/2.8/lib -lwx_gtk2-2.8&lt;br /&gt;
but can contain other flags as well.&lt;br /&gt;
 which wx-config&lt;br /&gt;
should return /opt/wx/2.8/bin/wx-config&lt;br /&gt;
&lt;br /&gt;
===Code::Blocks installation===&lt;br /&gt;
&lt;br /&gt;
====Downloading Code::Blocks====&lt;br /&gt;
&lt;br /&gt;
You can get Code::Blocks source code in one way:&lt;br /&gt;
* Get the latest sources from the SVN repository.&lt;br /&gt;
This method is described below.&lt;br /&gt;
&lt;br /&gt;
=====Getting the latest sources from SVN=====&lt;br /&gt;
'''IMPORTANT NOTICE: The Sourceforge CVS is no longer used although it still exists'''&lt;br /&gt;
&lt;br /&gt;
Enter your development directory:&lt;br /&gt;
&amp;lt;pre&amp;gt;cd ~/devel&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then checkout the source using one of [https://www.codeblocks.org/downloads/7 these] methods.&lt;br /&gt;
&lt;br /&gt;
This will create the directory &amp;lt;tt&amp;gt;trunk&amp;lt;/tt&amp;gt;.&lt;br /&gt;
Change to the source code directory, by issuing the following command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;cd trunk&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Building Code::Blocks SVN====&lt;br /&gt;
If you are a Gentoo user, please see [[Compiling_Code::Blocks_in_Gentoo]].&lt;br /&gt;
&lt;br /&gt;
Before beginning, it is often a good idea to check you have recent versions of autoconf and automake - repositories versions are not always recent enough. (if you do not have automake, then you will get &amp;quot;cannot find aclocal&amp;quot; error).&lt;br /&gt;
&lt;br /&gt;
If you're compiling the svn trunk versions of CodeBlocks (or future versions) then the unix build has switched to autotools.  So first build wxWidgets as described above and then build CodeBlocks as follows:&lt;br /&gt;
&lt;br /&gt;
 ./bootstrap&lt;br /&gt;
&lt;br /&gt;
This sets up the configure script and its dependencies.  It only needs to be run once (after downloading the source from svn).  '''If you get errors like:'''&lt;br /&gt;
 aclocal:configure.in:61: warning: macro `AM_OPTIONS_WXCONFIG' not found in library&lt;br /&gt;
Then aclocal is having trouble finding the wxWidgets .m4 files.  You can do one of two things:&lt;br /&gt;
To just get bootstrap to find the path this time do:&lt;br /&gt;
&amp;lt;!-- *********** Bad syntax... removed 2006-08-28 by BentFX ****************************&lt;br /&gt;
 export ACLOCAL_FLAGS=&amp;quot;--acdir=`wx-config --prefix`/share/aclocal&amp;quot;&lt;br /&gt;
&lt;br /&gt;
: Note: The above command resulted in missing macros when running ./bootstrap for me. Setting an additional search path instead of overwriting like above worked for me. In case of missing macros try &lt;br /&gt;
***********************************************************************************--&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;export ACLOCAL_FLAGS=&amp;quot;-I `wx-config --prefix`/share/aclocal&amp;quot;&amp;lt;/pre&amp;gt; &amp;lt;!--[[User:Jabber|Jabber]] 06:24, 2 August 2006 (EDT)--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To change the aclocal search path more permanently do:&lt;br /&gt;
 echo `wx-config --prefix`/share/aclocal &amp;gt;&amp;gt; /usr/share/aclocal/dirlist&lt;br /&gt;
Then aclocal will also search somewhere like /opt/wx/2.6/share/aclocal&lt;br /&gt;
&lt;br /&gt;
'''Note for Ubuntu users:''' The above is not the correct way to fix the AM_* errors. Rather, you only need to install the package named &amp;quot;wx-common&amp;quot; (Universe repository).&lt;br /&gt;
&lt;br /&gt;
If you get something like&lt;br /&gt;
 The usual way to define `LIBTOOL' is to add `AC_PROG_LIBTOOL'&lt;br /&gt;
&lt;br /&gt;
it can be solved by something like: (adapt path, use `wx-config --prefix` is necessary)&lt;br /&gt;
&lt;br /&gt;
 ACLOCAL_FLAGS=&amp;quot;-I /usr/share/aclocal&amp;quot; ./bootstrap&lt;br /&gt;
&lt;br /&gt;
(*Note// '''If you run ./bootstrap and get errors like''':&lt;br /&gt;
 : bad interpreter: File not found&lt;br /&gt;
then there exists a problem with DOS line-endings. i had this error after i tried to build a  codeblocks from sources which were checked out with cvs on a windows machine. After i checked out a fresh copy of codeblocks from cvs under Ubuntu linux (see above topic: Downloading the latest source package fom SVN), all errors were gone. &lt;br /&gt;
//tiwag 051008*)&amp;lt;br&amp;gt;&lt;br /&gt;
Or, instead of downloading from SVN, you might consider using the little command line tool dos2unix, which normally comes with most distributions. //lizzarddude060103&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
If configure aborts with some unspecific error message(&amp;quot;.infig.status: error: cannot find input file: Makefile&amp;quot;), you might consider also running&lt;br /&gt;
 dos2unix bootstrap acinclude.m4 codeblocks.pc.in configure.in Makefile.am&lt;br /&gt;
before running bootstrap&lt;br /&gt;
&lt;br /&gt;
Once you've run the bootstrap script, installing is as simple as:&lt;br /&gt;
 ./configure&lt;br /&gt;
 make&lt;br /&gt;
 make install&lt;br /&gt;
&lt;br /&gt;
If you have multiple versions of wxWidgets installed or kept them inplace, you can use&lt;br /&gt;
./configure --with-wx-config=/path/to/wx-config&lt;br /&gt;
&lt;br /&gt;
To uninstall you can later run:&lt;br /&gt;
 make uninstall&lt;br /&gt;
&lt;br /&gt;
If you want to recompile everything, first run:&lt;br /&gt;
 make clean&lt;br /&gt;
 make distclean&lt;br /&gt;
 make clean-bin&lt;br /&gt;
 make clean-zipfiles&lt;br /&gt;
and then follow the above sequence for installing.&lt;br /&gt;
&lt;br /&gt;
By default, CodeBlocks will install to /usr/local.  If you want it in its own tree (so you can have multiple versions of CodeBlocks, each in its own subdirectory of /opt) replace the above ./configure command with:&lt;br /&gt;
 ./configure --prefix=/opt/codeblocks-svn&lt;br /&gt;
or similar.  Then you can later install a different build like:&lt;br /&gt;
 ./configure --prefix=/opt/codeblocks2-svn&lt;br /&gt;
followed by 'make &amp;amp;&amp;amp; make install' as usual.&lt;br /&gt;
&lt;br /&gt;
By default, CodeBlocks will not compile the contributed plugins from SVN.  If you want to compile / install them too, replace the above ./configure command with:&lt;br /&gt;
 ./configure --with-contrib-plugins=all&lt;br /&gt;
followed by 'make &amp;amp;&amp;amp; make install' as usual.&lt;br /&gt;
&lt;br /&gt;
To see a list of other options available for configuring the build of CodeBlocks do:&lt;br /&gt;
 ./configure --help&lt;br /&gt;
&lt;br /&gt;
To compile under gentoo, use&lt;br /&gt;
 ./configure --with-wx-config=wx-config-2.8&lt;br /&gt;
&lt;br /&gt;
====Resolving issues with Code::Blocks SVN====&lt;br /&gt;
&lt;br /&gt;
When running Code::Blocks after the installation it might happen, that the system complains:&lt;br /&gt;
 codeblocks: error while loading shared libraries: libcodeblocks.so.0: cannot open shared object file: No such file or directory&lt;br /&gt;
In that case make sure the library path where the Code::Blocks libraries where installed into is &amp;quot;known&amp;quot; to the system. For example: On Ubuntu using a default build process on a clean system will install the Code::Blocks executables to /use/local/bin and the libraries to /usr/local/lib. The latter is usually not known to a &amp;quot;clean&amp;quot; Ubuntu system. To add it to the search path for libraries do the following (as root / using sudo respectively):&lt;br /&gt;
Add the following line to the file /etc/ld.so.conf:&lt;br /&gt;
 /usr/local/lib&lt;br /&gt;
...and run:&lt;br /&gt;
 ldconfig&lt;br /&gt;
That's it - Code::Blocks should now work just fine as all libraries are being found.&lt;/div&gt;</summary>
		<author><name>Spacemonkey</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=Installing_Code::Blocks_from_source_on_Linux&amp;diff=6188</id>
		<title>Installing Code::Blocks from source on Linux</title>
		<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php?title=Installing_Code::Blocks_from_source_on_Linux&amp;diff=6188"/>
		<updated>2009-11-19T13:30:48Z</updated>

		<summary type="html">&lt;p&gt;Spacemonkey: /* Checking the presence of libwxGTK library */&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;
These are instructions on how to build Code::Blocks under Linux. These instructions should work for all Linux distros, as we'll be installing from sources.&lt;br /&gt;
&lt;br /&gt;
===Prerequisites===&lt;br /&gt;
&lt;br /&gt;
In order to successfully compile Code::Blocks, the [http://en.wikipedia.org/wiki/WxWidgets wxWidgets] User Interface library &amp;lt;u&amp;gt;must be installed&amp;lt;/u&amp;gt;. For most Linux users, this is maybe the only dependency not already installed. wxWidget can be used directly on top of the X server, in this case the variant of the wxWidget library is called wxX11. However this library [http://wiki.wxwidgets.org/WxWidgets_Compared_To_Other_Toolkits#Why_You_Shouldn.27t_Use_wxWidgets &amp;quot;is sub-par compared to other toolkits and unstable&amp;quot;]. Hence Code::Blocks uses wxGTK, the version of wxWidget based on GTK+. The exact requirement is libwxGTK-2.8.0 or later (2.8.3 is not recommanded because of some troubles). This creates an additional dependency on GTK+, consider the following:&lt;br /&gt;
&lt;br /&gt;
A possible implementation which does not exist: &lt;br /&gt;
&lt;br /&gt;
''Code::Blocks  -&amp;gt;  xwWidget (libwxX11)  -&amp;gt;  X''&lt;br /&gt;
&lt;br /&gt;
Current Code::Blocks implementation: &lt;br /&gt;
&lt;br /&gt;
''Code::Blocks  -&amp;gt;  '''xwWidget (&amp;gt; libwxGTK2.8)'''  -&amp;gt;  '''GTK+ (&amp;gt; libgtk-x11-2.0)'''  -&amp;gt;  X''&lt;br /&gt;
&lt;br /&gt;
This document helps you to install libwxGTK if necessary but does not cover the installation of GTK+. GTK+ is probably installed on your Linux anyway, so don't worry ;)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
''Note:'' All the instructions below, assume an existing directory named &amp;lt;tt&amp;gt;~/devel&amp;lt;/tt&amp;gt;. If you 'll be using a different one, adjust the path to match.&lt;br /&gt;
As a first step create this directory:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;mkdir ~/devel&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Checking the presence of GTK+ library ===&lt;br /&gt;
&lt;br /&gt;
Have a look in /usr/lib for something like &amp;quot;libgtk-x11-2.0.so&amp;quot; (Note the library must be 2.0 minimum). Alternatively, do a search with your package manager or go to your Linux distribution forum for help. If you don't want to loose time, you can even forget this check since there is a good probability that everything is already installed. If you use Gnome you can definitely forget this check and go to the next step, the library is already there!&lt;br /&gt;
&lt;br /&gt;
===wxGTK installation===&lt;br /&gt;
&lt;br /&gt;
==== Checking the presence of libwxGTK library ====&lt;br /&gt;
&lt;br /&gt;
In your package manager, look for 'libwxgtk' keyword and verify that all libwxgtk2.8 stuffs are there. Alternatively in command line execute:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;$ ls /usr/lib/libwx_gtk*&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and verify that you get some outputs. If you see nothing you must install the library as described below, and you can redo this check afterwards to verify that the installation worked correctly.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
''Note for Debian (and Ubuntu?) users:'' You can use &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;$ update-alternatives --config wx-config&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
to see which version of libwx is there or not and currently active. If you have different versions, select one superior to 2.8.0, if you have nothing go to next step.&lt;br /&gt;
&lt;br /&gt;
====Getting wxGTK sources====&lt;br /&gt;
&lt;br /&gt;
Visit the [http://www.wxwidgets.org wxWidgets web site]. Click the &amp;quot;Download&amp;quot; button at the top of the page. Under wxWidgets 2.8.7 downloads, select wxGTK. Save the file in &amp;lt;tt&amp;gt;~/devel&amp;lt;/tt&amp;gt;. After the download finishes, switch to &amp;lt;tt&amp;gt;~/devel&amp;lt;/tt&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;cd ~/devel&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, untar the wxGTK sources:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;tar zxf wxGTK-2.8.7.tar.gz&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Switch to the wxGTK directory&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;cd wxGTK-2.8.7&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====wxWidgets build====&lt;br /&gt;
&lt;br /&gt;
Here we will create a seperate build directory instead of building from the src directory, so that we can easily rebuild with different options (unicode / ansi, monolithic / many libs, etc).&lt;br /&gt;
&lt;br /&gt;
The documentation says the default is for gtk2 to use unicode and wx &amp;gt; 2.5 to build as a monolithic library.  This doesn't appear to be the case, so these flags are passed to configure.&lt;br /&gt;
&lt;br /&gt;
 mkdir build_gtk2_shared_monolithic_unicode&lt;br /&gt;
 cd build_gtk2_shared_monolithic_unicode&lt;br /&gt;
 ../configure --prefix=/opt/wx/2.8 \&lt;br /&gt;
        --enable-xrc \&lt;br /&gt;
        --enable-monolithic \&lt;br /&gt;
        --enable-unicode&lt;br /&gt;
 make&lt;br /&gt;
 su&lt;br /&gt;
 make install&lt;br /&gt;
 exit&lt;br /&gt;
&lt;br /&gt;
Add /opt/wx/2.8/bin to the PATH (if you're shell is bash then edit /etc/profile or ~/.bash_profile)&lt;br /&gt;
(On Suse 10.1 edit /etc/profile.local, it will only be available after a new login).  an example PATH&lt;br /&gt;
 export PATH=/usr/bin:/opt/wx/2.8/bin:$PATH&lt;br /&gt;
&lt;br /&gt;
'''Note:''' On Ubuntu Hoary it was necessary to check &amp;quot;Run command as login shell&amp;quot; &lt;br /&gt;
in the gnome-terminal profile-settings, otherwise the PATH changes are not available in a gnome-terminal window.&lt;br /&gt;
&lt;br /&gt;
add /opt/wx/2.8/lib to /etc/ld.so.conf (nano /etc/ld.so.conf)&lt;br /&gt;
then run:&lt;br /&gt;
 ldconfig&lt;br /&gt;
 source /etc/profile&lt;br /&gt;
&lt;br /&gt;
That's it.  Now the linker will look in /opt/wx/2.8/lib for wx libraries and you will have a monolithic shared library unicode build.&lt;br /&gt;
&lt;br /&gt;
To check that things are working, type:&lt;br /&gt;
 wx-config --prefix&lt;br /&gt;
which should give you /opt/wx/2.8&lt;br /&gt;
 wx-config --libs&lt;br /&gt;
which should have at least&lt;br /&gt;
 -L/opt/wx/2.8/lib -lwx_gtk2-2.8&lt;br /&gt;
but can contain other flags as well.&lt;br /&gt;
 which wx-config&lt;br /&gt;
should return /opt/wx/2.8/bin/wx-config&lt;br /&gt;
&lt;br /&gt;
===Code::Blocks installation===&lt;br /&gt;
&lt;br /&gt;
====Downloading Code::Blocks====&lt;br /&gt;
&lt;br /&gt;
You can get Code::Blocks source code in one way:&lt;br /&gt;
* Get the latest sources from the SVN repository.&lt;br /&gt;
This method is described below.&lt;br /&gt;
&lt;br /&gt;
=====Getting the latest sources from SVN=====&lt;br /&gt;
'''IMPORTANT NOTICE: The Sourceforge CVS is no longer used although it still exists'''&lt;br /&gt;
&lt;br /&gt;
Enter your development directory:&lt;br /&gt;
&amp;lt;pre&amp;gt;cd ~/devel&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then checkout the source using one of [https://www.codeblocks.org/downloads/7 these] methods.&lt;br /&gt;
&lt;br /&gt;
This will create the directory &amp;lt;tt&amp;gt;trunk&amp;lt;/tt&amp;gt;.&lt;br /&gt;
Change to the source code directory, by issuing the following command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;cd trunk&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Building Code::Blocks SVN====&lt;br /&gt;
If you are a Gentoo user, please see [[Compiling_Code::Blocks_in_Gentoo]].&lt;br /&gt;
&lt;br /&gt;
Before beginning, it is often a good idea to check you have recent versions of autoconf and automake - repositories versions are not always recent enough. (if you do not have automake, then you will get &amp;quot;cannot find aclocal&amp;quot; error).&lt;br /&gt;
&lt;br /&gt;
If you're compiling the svn trunk versions of CodeBlocks (or future versions) then the unix build has switched to autotools.  So first build wxWidgets as described above and then build CodeBlocks as follows:&lt;br /&gt;
&lt;br /&gt;
 ./bootstrap&lt;br /&gt;
&lt;br /&gt;
This sets up the configure script and its dependencies.  It only needs to be run once (after downloading the source from svn).  '''If you get errors like:'''&lt;br /&gt;
 aclocal:configure.in:61: warning: macro `AM_OPTIONS_WXCONFIG' not found in library&lt;br /&gt;
Then aclocal is having trouble finding the wxWidgets .m4 files.  You can do one of two things:&lt;br /&gt;
To just get bootstrap to find the path this time do:&lt;br /&gt;
&amp;lt;!-- *********** Bad syntax... removed 2006-08-28 by BentFX ****************************&lt;br /&gt;
 export ACLOCAL_FLAGS=&amp;quot;--acdir=`wx-config --prefix`/share/aclocal&amp;quot;&lt;br /&gt;
&lt;br /&gt;
: Note: The above command resulted in missing macros when running ./bootstrap for me. Setting an additional search path instead of overwriting like above worked for me. In case of missing macros try &lt;br /&gt;
***********************************************************************************--&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;export ACLOCAL_FLAGS=&amp;quot;-I `wx-config --prefix`/share/aclocal&amp;quot;&amp;lt;/pre&amp;gt; &amp;lt;!--[[User:Jabber|Jabber]] 06:24, 2 August 2006 (EDT)--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To change the aclocal search path more permanently do:&lt;br /&gt;
 echo `wx-config --prefix`/share/aclocal &amp;gt;&amp;gt; /usr/share/aclocal/dirlist&lt;br /&gt;
Then aclocal will also search somewhere like /opt/wx/2.6/share/aclocal&lt;br /&gt;
&lt;br /&gt;
'''Note for Ubuntu users:''' The above is not the correct way to fix the AM_* errors. Rather, you only need to install the package named &amp;quot;wx-common&amp;quot; (Universe repository).&lt;br /&gt;
&lt;br /&gt;
If you get something like&lt;br /&gt;
 The usual way to define `LIBTOOL' is to add `AC_PROG_LIBTOOL'&lt;br /&gt;
&lt;br /&gt;
it can be solved by something like: (adapt path, use `wx-config --prefix` is necessary)&lt;br /&gt;
&lt;br /&gt;
 ACLOCAL_FLAGS=&amp;quot;-I /usr/share/aclocal&amp;quot; ./bootstrap&lt;br /&gt;
&lt;br /&gt;
(*Note// '''If you run ./bootstrap and get errors like''':&lt;br /&gt;
 : bad interpreter: File not found&lt;br /&gt;
then there exists a problem with DOS line-endings. i had this error after i tried to build a  codeblocks from sources which were checked out with cvs on a windows machine. After i checked out a fresh copy of codeblocks from cvs under Ubuntu linux (see above topic: Downloading the latest source package fom SVN), all errors were gone. &lt;br /&gt;
//tiwag 051008*)&amp;lt;br&amp;gt;&lt;br /&gt;
Or, instead of downloading from SVN, you might consider using the little command line tool dos2unix, which normally comes with most distributions. //lizzarddude060103&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
If configure aborts with some unspecific error message(&amp;quot;.infig.status: error: cannot find input file: Makefile&amp;quot;), you might consider also running&lt;br /&gt;
 dos2unix bootstrap acinclude.m4 codeblocks.pc.in configure.in Makefile.am&lt;br /&gt;
before running bootstrap&lt;br /&gt;
&lt;br /&gt;
Once you've run the bootstrap script, installing is as simple as:&lt;br /&gt;
 ./configure&lt;br /&gt;
 make&lt;br /&gt;
 make install&lt;br /&gt;
&lt;br /&gt;
If you have multiple versions of wxWidgets installed or kept them inplace, you can use&lt;br /&gt;
./configure --with-wx-config=/path/to/wx-config&lt;br /&gt;
&lt;br /&gt;
To uninstall you can later run:&lt;br /&gt;
 make uninstall&lt;br /&gt;
&lt;br /&gt;
If you want to recompile everything, first run:&lt;br /&gt;
 make clean&lt;br /&gt;
 make distclean&lt;br /&gt;
 make clean-bin&lt;br /&gt;
 make clean-zipfiles&lt;br /&gt;
and then follow the above sequence for installing.&lt;br /&gt;
&lt;br /&gt;
By default, CodeBlocks will install to /usr/local.  If you want it in its own tree (so you can have multiple versions of CodeBlocks, each in its own subdirectory of /opt) replace the above ./configure command with:&lt;br /&gt;
 ./configure --prefix=/opt/codeblocks-svn&lt;br /&gt;
or similar.  Then you can later install a different build like:&lt;br /&gt;
 ./configure --prefix=/opt/codeblocks2-svn&lt;br /&gt;
followed by 'make &amp;amp;&amp;amp; make install' as usual.&lt;br /&gt;
&lt;br /&gt;
By default, CodeBlocks will not compile the contributed plugins from SVN.  If you want to compile / install them too, replace the above ./configure command with:&lt;br /&gt;
 ./configure --with-contrib-plugins=all&lt;br /&gt;
followed by 'make &amp;amp;&amp;amp; make install' as usual.&lt;br /&gt;
&lt;br /&gt;
To see a list of other options available for configuring the build of CodeBlocks do:&lt;br /&gt;
 ./configure --help&lt;br /&gt;
&lt;br /&gt;
To compile under gentoo, use&lt;br /&gt;
 ./configure --with-wx-config=wx-config-2.8&lt;br /&gt;
&lt;br /&gt;
====Resolving issues with Code::Blocks SVN====&lt;br /&gt;
&lt;br /&gt;
When running Code::Blocks after the installation it might happen, that the system complains:&lt;br /&gt;
 codeblocks: error while loading shared libraries: libcodeblocks.so.0: cannot open shared object file: No such file or directory&lt;br /&gt;
In that case make sure the library path where the Code::Blocks libraries where installed into is &amp;quot;known&amp;quot; to the system. For example: On Ubuntu using a default build process on a clean system will install the Code::Blocks executables to /use/local/bin and the libraries to /usr/local/lib. The latter is usually not known to a &amp;quot;clean&amp;quot; Ubuntu system. To add it to the search path for libraries do the following (as root / using sudo respectively):&lt;br /&gt;
Add the following line to the file /etc/ld.so.conf:&lt;br /&gt;
 /usr/local/lib&lt;br /&gt;
...and run:&lt;br /&gt;
 ldconfig&lt;br /&gt;
That's it - Code::Blocks should now work just fine as all libraries are being found.&lt;/div&gt;</summary>
		<author><name>Spacemonkey</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=Installing_Code::Blocks_from_source_on_Linux&amp;diff=6187</id>
		<title>Installing Code::Blocks from source on Linux</title>
		<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php?title=Installing_Code::Blocks_from_source_on_Linux&amp;diff=6187"/>
		<updated>2009-11-19T13:30:03Z</updated>

		<summary type="html">&lt;p&gt;Spacemonkey: &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;
These are instructions on how to build Code::Blocks under Linux. These instructions should work for all Linux distros, as we'll be installing from sources.&lt;br /&gt;
&lt;br /&gt;
===Prerequisites===&lt;br /&gt;
&lt;br /&gt;
In order to successfully compile Code::Blocks, the [http://en.wikipedia.org/wiki/WxWidgets wxWidgets] User Interface library &amp;lt;u&amp;gt;must be installed&amp;lt;/u&amp;gt;. For most Linux users, this is maybe the only dependency not already installed. wxWidget can be used directly on top of the X server, in this case the variant of the wxWidget library is called wxX11. However this library [http://wiki.wxwidgets.org/WxWidgets_Compared_To_Other_Toolkits#Why_You_Shouldn.27t_Use_wxWidgets &amp;quot;is sub-par compared to other toolkits and unstable&amp;quot;]. Hence Code::Blocks uses wxGTK, the version of wxWidget based on GTK+. The exact requirement is libwxGTK-2.8.0 or later (2.8.3 is not recommanded because of some troubles). This creates an additional dependency on GTK+, consider the following:&lt;br /&gt;
&lt;br /&gt;
A possible implementation which does not exist: &lt;br /&gt;
&lt;br /&gt;
''Code::Blocks  -&amp;gt;  xwWidget (libwxX11)  -&amp;gt;  X''&lt;br /&gt;
&lt;br /&gt;
Current Code::Blocks implementation: &lt;br /&gt;
&lt;br /&gt;
''Code::Blocks  -&amp;gt;  '''xwWidget (&amp;gt; libwxGTK2.8)'''  -&amp;gt;  '''GTK+ (&amp;gt; libgtk-x11-2.0)'''  -&amp;gt;  X''&lt;br /&gt;
&lt;br /&gt;
This document helps you to install libwxGTK if necessary but does not cover the installation of GTK+. GTK+ is probably installed on your Linux anyway, so don't worry ;)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
''Note:'' All the instructions below, assume an existing directory named &amp;lt;tt&amp;gt;~/devel&amp;lt;/tt&amp;gt;. If you 'll be using a different one, adjust the path to match.&lt;br /&gt;
As a first step create this directory:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;mkdir ~/devel&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Checking the presence of GTK+ library ===&lt;br /&gt;
&lt;br /&gt;
Have a look in /usr/lib for something like &amp;quot;libgtk-x11-2.0.so&amp;quot; (Note the library must be 2.0 minimum). Alternatively, do a search with your package manager or go to your Linux distribution forum for help. If you don't want to loose time, you can even forget this check since there is a good probability that everything is already installed. If you use Gnome you can definitely forget this check and go to the next step, the library is already there!&lt;br /&gt;
&lt;br /&gt;
===wxGTK installation===&lt;br /&gt;
&lt;br /&gt;
==== Checking the presence of libwxGTK library ====&lt;br /&gt;
&lt;br /&gt;
In your package manager, look for 'libwxgtk' keyword and verify that all libwxgtk2.8 stuffs are there. Alternatively in command line execute:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;$ ls /usr/lib/libwx_gtk*&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and verify that you get some outputs. If you see nothing you must install the library as described below, and you can redo this check afterwards to verify that the installation worked correctly.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
''Note for Debian (and Ubuntu?) users:'' You can use &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;$ update-alternatives --config wx-config&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
to see which version of libwx is there or not and currently active. If you have different versions, select one superior to 2.8.0&lt;br /&gt;
&lt;br /&gt;
====Getting wxGTK sources====&lt;br /&gt;
&lt;br /&gt;
Visit the [http://www.wxwidgets.org wxWidgets web site]. Click the &amp;quot;Download&amp;quot; button at the top of the page. Under wxWidgets 2.8.7 downloads, select wxGTK. Save the file in &amp;lt;tt&amp;gt;~/devel&amp;lt;/tt&amp;gt;. After the download finishes, switch to &amp;lt;tt&amp;gt;~/devel&amp;lt;/tt&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;cd ~/devel&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, untar the wxGTK sources:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;tar zxf wxGTK-2.8.7.tar.gz&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Switch to the wxGTK directory&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;cd wxGTK-2.8.7&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====wxWidgets build====&lt;br /&gt;
&lt;br /&gt;
Here we will create a seperate build directory instead of building from the src directory, so that we can easily rebuild with different options (unicode / ansi, monolithic / many libs, etc).&lt;br /&gt;
&lt;br /&gt;
The documentation says the default is for gtk2 to use unicode and wx &amp;gt; 2.5 to build as a monolithic library.  This doesn't appear to be the case, so these flags are passed to configure.&lt;br /&gt;
&lt;br /&gt;
 mkdir build_gtk2_shared_monolithic_unicode&lt;br /&gt;
 cd build_gtk2_shared_monolithic_unicode&lt;br /&gt;
 ../configure --prefix=/opt/wx/2.8 \&lt;br /&gt;
        --enable-xrc \&lt;br /&gt;
        --enable-monolithic \&lt;br /&gt;
        --enable-unicode&lt;br /&gt;
 make&lt;br /&gt;
 su&lt;br /&gt;
 make install&lt;br /&gt;
 exit&lt;br /&gt;
&lt;br /&gt;
Add /opt/wx/2.8/bin to the PATH (if you're shell is bash then edit /etc/profile or ~/.bash_profile)&lt;br /&gt;
(On Suse 10.1 edit /etc/profile.local, it will only be available after a new login).  an example PATH&lt;br /&gt;
 export PATH=/usr/bin:/opt/wx/2.8/bin:$PATH&lt;br /&gt;
&lt;br /&gt;
'''Note:''' On Ubuntu Hoary it was necessary to check &amp;quot;Run command as login shell&amp;quot; &lt;br /&gt;
in the gnome-terminal profile-settings, otherwise the PATH changes are not available in a gnome-terminal window.&lt;br /&gt;
&lt;br /&gt;
add /opt/wx/2.8/lib to /etc/ld.so.conf (nano /etc/ld.so.conf)&lt;br /&gt;
then run:&lt;br /&gt;
 ldconfig&lt;br /&gt;
 source /etc/profile&lt;br /&gt;
&lt;br /&gt;
That's it.  Now the linker will look in /opt/wx/2.8/lib for wx libraries and you will have a monolithic shared library unicode build.&lt;br /&gt;
&lt;br /&gt;
To check that things are working, type:&lt;br /&gt;
 wx-config --prefix&lt;br /&gt;
which should give you /opt/wx/2.8&lt;br /&gt;
 wx-config --libs&lt;br /&gt;
which should have at least&lt;br /&gt;
 -L/opt/wx/2.8/lib -lwx_gtk2-2.8&lt;br /&gt;
but can contain other flags as well.&lt;br /&gt;
 which wx-config&lt;br /&gt;
should return /opt/wx/2.8/bin/wx-config&lt;br /&gt;
&lt;br /&gt;
===Code::Blocks installation===&lt;br /&gt;
&lt;br /&gt;
====Downloading Code::Blocks====&lt;br /&gt;
&lt;br /&gt;
You can get Code::Blocks source code in one way:&lt;br /&gt;
* Get the latest sources from the SVN repository.&lt;br /&gt;
This method is described below.&lt;br /&gt;
&lt;br /&gt;
=====Getting the latest sources from SVN=====&lt;br /&gt;
'''IMPORTANT NOTICE: The Sourceforge CVS is no longer used although it still exists'''&lt;br /&gt;
&lt;br /&gt;
Enter your development directory:&lt;br /&gt;
&amp;lt;pre&amp;gt;cd ~/devel&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then checkout the source using one of [https://www.codeblocks.org/downloads/7 these] methods.&lt;br /&gt;
&lt;br /&gt;
This will create the directory &amp;lt;tt&amp;gt;trunk&amp;lt;/tt&amp;gt;.&lt;br /&gt;
Change to the source code directory, by issuing the following command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;cd trunk&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Building Code::Blocks SVN====&lt;br /&gt;
If you are a Gentoo user, please see [[Compiling_Code::Blocks_in_Gentoo]].&lt;br /&gt;
&lt;br /&gt;
Before beginning, it is often a good idea to check you have recent versions of autoconf and automake - repositories versions are not always recent enough. (if you do not have automake, then you will get &amp;quot;cannot find aclocal&amp;quot; error).&lt;br /&gt;
&lt;br /&gt;
If you're compiling the svn trunk versions of CodeBlocks (or future versions) then the unix build has switched to autotools.  So first build wxWidgets as described above and then build CodeBlocks as follows:&lt;br /&gt;
&lt;br /&gt;
 ./bootstrap&lt;br /&gt;
&lt;br /&gt;
This sets up the configure script and its dependencies.  It only needs to be run once (after downloading the source from svn).  '''If you get errors like:'''&lt;br /&gt;
 aclocal:configure.in:61: warning: macro `AM_OPTIONS_WXCONFIG' not found in library&lt;br /&gt;
Then aclocal is having trouble finding the wxWidgets .m4 files.  You can do one of two things:&lt;br /&gt;
To just get bootstrap to find the path this time do:&lt;br /&gt;
&amp;lt;!-- *********** Bad syntax... removed 2006-08-28 by BentFX ****************************&lt;br /&gt;
 export ACLOCAL_FLAGS=&amp;quot;--acdir=`wx-config --prefix`/share/aclocal&amp;quot;&lt;br /&gt;
&lt;br /&gt;
: Note: The above command resulted in missing macros when running ./bootstrap for me. Setting an additional search path instead of overwriting like above worked for me. In case of missing macros try &lt;br /&gt;
***********************************************************************************--&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;export ACLOCAL_FLAGS=&amp;quot;-I `wx-config --prefix`/share/aclocal&amp;quot;&amp;lt;/pre&amp;gt; &amp;lt;!--[[User:Jabber|Jabber]] 06:24, 2 August 2006 (EDT)--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To change the aclocal search path more permanently do:&lt;br /&gt;
 echo `wx-config --prefix`/share/aclocal &amp;gt;&amp;gt; /usr/share/aclocal/dirlist&lt;br /&gt;
Then aclocal will also search somewhere like /opt/wx/2.6/share/aclocal&lt;br /&gt;
&lt;br /&gt;
'''Note for Ubuntu users:''' The above is not the correct way to fix the AM_* errors. Rather, you only need to install the package named &amp;quot;wx-common&amp;quot; (Universe repository).&lt;br /&gt;
&lt;br /&gt;
If you get something like&lt;br /&gt;
 The usual way to define `LIBTOOL' is to add `AC_PROG_LIBTOOL'&lt;br /&gt;
&lt;br /&gt;
it can be solved by something like: (adapt path, use `wx-config --prefix` is necessary)&lt;br /&gt;
&lt;br /&gt;
 ACLOCAL_FLAGS=&amp;quot;-I /usr/share/aclocal&amp;quot; ./bootstrap&lt;br /&gt;
&lt;br /&gt;
(*Note// '''If you run ./bootstrap and get errors like''':&lt;br /&gt;
 : bad interpreter: File not found&lt;br /&gt;
then there exists a problem with DOS line-endings. i had this error after i tried to build a  codeblocks from sources which were checked out with cvs on a windows machine. After i checked out a fresh copy of codeblocks from cvs under Ubuntu linux (see above topic: Downloading the latest source package fom SVN), all errors were gone. &lt;br /&gt;
//tiwag 051008*)&amp;lt;br&amp;gt;&lt;br /&gt;
Or, instead of downloading from SVN, you might consider using the little command line tool dos2unix, which normally comes with most distributions. //lizzarddude060103&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
If configure aborts with some unspecific error message(&amp;quot;.infig.status: error: cannot find input file: Makefile&amp;quot;), you might consider also running&lt;br /&gt;
 dos2unix bootstrap acinclude.m4 codeblocks.pc.in configure.in Makefile.am&lt;br /&gt;
before running bootstrap&lt;br /&gt;
&lt;br /&gt;
Once you've run the bootstrap script, installing is as simple as:&lt;br /&gt;
 ./configure&lt;br /&gt;
 make&lt;br /&gt;
 make install&lt;br /&gt;
&lt;br /&gt;
If you have multiple versions of wxWidgets installed or kept them inplace, you can use&lt;br /&gt;
./configure --with-wx-config=/path/to/wx-config&lt;br /&gt;
&lt;br /&gt;
To uninstall you can later run:&lt;br /&gt;
 make uninstall&lt;br /&gt;
&lt;br /&gt;
If you want to recompile everything, first run:&lt;br /&gt;
 make clean&lt;br /&gt;
 make distclean&lt;br /&gt;
 make clean-bin&lt;br /&gt;
 make clean-zipfiles&lt;br /&gt;
and then follow the above sequence for installing.&lt;br /&gt;
&lt;br /&gt;
By default, CodeBlocks will install to /usr/local.  If you want it in its own tree (so you can have multiple versions of CodeBlocks, each in its own subdirectory of /opt) replace the above ./configure command with:&lt;br /&gt;
 ./configure --prefix=/opt/codeblocks-svn&lt;br /&gt;
or similar.  Then you can later install a different build like:&lt;br /&gt;
 ./configure --prefix=/opt/codeblocks2-svn&lt;br /&gt;
followed by 'make &amp;amp;&amp;amp; make install' as usual.&lt;br /&gt;
&lt;br /&gt;
By default, CodeBlocks will not compile the contributed plugins from SVN.  If you want to compile / install them too, replace the above ./configure command with:&lt;br /&gt;
 ./configure --with-contrib-plugins=all&lt;br /&gt;
followed by 'make &amp;amp;&amp;amp; make install' as usual.&lt;br /&gt;
&lt;br /&gt;
To see a list of other options available for configuring the build of CodeBlocks do:&lt;br /&gt;
 ./configure --help&lt;br /&gt;
&lt;br /&gt;
To compile under gentoo, use&lt;br /&gt;
 ./configure --with-wx-config=wx-config-2.8&lt;br /&gt;
&lt;br /&gt;
====Resolving issues with Code::Blocks SVN====&lt;br /&gt;
&lt;br /&gt;
When running Code::Blocks after the installation it might happen, that the system complains:&lt;br /&gt;
 codeblocks: error while loading shared libraries: libcodeblocks.so.0: cannot open shared object file: No such file or directory&lt;br /&gt;
In that case make sure the library path where the Code::Blocks libraries where installed into is &amp;quot;known&amp;quot; to the system. For example: On Ubuntu using a default build process on a clean system will install the Code::Blocks executables to /use/local/bin and the libraries to /usr/local/lib. The latter is usually not known to a &amp;quot;clean&amp;quot; Ubuntu system. To add it to the search path for libraries do the following (as root / using sudo respectively):&lt;br /&gt;
Add the following line to the file /etc/ld.so.conf:&lt;br /&gt;
 /usr/local/lib&lt;br /&gt;
...and run:&lt;br /&gt;
 ldconfig&lt;br /&gt;
That's it - Code::Blocks should now work just fine as all libraries are being found.&lt;/div&gt;</summary>
		<author><name>Spacemonkey</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=Installing_Code::Blocks_from_source_on_Linux&amp;diff=6186</id>
		<title>Installing Code::Blocks from source on Linux</title>
		<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php?title=Installing_Code::Blocks_from_source_on_Linux&amp;diff=6186"/>
		<updated>2009-11-19T13:29:15Z</updated>

		<summary type="html">&lt;p&gt;Spacemonkey: &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;
These are instructions on how to build Code::Blocks under Linux. These instructions should work for all Linux distros, as we'll be installing from sources.&lt;br /&gt;
&lt;br /&gt;
===Prerequisites===&lt;br /&gt;
&lt;br /&gt;
In order to successfully compile Code::Blocks, the [http://en.wikipedia.org/wiki/WxWidgets wxWidgets] User Interface library &amp;lt;u&amp;gt;must be installed&amp;lt;/u&amp;gt;. For most Linux users, this is maybe the only dependency not already installed. wxWidget can be used directly on top of the X server, in this case the variant of the wxWidget library is called wxX11. However this library [http://wiki.wxwidgets.org/WxWidgets_Compared_To_Other_Toolkits#Why_You_Shouldn.27t_Use_wxWidgets &amp;quot;is sub-par compared to other toolkits and unstable&amp;quot;]. Hence Code::Blocks uses wxGTK, the version of wxWidget based on GTK+. The exact requirement is libwxGTK-2.8.0 or later (2.8.3 is not recommanded because of some troubles). This creates an additional dependency on GTK+, consider the following:&lt;br /&gt;
&lt;br /&gt;
A possible implementation which does not exist: &lt;br /&gt;
&lt;br /&gt;
''Code::Blocks  -&amp;gt;  xwWidget (libwxX11)  -&amp;gt;  X''&lt;br /&gt;
&lt;br /&gt;
Current Code::Blocks implementation: &lt;br /&gt;
&lt;br /&gt;
''Code::Blocks  -&amp;gt;  '''xwWidget (&amp;gt; libwxGTK2.8)'''  -&amp;gt;  '''GTK+ (&amp;gt; libgtk-x11-2.0)'''  -&amp;gt;  X''&lt;br /&gt;
&lt;br /&gt;
This document helps you to install libwxGTK if necessary but does not cover the installation of GTK+. GTK+ is probably installed on your Linux anyway, so don't worry ;)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
''Note:'' All the instructions below, assume an existing directory named &amp;lt;tt&amp;gt;~/devel&amp;lt;/tt&amp;gt;. If you 'll be using a different one, adjust the path to match.&lt;br /&gt;
As a first step create this directory:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;mkdir ~/devel&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Checking the presence of GTK+ library ===&lt;br /&gt;
&lt;br /&gt;
Have a look in /usr/lib for something like &amp;quot;libgtk-x11-2.0.so&amp;quot; (Note the library must be 2.0 minimum). Alternatively, do a search with your package manager or go to your Linux distribution forum for help. If you don't want to loose time, you can even forget this check since there is a good probability that everything is already installed. If you use Gnome you can definitely forget this check and go to the next step, the library is already there!&lt;br /&gt;
&lt;br /&gt;
===wxGTK installation===&lt;br /&gt;
&lt;br /&gt;
==== Checking the presence of libwxGTK library ====&lt;br /&gt;
&lt;br /&gt;
In your package manager, look for 'libwxgtk' keyword and verify that all libwxgtk2.8 stuffs are there. Alternatively in command line execute:&lt;br /&gt;
&lt;br /&gt;
$ ls /usr/lib/libwx_gtk*&lt;br /&gt;
&lt;br /&gt;
and verify that you get some outputs. If you see nothing you must install the library as described below, and you can redo this check afterwards to verify that the installation worked correctly.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
''Note for Debian (and Ubuntu?) users:'' You can use &lt;br /&gt;
&lt;br /&gt;
$ update-alternatives --config wx-config &lt;br /&gt;
&lt;br /&gt;
to see which version of libwx is there or not and currently active. If you have different versions, select one superior to 2.8.0&lt;br /&gt;
&lt;br /&gt;
====Getting wxGTK sources====&lt;br /&gt;
&lt;br /&gt;
Visit the [http://www.wxwidgets.org wxWidgets web site]. Click the &amp;quot;Download&amp;quot; button at the top of the page. Under wxWidgets 2.8.7 downloads, select wxGTK. Save the file in &amp;lt;tt&amp;gt;~/devel&amp;lt;/tt&amp;gt;. After the download finishes, switch to &amp;lt;tt&amp;gt;~/devel&amp;lt;/tt&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;cd ~/devel&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, untar the wxGTK sources:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;tar zxf wxGTK-2.8.7.tar.gz&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Switch to the wxGTK directory&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;cd wxGTK-2.8.7&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====wxWidgets build====&lt;br /&gt;
&lt;br /&gt;
Here we will create a seperate build directory instead of building from the src directory, so that we can easily rebuild with different options (unicode / ansi, monolithic / many libs, etc).&lt;br /&gt;
&lt;br /&gt;
The documentation says the default is for gtk2 to use unicode and wx &amp;gt; 2.5 to build as a monolithic library.  This doesn't appear to be the case, so these flags are passed to configure.&lt;br /&gt;
&lt;br /&gt;
 mkdir build_gtk2_shared_monolithic_unicode&lt;br /&gt;
 cd build_gtk2_shared_monolithic_unicode&lt;br /&gt;
 ../configure --prefix=/opt/wx/2.8 \&lt;br /&gt;
        --enable-xrc \&lt;br /&gt;
        --enable-monolithic \&lt;br /&gt;
        --enable-unicode&lt;br /&gt;
 make&lt;br /&gt;
 su&lt;br /&gt;
 make install&lt;br /&gt;
 exit&lt;br /&gt;
&lt;br /&gt;
Add /opt/wx/2.8/bin to the PATH (if you're shell is bash then edit /etc/profile or ~/.bash_profile)&lt;br /&gt;
(On Suse 10.1 edit /etc/profile.local, it will only be available after a new login).  an example PATH&lt;br /&gt;
 export PATH=/usr/bin:/opt/wx/2.8/bin:$PATH&lt;br /&gt;
&lt;br /&gt;
'''Note:''' On Ubuntu Hoary it was necessary to check &amp;quot;Run command as login shell&amp;quot; &lt;br /&gt;
in the gnome-terminal profile-settings, otherwise the PATH changes are not available in a gnome-terminal window.&lt;br /&gt;
&lt;br /&gt;
add /opt/wx/2.8/lib to /etc/ld.so.conf (nano /etc/ld.so.conf)&lt;br /&gt;
then run:&lt;br /&gt;
 ldconfig&lt;br /&gt;
 source /etc/profile&lt;br /&gt;
&lt;br /&gt;
That's it.  Now the linker will look in /opt/wx/2.8/lib for wx libraries and you will have a monolithic shared library unicode build.&lt;br /&gt;
&lt;br /&gt;
To check that things are working, type:&lt;br /&gt;
 wx-config --prefix&lt;br /&gt;
which should give you /opt/wx/2.8&lt;br /&gt;
 wx-config --libs&lt;br /&gt;
which should have at least&lt;br /&gt;
 -L/opt/wx/2.8/lib -lwx_gtk2-2.8&lt;br /&gt;
but can contain other flags as well.&lt;br /&gt;
 which wx-config&lt;br /&gt;
should return /opt/wx/2.8/bin/wx-config&lt;br /&gt;
&lt;br /&gt;
===Code::Blocks installation===&lt;br /&gt;
&lt;br /&gt;
====Downloading Code::Blocks====&lt;br /&gt;
&lt;br /&gt;
You can get Code::Blocks source code in one way:&lt;br /&gt;
* Get the latest sources from the SVN repository.&lt;br /&gt;
This method is described below.&lt;br /&gt;
&lt;br /&gt;
=====Getting the latest sources from SVN=====&lt;br /&gt;
'''IMPORTANT NOTICE: The Sourceforge CVS is no longer used although it still exists'''&lt;br /&gt;
&lt;br /&gt;
Enter your development directory:&lt;br /&gt;
&amp;lt;pre&amp;gt;cd ~/devel&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then checkout the source using one of [https://www.codeblocks.org/downloads/7 these] methods.&lt;br /&gt;
&lt;br /&gt;
This will create the directory &amp;lt;tt&amp;gt;trunk&amp;lt;/tt&amp;gt;.&lt;br /&gt;
Change to the source code directory, by issuing the following command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;cd trunk&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Building Code::Blocks SVN====&lt;br /&gt;
If you are a Gentoo user, please see [[Compiling_Code::Blocks_in_Gentoo]].&lt;br /&gt;
&lt;br /&gt;
Before beginning, it is often a good idea to check you have recent versions of autoconf and automake - repositories versions are not always recent enough. (if you do not have automake, then you will get &amp;quot;cannot find aclocal&amp;quot; error).&lt;br /&gt;
&lt;br /&gt;
If you're compiling the svn trunk versions of CodeBlocks (or future versions) then the unix build has switched to autotools.  So first build wxWidgets as described above and then build CodeBlocks as follows:&lt;br /&gt;
&lt;br /&gt;
 ./bootstrap&lt;br /&gt;
&lt;br /&gt;
This sets up the configure script and its dependencies.  It only needs to be run once (after downloading the source from svn).  '''If you get errors like:'''&lt;br /&gt;
 aclocal:configure.in:61: warning: macro `AM_OPTIONS_WXCONFIG' not found in library&lt;br /&gt;
Then aclocal is having trouble finding the wxWidgets .m4 files.  You can do one of two things:&lt;br /&gt;
To just get bootstrap to find the path this time do:&lt;br /&gt;
&amp;lt;!-- *********** Bad syntax... removed 2006-08-28 by BentFX ****************************&lt;br /&gt;
 export ACLOCAL_FLAGS=&amp;quot;--acdir=`wx-config --prefix`/share/aclocal&amp;quot;&lt;br /&gt;
&lt;br /&gt;
: Note: The above command resulted in missing macros when running ./bootstrap for me. Setting an additional search path instead of overwriting like above worked for me. In case of missing macros try &lt;br /&gt;
***********************************************************************************--&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;export ACLOCAL_FLAGS=&amp;quot;-I `wx-config --prefix`/share/aclocal&amp;quot;&amp;lt;/pre&amp;gt; &amp;lt;!--[[User:Jabber|Jabber]] 06:24, 2 August 2006 (EDT)--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To change the aclocal search path more permanently do:&lt;br /&gt;
 echo `wx-config --prefix`/share/aclocal &amp;gt;&amp;gt; /usr/share/aclocal/dirlist&lt;br /&gt;
Then aclocal will also search somewhere like /opt/wx/2.6/share/aclocal&lt;br /&gt;
&lt;br /&gt;
'''Note for Ubuntu users:''' The above is not the correct way to fix the AM_* errors. Rather, you only need to install the package named &amp;quot;wx-common&amp;quot; (Universe repository).&lt;br /&gt;
&lt;br /&gt;
If you get something like&lt;br /&gt;
 The usual way to define `LIBTOOL' is to add `AC_PROG_LIBTOOL'&lt;br /&gt;
&lt;br /&gt;
it can be solved by something like: (adapt path, use `wx-config --prefix` is necessary)&lt;br /&gt;
&lt;br /&gt;
 ACLOCAL_FLAGS=&amp;quot;-I /usr/share/aclocal&amp;quot; ./bootstrap&lt;br /&gt;
&lt;br /&gt;
(*Note// '''If you run ./bootstrap and get errors like''':&lt;br /&gt;
 : bad interpreter: File not found&lt;br /&gt;
then there exists a problem with DOS line-endings. i had this error after i tried to build a  codeblocks from sources which were checked out with cvs on a windows machine. After i checked out a fresh copy of codeblocks from cvs under Ubuntu linux (see above topic: Downloading the latest source package fom SVN), all errors were gone. &lt;br /&gt;
//tiwag 051008*)&amp;lt;br&amp;gt;&lt;br /&gt;
Or, instead of downloading from SVN, you might consider using the little command line tool dos2unix, which normally comes with most distributions. //lizzarddude060103&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
If configure aborts with some unspecific error message(&amp;quot;.infig.status: error: cannot find input file: Makefile&amp;quot;), you might consider also running&lt;br /&gt;
 dos2unix bootstrap acinclude.m4 codeblocks.pc.in configure.in Makefile.am&lt;br /&gt;
before running bootstrap&lt;br /&gt;
&lt;br /&gt;
Once you've run the bootstrap script, installing is as simple as:&lt;br /&gt;
 ./configure&lt;br /&gt;
 make&lt;br /&gt;
 make install&lt;br /&gt;
&lt;br /&gt;
If you have multiple versions of wxWidgets installed or kept them inplace, you can use&lt;br /&gt;
./configure --with-wx-config=/path/to/wx-config&lt;br /&gt;
&lt;br /&gt;
To uninstall you can later run:&lt;br /&gt;
 make uninstall&lt;br /&gt;
&lt;br /&gt;
If you want to recompile everything, first run:&lt;br /&gt;
 make clean&lt;br /&gt;
 make distclean&lt;br /&gt;
 make clean-bin&lt;br /&gt;
 make clean-zipfiles&lt;br /&gt;
and then follow the above sequence for installing.&lt;br /&gt;
&lt;br /&gt;
By default, CodeBlocks will install to /usr/local.  If you want it in its own tree (so you can have multiple versions of CodeBlocks, each in its own subdirectory of /opt) replace the above ./configure command with:&lt;br /&gt;
 ./configure --prefix=/opt/codeblocks-svn&lt;br /&gt;
or similar.  Then you can later install a different build like:&lt;br /&gt;
 ./configure --prefix=/opt/codeblocks2-svn&lt;br /&gt;
followed by 'make &amp;amp;&amp;amp; make install' as usual.&lt;br /&gt;
&lt;br /&gt;
By default, CodeBlocks will not compile the contributed plugins from SVN.  If you want to compile / install them too, replace the above ./configure command with:&lt;br /&gt;
 ./configure --with-contrib-plugins=all&lt;br /&gt;
followed by 'make &amp;amp;&amp;amp; make install' as usual.&lt;br /&gt;
&lt;br /&gt;
To see a list of other options available for configuring the build of CodeBlocks do:&lt;br /&gt;
 ./configure --help&lt;br /&gt;
&lt;br /&gt;
To compile under gentoo, use&lt;br /&gt;
 ./configure --with-wx-config=wx-config-2.8&lt;br /&gt;
&lt;br /&gt;
====Resolving issues with Code::Blocks SVN====&lt;br /&gt;
&lt;br /&gt;
When running Code::Blocks after the installation it might happen, that the system complains:&lt;br /&gt;
 codeblocks: error while loading shared libraries: libcodeblocks.so.0: cannot open shared object file: No such file or directory&lt;br /&gt;
In that case make sure the library path where the Code::Blocks libraries where installed into is &amp;quot;known&amp;quot; to the system. For example: On Ubuntu using a default build process on a clean system will install the Code::Blocks executables to /use/local/bin and the libraries to /usr/local/lib. The latter is usually not known to a &amp;quot;clean&amp;quot; Ubuntu system. To add it to the search path for libraries do the following (as root / using sudo respectively):&lt;br /&gt;
Add the following line to the file /etc/ld.so.conf:&lt;br /&gt;
 /usr/local/lib&lt;br /&gt;
...and run:&lt;br /&gt;
 ldconfig&lt;br /&gt;
That's it - Code::Blocks should now work just fine as all libraries are being found.&lt;/div&gt;</summary>
		<author><name>Spacemonkey</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=Installing_Code::Blocks_from_source_on_Linux&amp;diff=6185</id>
		<title>Installing Code::Blocks from source on Linux</title>
		<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php?title=Installing_Code::Blocks_from_source_on_Linux&amp;diff=6185"/>
		<updated>2009-11-19T13:28:14Z</updated>

		<summary type="html">&lt;p&gt;Spacemonkey: /* Checking the presence of libwxGTK library */&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;
These are instructions on how to build Code::Blocks under Linux. These instructions should work for all Linux distros, as we'll be installing from sources.&lt;br /&gt;
&lt;br /&gt;
===Prerequisites===&lt;br /&gt;
&lt;br /&gt;
In order to successfully compile Code::Blocks, the [http://en.wikipedia.org/wiki/WxWidgets wxWidgets] User Interface library &amp;lt;u&amp;gt;must be installed&amp;lt;/u&amp;gt;. For most Linux users, this is maybe the only dependency not already installed. wxWidget can be used directly on top of the X server, in this case the variant of the wxWidget library is called wxX11. However this library [http://wiki.wxwidgets.org/WxWidgets_Compared_To_Other_Toolkits#Why_You_Shouldn.27t_Use_wxWidgets &amp;quot;is sub-par compared to other toolkits and unstable&amp;quot;]. Hence Code::Blocks uses wxGTK, the version of wxWidget based on GTK+. The exact requirement is libwxGTK-2.8.0 or later (2.8.3 is not recommanded because of some troubles). This creates an additional dependency on GTK+, consider the following:&lt;br /&gt;
&lt;br /&gt;
A possible implementation which does not exist: &lt;br /&gt;
&lt;br /&gt;
''Code::Blocks  -&amp;gt;  xwWidget (libwxX11)  -&amp;gt;  X''&lt;br /&gt;
&lt;br /&gt;
Current Code::Blocks implementation: &lt;br /&gt;
&lt;br /&gt;
''Code::Blocks  -&amp;gt;  '''xwWidget (&amp;gt; libwxGTK2.8)'''  -&amp;gt;  '''GTK+ (&amp;gt; libgtk-x11-2.0)'''  -&amp;gt;  X''&lt;br /&gt;
&lt;br /&gt;
This document helps you to install libwxGTK if necessary but does not cover the installation of GTK+. GTK+ is probably installed on your Linux anyway, so don't worry ;)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
''Note:'' All the instructions below, assume an existing directory named &amp;lt;tt&amp;gt;~/devel&amp;lt;/tt&amp;gt;. If you 'll be using a different one, adjust the path to match.&lt;br /&gt;
As a first step create this directory:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;mkdir ~/devel&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Checking the presence of GTK+ library ===&lt;br /&gt;
&lt;br /&gt;
Have a look in /usr/lib for something like &amp;quot;libgtk-x11-2.0.so&amp;quot; (Note the library must be 2.0 minimum). Alternatively, do a search with your package manager or go to your Linux distribution forum for help. If you don't want to loose time, you can even forget this check since there is a good probability that everything is already installed. If you use Gnome you can definitely forget this check and go to the next step, the library is already there!&lt;br /&gt;
&lt;br /&gt;
===wxGTK installation===&lt;br /&gt;
&lt;br /&gt;
==== Checking the presence of libwxGTK library ====&lt;br /&gt;
&lt;br /&gt;
In your package manager, look for 'libwxgtk' keyword and verify that all libwxgtk2.8 stuffs are there. Alternatively in command line execute:&lt;br /&gt;
&lt;br /&gt;
$ ls /usr/lib/libwx_gtk*&lt;br /&gt;
&lt;br /&gt;
and verify that you get some outputs. If you see nothing you must install the library as described below, and you can redo this check afterwards to verify that the installation worked correctly.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
''Note for Debian (and Ubuntu?) users:'' You can use &lt;br /&gt;
&lt;br /&gt;
$ update-alternatives --config wx-config &lt;br /&gt;
&lt;br /&gt;
to see which version of libwx is there or not and currently active. If you have different versions, select one superior to 2.8.0&lt;br /&gt;
&lt;br /&gt;
====Getting wxGTK====&lt;br /&gt;
&lt;br /&gt;
Visit the [http://www.wxwidgets.org wxWidgets web site]. Click the &amp;quot;Download&amp;quot; button at the top of the page. Under wxWidgets 2.8.7 downloads, select wxGTK. Save the file in &amp;lt;tt&amp;gt;~/devel&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
====Uncompressing the wxGTK sources====&lt;br /&gt;
&lt;br /&gt;
After the download finishes, switch to &amp;lt;tt&amp;gt;~/devel&amp;lt;/tt&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;cd ~/devel&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, untar the wxGTK sources:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;tar zxf wxGTK-2.8.7.tar.gz&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Switch to the wxGTK directory&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;cd wxGTK-2.8.7&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====wxWidgets build====&lt;br /&gt;
&lt;br /&gt;
Here we will create a seperate build directory instead of building from the src directory, so that we can easily rebuild with different options (unicode / ansi, monolithic / many libs, etc).&lt;br /&gt;
&lt;br /&gt;
The documentation says the default is for gtk2 to use unicode and wx &amp;gt; 2.5 to build as a monolithic library.  This doesn't appear to be the case, so these flags are passed to configure.&lt;br /&gt;
&lt;br /&gt;
 mkdir build_gtk2_shared_monolithic_unicode&lt;br /&gt;
 cd build_gtk2_shared_monolithic_unicode&lt;br /&gt;
 ../configure --prefix=/opt/wx/2.8 \&lt;br /&gt;
        --enable-xrc \&lt;br /&gt;
        --enable-monolithic \&lt;br /&gt;
        --enable-unicode&lt;br /&gt;
 make&lt;br /&gt;
 su&lt;br /&gt;
 make install&lt;br /&gt;
 exit&lt;br /&gt;
&lt;br /&gt;
Add /opt/wx/2.8/bin to the PATH (if you're shell is bash then edit /etc/profile or ~/.bash_profile)&lt;br /&gt;
(On Suse 10.1 edit /etc/profile.local, it will only be available after a new login).  an example PATH&lt;br /&gt;
 export PATH=/usr/bin:/opt/wx/2.8/bin:$PATH&lt;br /&gt;
&lt;br /&gt;
'''Note:''' On Ubuntu Hoary it was necessary to check &amp;quot;Run command as login shell&amp;quot; &lt;br /&gt;
in the gnome-terminal profile-settings, otherwise the PATH changes are not available in a gnome-terminal window.&lt;br /&gt;
&lt;br /&gt;
add /opt/wx/2.8/lib to /etc/ld.so.conf (nano /etc/ld.so.conf)&lt;br /&gt;
then run:&lt;br /&gt;
 ldconfig&lt;br /&gt;
 source /etc/profile&lt;br /&gt;
&lt;br /&gt;
That's it.  Now the linker will look in /opt/wx/2.8/lib for wx libraries and you will have a monolithic shared library unicode build.&lt;br /&gt;
&lt;br /&gt;
To check that things are working, type:&lt;br /&gt;
 wx-config --prefix&lt;br /&gt;
which should give you /opt/wx/2.8&lt;br /&gt;
 wx-config --libs&lt;br /&gt;
which should have at least&lt;br /&gt;
 -L/opt/wx/2.8/lib -lwx_gtk2-2.8&lt;br /&gt;
but can contain other flags as well.&lt;br /&gt;
 which wx-config&lt;br /&gt;
should return /opt/wx/2.8/bin/wx-config&lt;br /&gt;
&lt;br /&gt;
===Code::Blocks installation===&lt;br /&gt;
&lt;br /&gt;
====Downloading Code::Blocks====&lt;br /&gt;
&lt;br /&gt;
You can get Code::Blocks source code in one way:&lt;br /&gt;
* Get the latest sources from the SVN repository.&lt;br /&gt;
This method is described below.&lt;br /&gt;
&lt;br /&gt;
=====Getting the latest sources from SVN=====&lt;br /&gt;
'''IMPORTANT NOTICE: The Sourceforge CVS is no longer used although it still exists'''&lt;br /&gt;
&lt;br /&gt;
Enter your development directory:&lt;br /&gt;
&amp;lt;pre&amp;gt;cd ~/devel&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then checkout the source using one of [https://www.codeblocks.org/downloads/7 these] methods.&lt;br /&gt;
&lt;br /&gt;
This will create the directory &amp;lt;tt&amp;gt;trunk&amp;lt;/tt&amp;gt;.&lt;br /&gt;
Change to the source code directory, by issuing the following command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;cd trunk&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Building Code::Blocks SVN====&lt;br /&gt;
If you are a Gentoo user, please see [[Compiling_Code::Blocks_in_Gentoo]].&lt;br /&gt;
&lt;br /&gt;
Before beginning, it is often a good idea to check you have recent versions of autoconf and automake - repositories versions are not always recent enough. (if you do not have automake, then you will get &amp;quot;cannot find aclocal&amp;quot; error).&lt;br /&gt;
&lt;br /&gt;
If you're compiling the svn trunk versions of CodeBlocks (or future versions) then the unix build has switched to autotools.  So first build wxWidgets as described above and then build CodeBlocks as follows:&lt;br /&gt;
&lt;br /&gt;
 ./bootstrap&lt;br /&gt;
&lt;br /&gt;
This sets up the configure script and its dependencies.  It only needs to be run once (after downloading the source from svn).  '''If you get errors like:'''&lt;br /&gt;
 aclocal:configure.in:61: warning: macro `AM_OPTIONS_WXCONFIG' not found in library&lt;br /&gt;
Then aclocal is having trouble finding the wxWidgets .m4 files.  You can do one of two things:&lt;br /&gt;
To just get bootstrap to find the path this time do:&lt;br /&gt;
&amp;lt;!-- *********** Bad syntax... removed 2006-08-28 by BentFX ****************************&lt;br /&gt;
 export ACLOCAL_FLAGS=&amp;quot;--acdir=`wx-config --prefix`/share/aclocal&amp;quot;&lt;br /&gt;
&lt;br /&gt;
: Note: The above command resulted in missing macros when running ./bootstrap for me. Setting an additional search path instead of overwriting like above worked for me. In case of missing macros try &lt;br /&gt;
***********************************************************************************--&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;export ACLOCAL_FLAGS=&amp;quot;-I `wx-config --prefix`/share/aclocal&amp;quot;&amp;lt;/pre&amp;gt; &amp;lt;!--[[User:Jabber|Jabber]] 06:24, 2 August 2006 (EDT)--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To change the aclocal search path more permanently do:&lt;br /&gt;
 echo `wx-config --prefix`/share/aclocal &amp;gt;&amp;gt; /usr/share/aclocal/dirlist&lt;br /&gt;
Then aclocal will also search somewhere like /opt/wx/2.6/share/aclocal&lt;br /&gt;
&lt;br /&gt;
'''Note for Ubuntu users:''' The above is not the correct way to fix the AM_* errors. Rather, you only need to install the package named &amp;quot;wx-common&amp;quot; (Universe repository).&lt;br /&gt;
&lt;br /&gt;
If you get something like&lt;br /&gt;
 The usual way to define `LIBTOOL' is to add `AC_PROG_LIBTOOL'&lt;br /&gt;
&lt;br /&gt;
it can be solved by something like: (adapt path, use `wx-config --prefix` is necessary)&lt;br /&gt;
&lt;br /&gt;
 ACLOCAL_FLAGS=&amp;quot;-I /usr/share/aclocal&amp;quot; ./bootstrap&lt;br /&gt;
&lt;br /&gt;
(*Note// '''If you run ./bootstrap and get errors like''':&lt;br /&gt;
 : bad interpreter: File not found&lt;br /&gt;
then there exists a problem with DOS line-endings. i had this error after i tried to build a  codeblocks from sources which were checked out with cvs on a windows machine. After i checked out a fresh copy of codeblocks from cvs under Ubuntu linux (see above topic: Downloading the latest source package fom SVN), all errors were gone. &lt;br /&gt;
//tiwag 051008*)&amp;lt;br&amp;gt;&lt;br /&gt;
Or, instead of downloading from SVN, you might consider using the little command line tool dos2unix, which normally comes with most distributions. //lizzarddude060103&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
If configure aborts with some unspecific error message(&amp;quot;.infig.status: error: cannot find input file: Makefile&amp;quot;), you might consider also running&lt;br /&gt;
 dos2unix bootstrap acinclude.m4 codeblocks.pc.in configure.in Makefile.am&lt;br /&gt;
before running bootstrap&lt;br /&gt;
&lt;br /&gt;
Once you've run the bootstrap script, installing is as simple as:&lt;br /&gt;
 ./configure&lt;br /&gt;
 make&lt;br /&gt;
 make install&lt;br /&gt;
&lt;br /&gt;
If you have multiple versions of wxWidgets installed or kept them inplace, you can use&lt;br /&gt;
./configure --with-wx-config=/path/to/wx-config&lt;br /&gt;
&lt;br /&gt;
To uninstall you can later run:&lt;br /&gt;
 make uninstall&lt;br /&gt;
&lt;br /&gt;
If you want to recompile everything, first run:&lt;br /&gt;
 make clean&lt;br /&gt;
 make distclean&lt;br /&gt;
 make clean-bin&lt;br /&gt;
 make clean-zipfiles&lt;br /&gt;
and then follow the above sequence for installing.&lt;br /&gt;
&lt;br /&gt;
By default, CodeBlocks will install to /usr/local.  If you want it in its own tree (so you can have multiple versions of CodeBlocks, each in its own subdirectory of /opt) replace the above ./configure command with:&lt;br /&gt;
 ./configure --prefix=/opt/codeblocks-svn&lt;br /&gt;
or similar.  Then you can later install a different build like:&lt;br /&gt;
 ./configure --prefix=/opt/codeblocks2-svn&lt;br /&gt;
followed by 'make &amp;amp;&amp;amp; make install' as usual.&lt;br /&gt;
&lt;br /&gt;
By default, CodeBlocks will not compile the contributed plugins from SVN.  If you want to compile / install them too, replace the above ./configure command with:&lt;br /&gt;
 ./configure --with-contrib-plugins=all&lt;br /&gt;
followed by 'make &amp;amp;&amp;amp; make install' as usual.&lt;br /&gt;
&lt;br /&gt;
To see a list of other options available for configuring the build of CodeBlocks do:&lt;br /&gt;
 ./configure --help&lt;br /&gt;
&lt;br /&gt;
To compile under gentoo, use&lt;br /&gt;
 ./configure --with-wx-config=wx-config-2.8&lt;br /&gt;
&lt;br /&gt;
====Resolving issues with Code::Blocks SVN====&lt;br /&gt;
&lt;br /&gt;
When running Code::Blocks after the installation it might happen, that the system complains:&lt;br /&gt;
 codeblocks: error while loading shared libraries: libcodeblocks.so.0: cannot open shared object file: No such file or directory&lt;br /&gt;
In that case make sure the library path where the Code::Blocks libraries where installed into is &amp;quot;known&amp;quot; to the system. For example: On Ubuntu using a default build process on a clean system will install the Code::Blocks executables to /use/local/bin and the libraries to /usr/local/lib. The latter is usually not known to a &amp;quot;clean&amp;quot; Ubuntu system. To add it to the search path for libraries do the following (as root / using sudo respectively):&lt;br /&gt;
Add the following line to the file /etc/ld.so.conf:&lt;br /&gt;
 /usr/local/lib&lt;br /&gt;
...and run:&lt;br /&gt;
 ldconfig&lt;br /&gt;
That's it - Code::Blocks should now work just fine as all libraries are being found.&lt;/div&gt;</summary>
		<author><name>Spacemonkey</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=Installing_Code::Blocks_from_source_on_Linux&amp;diff=6184</id>
		<title>Installing Code::Blocks from source on Linux</title>
		<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php?title=Installing_Code::Blocks_from_source_on_Linux&amp;diff=6184"/>
		<updated>2009-11-19T13:27:58Z</updated>

		<summary type="html">&lt;p&gt;Spacemonkey: /* Checking the presence of libwxGTK library */&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;
These are instructions on how to build Code::Blocks under Linux. These instructions should work for all Linux distros, as we'll be installing from sources.&lt;br /&gt;
&lt;br /&gt;
===Prerequisites===&lt;br /&gt;
&lt;br /&gt;
In order to successfully compile Code::Blocks, the [http://en.wikipedia.org/wiki/WxWidgets wxWidgets] User Interface library &amp;lt;u&amp;gt;must be installed&amp;lt;/u&amp;gt;. For most Linux users, this is maybe the only dependency not already installed. wxWidget can be used directly on top of the X server, in this case the variant of the wxWidget library is called wxX11. However this library [http://wiki.wxwidgets.org/WxWidgets_Compared_To_Other_Toolkits#Why_You_Shouldn.27t_Use_wxWidgets &amp;quot;is sub-par compared to other toolkits and unstable&amp;quot;]. Hence Code::Blocks uses wxGTK, the version of wxWidget based on GTK+. The exact requirement is libwxGTK-2.8.0 or later (2.8.3 is not recommanded because of some troubles). This creates an additional dependency on GTK+, consider the following:&lt;br /&gt;
&lt;br /&gt;
A possible implementation which does not exist: &lt;br /&gt;
&lt;br /&gt;
''Code::Blocks  -&amp;gt;  xwWidget (libwxX11)  -&amp;gt;  X''&lt;br /&gt;
&lt;br /&gt;
Current Code::Blocks implementation: &lt;br /&gt;
&lt;br /&gt;
''Code::Blocks  -&amp;gt;  '''xwWidget (&amp;gt; libwxGTK2.8)'''  -&amp;gt;  '''GTK+ (&amp;gt; libgtk-x11-2.0)'''  -&amp;gt;  X''&lt;br /&gt;
&lt;br /&gt;
This document helps you to install libwxGTK if necessary but does not cover the installation of GTK+. GTK+ is probably installed on your Linux anyway, so don't worry ;)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
''Note:'' All the instructions below, assume an existing directory named &amp;lt;tt&amp;gt;~/devel&amp;lt;/tt&amp;gt;. If you 'll be using a different one, adjust the path to match.&lt;br /&gt;
As a first step create this directory:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;mkdir ~/devel&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Checking the presence of GTK+ library ===&lt;br /&gt;
&lt;br /&gt;
Have a look in /usr/lib for something like &amp;quot;libgtk-x11-2.0.so&amp;quot; (Note the library must be 2.0 minimum). Alternatively, do a search with your package manager or go to your Linux distribution forum for help. If you don't want to loose time, you can even forget this check since there is a good probability that everything is already installed. If you use Gnome you can definitely forget this check and go to the next step, the library is already there!&lt;br /&gt;
&lt;br /&gt;
===wxGTK installation===&lt;br /&gt;
&lt;br /&gt;
==== Checking the presence of libwxGTK library ====&lt;br /&gt;
&lt;br /&gt;
In your package manager, look for 'libwxgtk' keyword and verify that all libwxgtk2.8 stuffs are there. Alternatively in command line execute:&lt;br /&gt;
&lt;br /&gt;
$ ls /usr/lib/libwx_gtk*&lt;br /&gt;
&lt;br /&gt;
and verify that you get some outputs. If you see nothing you must install the library as described below, and you can redo this check afterwards to verify that the installation worked correctly.&lt;br /&gt;
&lt;br /&gt;
''Note for Debian (and Ubuntu?) users:'' You can use &lt;br /&gt;
&lt;br /&gt;
$ update-alternatives --config wx-config &lt;br /&gt;
&lt;br /&gt;
to see which version of libwx is there or not and currently active. If you have different versions, select one superior to 2.8.0&lt;br /&gt;
&lt;br /&gt;
====Getting wxGTK====&lt;br /&gt;
&lt;br /&gt;
Visit the [http://www.wxwidgets.org wxWidgets web site]. Click the &amp;quot;Download&amp;quot; button at the top of the page. Under wxWidgets 2.8.7 downloads, select wxGTK. Save the file in &amp;lt;tt&amp;gt;~/devel&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
====Uncompressing the wxGTK sources====&lt;br /&gt;
&lt;br /&gt;
After the download finishes, switch to &amp;lt;tt&amp;gt;~/devel&amp;lt;/tt&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;cd ~/devel&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, untar the wxGTK sources:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;tar zxf wxGTK-2.8.7.tar.gz&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Switch to the wxGTK directory&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;cd wxGTK-2.8.7&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====wxWidgets build====&lt;br /&gt;
&lt;br /&gt;
Here we will create a seperate build directory instead of building from the src directory, so that we can easily rebuild with different options (unicode / ansi, monolithic / many libs, etc).&lt;br /&gt;
&lt;br /&gt;
The documentation says the default is for gtk2 to use unicode and wx &amp;gt; 2.5 to build as a monolithic library.  This doesn't appear to be the case, so these flags are passed to configure.&lt;br /&gt;
&lt;br /&gt;
 mkdir build_gtk2_shared_monolithic_unicode&lt;br /&gt;
 cd build_gtk2_shared_monolithic_unicode&lt;br /&gt;
 ../configure --prefix=/opt/wx/2.8 \&lt;br /&gt;
        --enable-xrc \&lt;br /&gt;
        --enable-monolithic \&lt;br /&gt;
        --enable-unicode&lt;br /&gt;
 make&lt;br /&gt;
 su&lt;br /&gt;
 make install&lt;br /&gt;
 exit&lt;br /&gt;
&lt;br /&gt;
Add /opt/wx/2.8/bin to the PATH (if you're shell is bash then edit /etc/profile or ~/.bash_profile)&lt;br /&gt;
(On Suse 10.1 edit /etc/profile.local, it will only be available after a new login).  an example PATH&lt;br /&gt;
 export PATH=/usr/bin:/opt/wx/2.8/bin:$PATH&lt;br /&gt;
&lt;br /&gt;
'''Note:''' On Ubuntu Hoary it was necessary to check &amp;quot;Run command as login shell&amp;quot; &lt;br /&gt;
in the gnome-terminal profile-settings, otherwise the PATH changes are not available in a gnome-terminal window.&lt;br /&gt;
&lt;br /&gt;
add /opt/wx/2.8/lib to /etc/ld.so.conf (nano /etc/ld.so.conf)&lt;br /&gt;
then run:&lt;br /&gt;
 ldconfig&lt;br /&gt;
 source /etc/profile&lt;br /&gt;
&lt;br /&gt;
That's it.  Now the linker will look in /opt/wx/2.8/lib for wx libraries and you will have a monolithic shared library unicode build.&lt;br /&gt;
&lt;br /&gt;
To check that things are working, type:&lt;br /&gt;
 wx-config --prefix&lt;br /&gt;
which should give you /opt/wx/2.8&lt;br /&gt;
 wx-config --libs&lt;br /&gt;
which should have at least&lt;br /&gt;
 -L/opt/wx/2.8/lib -lwx_gtk2-2.8&lt;br /&gt;
but can contain other flags as well.&lt;br /&gt;
 which wx-config&lt;br /&gt;
should return /opt/wx/2.8/bin/wx-config&lt;br /&gt;
&lt;br /&gt;
===Code::Blocks installation===&lt;br /&gt;
&lt;br /&gt;
====Downloading Code::Blocks====&lt;br /&gt;
&lt;br /&gt;
You can get Code::Blocks source code in one way:&lt;br /&gt;
* Get the latest sources from the SVN repository.&lt;br /&gt;
This method is described below.&lt;br /&gt;
&lt;br /&gt;
=====Getting the latest sources from SVN=====&lt;br /&gt;
'''IMPORTANT NOTICE: The Sourceforge CVS is no longer used although it still exists'''&lt;br /&gt;
&lt;br /&gt;
Enter your development directory:&lt;br /&gt;
&amp;lt;pre&amp;gt;cd ~/devel&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then checkout the source using one of [https://www.codeblocks.org/downloads/7 these] methods.&lt;br /&gt;
&lt;br /&gt;
This will create the directory &amp;lt;tt&amp;gt;trunk&amp;lt;/tt&amp;gt;.&lt;br /&gt;
Change to the source code directory, by issuing the following command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;cd trunk&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Building Code::Blocks SVN====&lt;br /&gt;
If you are a Gentoo user, please see [[Compiling_Code::Blocks_in_Gentoo]].&lt;br /&gt;
&lt;br /&gt;
Before beginning, it is often a good idea to check you have recent versions of autoconf and automake - repositories versions are not always recent enough. (if you do not have automake, then you will get &amp;quot;cannot find aclocal&amp;quot; error).&lt;br /&gt;
&lt;br /&gt;
If you're compiling the svn trunk versions of CodeBlocks (or future versions) then the unix build has switched to autotools.  So first build wxWidgets as described above and then build CodeBlocks as follows:&lt;br /&gt;
&lt;br /&gt;
 ./bootstrap&lt;br /&gt;
&lt;br /&gt;
This sets up the configure script and its dependencies.  It only needs to be run once (after downloading the source from svn).  '''If you get errors like:'''&lt;br /&gt;
 aclocal:configure.in:61: warning: macro `AM_OPTIONS_WXCONFIG' not found in library&lt;br /&gt;
Then aclocal is having trouble finding the wxWidgets .m4 files.  You can do one of two things:&lt;br /&gt;
To just get bootstrap to find the path this time do:&lt;br /&gt;
&amp;lt;!-- *********** Bad syntax... removed 2006-08-28 by BentFX ****************************&lt;br /&gt;
 export ACLOCAL_FLAGS=&amp;quot;--acdir=`wx-config --prefix`/share/aclocal&amp;quot;&lt;br /&gt;
&lt;br /&gt;
: Note: The above command resulted in missing macros when running ./bootstrap for me. Setting an additional search path instead of overwriting like above worked for me. In case of missing macros try &lt;br /&gt;
***********************************************************************************--&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;export ACLOCAL_FLAGS=&amp;quot;-I `wx-config --prefix`/share/aclocal&amp;quot;&amp;lt;/pre&amp;gt; &amp;lt;!--[[User:Jabber|Jabber]] 06:24, 2 August 2006 (EDT)--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To change the aclocal search path more permanently do:&lt;br /&gt;
 echo `wx-config --prefix`/share/aclocal &amp;gt;&amp;gt; /usr/share/aclocal/dirlist&lt;br /&gt;
Then aclocal will also search somewhere like /opt/wx/2.6/share/aclocal&lt;br /&gt;
&lt;br /&gt;
'''Note for Ubuntu users:''' The above is not the correct way to fix the AM_* errors. Rather, you only need to install the package named &amp;quot;wx-common&amp;quot; (Universe repository).&lt;br /&gt;
&lt;br /&gt;
If you get something like&lt;br /&gt;
 The usual way to define `LIBTOOL' is to add `AC_PROG_LIBTOOL'&lt;br /&gt;
&lt;br /&gt;
it can be solved by something like: (adapt path, use `wx-config --prefix` is necessary)&lt;br /&gt;
&lt;br /&gt;
 ACLOCAL_FLAGS=&amp;quot;-I /usr/share/aclocal&amp;quot; ./bootstrap&lt;br /&gt;
&lt;br /&gt;
(*Note// '''If you run ./bootstrap and get errors like''':&lt;br /&gt;
 : bad interpreter: File not found&lt;br /&gt;
then there exists a problem with DOS line-endings. i had this error after i tried to build a  codeblocks from sources which were checked out with cvs on a windows machine. After i checked out a fresh copy of codeblocks from cvs under Ubuntu linux (see above topic: Downloading the latest source package fom SVN), all errors were gone. &lt;br /&gt;
//tiwag 051008*)&amp;lt;br&amp;gt;&lt;br /&gt;
Or, instead of downloading from SVN, you might consider using the little command line tool dos2unix, which normally comes with most distributions. //lizzarddude060103&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
If configure aborts with some unspecific error message(&amp;quot;.infig.status: error: cannot find input file: Makefile&amp;quot;), you might consider also running&lt;br /&gt;
 dos2unix bootstrap acinclude.m4 codeblocks.pc.in configure.in Makefile.am&lt;br /&gt;
before running bootstrap&lt;br /&gt;
&lt;br /&gt;
Once you've run the bootstrap script, installing is as simple as:&lt;br /&gt;
 ./configure&lt;br /&gt;
 make&lt;br /&gt;
 make install&lt;br /&gt;
&lt;br /&gt;
If you have multiple versions of wxWidgets installed or kept them inplace, you can use&lt;br /&gt;
./configure --with-wx-config=/path/to/wx-config&lt;br /&gt;
&lt;br /&gt;
To uninstall you can later run:&lt;br /&gt;
 make uninstall&lt;br /&gt;
&lt;br /&gt;
If you want to recompile everything, first run:&lt;br /&gt;
 make clean&lt;br /&gt;
 make distclean&lt;br /&gt;
 make clean-bin&lt;br /&gt;
 make clean-zipfiles&lt;br /&gt;
and then follow the above sequence for installing.&lt;br /&gt;
&lt;br /&gt;
By default, CodeBlocks will install to /usr/local.  If you want it in its own tree (so you can have multiple versions of CodeBlocks, each in its own subdirectory of /opt) replace the above ./configure command with:&lt;br /&gt;
 ./configure --prefix=/opt/codeblocks-svn&lt;br /&gt;
or similar.  Then you can later install a different build like:&lt;br /&gt;
 ./configure --prefix=/opt/codeblocks2-svn&lt;br /&gt;
followed by 'make &amp;amp;&amp;amp; make install' as usual.&lt;br /&gt;
&lt;br /&gt;
By default, CodeBlocks will not compile the contributed plugins from SVN.  If you want to compile / install them too, replace the above ./configure command with:&lt;br /&gt;
 ./configure --with-contrib-plugins=all&lt;br /&gt;
followed by 'make &amp;amp;&amp;amp; make install' as usual.&lt;br /&gt;
&lt;br /&gt;
To see a list of other options available for configuring the build of CodeBlocks do:&lt;br /&gt;
 ./configure --help&lt;br /&gt;
&lt;br /&gt;
To compile under gentoo, use&lt;br /&gt;
 ./configure --with-wx-config=wx-config-2.8&lt;br /&gt;
&lt;br /&gt;
====Resolving issues with Code::Blocks SVN====&lt;br /&gt;
&lt;br /&gt;
When running Code::Blocks after the installation it might happen, that the system complains:&lt;br /&gt;
 codeblocks: error while loading shared libraries: libcodeblocks.so.0: cannot open shared object file: No such file or directory&lt;br /&gt;
In that case make sure the library path where the Code::Blocks libraries where installed into is &amp;quot;known&amp;quot; to the system. For example: On Ubuntu using a default build process on a clean system will install the Code::Blocks executables to /use/local/bin and the libraries to /usr/local/lib. The latter is usually not known to a &amp;quot;clean&amp;quot; Ubuntu system. To add it to the search path for libraries do the following (as root / using sudo respectively):&lt;br /&gt;
Add the following line to the file /etc/ld.so.conf:&lt;br /&gt;
 /usr/local/lib&lt;br /&gt;
...and run:&lt;br /&gt;
 ldconfig&lt;br /&gt;
That's it - Code::Blocks should now work just fine as all libraries are being found.&lt;/div&gt;</summary>
		<author><name>Spacemonkey</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=Installing_Code::Blocks_from_source_on_Linux&amp;diff=6183</id>
		<title>Installing Code::Blocks from source on Linux</title>
		<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php?title=Installing_Code::Blocks_from_source_on_Linux&amp;diff=6183"/>
		<updated>2009-11-19T13:27:30Z</updated>

		<summary type="html">&lt;p&gt;Spacemonkey: /* Checking the presence of libwxGTK library */&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;
These are instructions on how to build Code::Blocks under Linux. These instructions should work for all Linux distros, as we'll be installing from sources.&lt;br /&gt;
&lt;br /&gt;
===Prerequisites===&lt;br /&gt;
&lt;br /&gt;
In order to successfully compile Code::Blocks, the [http://en.wikipedia.org/wiki/WxWidgets wxWidgets] User Interface library &amp;lt;u&amp;gt;must be installed&amp;lt;/u&amp;gt;. For most Linux users, this is maybe the only dependency not already installed. wxWidget can be used directly on top of the X server, in this case the variant of the wxWidget library is called wxX11. However this library [http://wiki.wxwidgets.org/WxWidgets_Compared_To_Other_Toolkits#Why_You_Shouldn.27t_Use_wxWidgets &amp;quot;is sub-par compared to other toolkits and unstable&amp;quot;]. Hence Code::Blocks uses wxGTK, the version of wxWidget based on GTK+. The exact requirement is libwxGTK-2.8.0 or later (2.8.3 is not recommanded because of some troubles). This creates an additional dependency on GTK+, consider the following:&lt;br /&gt;
&lt;br /&gt;
A possible implementation which does not exist: &lt;br /&gt;
&lt;br /&gt;
''Code::Blocks  -&amp;gt;  xwWidget (libwxX11)  -&amp;gt;  X''&lt;br /&gt;
&lt;br /&gt;
Current Code::Blocks implementation: &lt;br /&gt;
&lt;br /&gt;
''Code::Blocks  -&amp;gt;  '''xwWidget (&amp;gt; libwxGTK2.8)'''  -&amp;gt;  '''GTK+ (&amp;gt; libgtk-x11-2.0)'''  -&amp;gt;  X''&lt;br /&gt;
&lt;br /&gt;
This document helps you to install libwxGTK if necessary but does not cover the installation of GTK+. GTK+ is probably installed on your Linux anyway, so don't worry ;)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
''Note:'' All the instructions below, assume an existing directory named &amp;lt;tt&amp;gt;~/devel&amp;lt;/tt&amp;gt;. If you 'll be using a different one, adjust the path to match.&lt;br /&gt;
As a first step create this directory:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;mkdir ~/devel&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Checking the presence of GTK+ library ===&lt;br /&gt;
&lt;br /&gt;
Have a look in /usr/lib for something like &amp;quot;libgtk-x11-2.0.so&amp;quot; (Note the library must be 2.0 minimum). Alternatively, do a search with your package manager or go to your Linux distribution forum for help. If you don't want to loose time, you can even forget this check since there is a good probability that everything is already installed. If you use Gnome you can definitely forget this check and go to the next step, the library is already there!&lt;br /&gt;
&lt;br /&gt;
===wxGTK installation===&lt;br /&gt;
&lt;br /&gt;
==== Checking the presence of libwxGTK library ====&lt;br /&gt;
&lt;br /&gt;
In your package manager, look for 'libwxgtk' keyword and verify that all libwxgtk2.8 stuffs are there. Alternatively in command line execute:&lt;br /&gt;
&lt;br /&gt;
$ ls /usr/lib/libwx_gtk*&lt;br /&gt;
&lt;br /&gt;
and verify that you get some outputs. If you see nothing you must install the library as described below, and you can redo this check afterwards to verify that the installation worked correctly.&lt;br /&gt;
&lt;br /&gt;
''Note for Debian (and Ubuntu?) users:'' You can use &lt;br /&gt;
$ update-alternatives --config wx-config &lt;br /&gt;
&lt;br /&gt;
to see which version of libwx is there or not and currently active. If you have different versions, select one superior to 2.8.0&lt;br /&gt;
&lt;br /&gt;
====Getting wxGTK====&lt;br /&gt;
&lt;br /&gt;
Visit the [http://www.wxwidgets.org wxWidgets web site]. Click the &amp;quot;Download&amp;quot; button at the top of the page. Under wxWidgets 2.8.7 downloads, select wxGTK. Save the file in &amp;lt;tt&amp;gt;~/devel&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
====Uncompressing the wxGTK sources====&lt;br /&gt;
&lt;br /&gt;
After the download finishes, switch to &amp;lt;tt&amp;gt;~/devel&amp;lt;/tt&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;cd ~/devel&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, untar the wxGTK sources:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;tar zxf wxGTK-2.8.7.tar.gz&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Switch to the wxGTK directory&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;cd wxGTK-2.8.7&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====wxWidgets build====&lt;br /&gt;
&lt;br /&gt;
Here we will create a seperate build directory instead of building from the src directory, so that we can easily rebuild with different options (unicode / ansi, monolithic / many libs, etc).&lt;br /&gt;
&lt;br /&gt;
The documentation says the default is for gtk2 to use unicode and wx &amp;gt; 2.5 to build as a monolithic library.  This doesn't appear to be the case, so these flags are passed to configure.&lt;br /&gt;
&lt;br /&gt;
 mkdir build_gtk2_shared_monolithic_unicode&lt;br /&gt;
 cd build_gtk2_shared_monolithic_unicode&lt;br /&gt;
 ../configure --prefix=/opt/wx/2.8 \&lt;br /&gt;
        --enable-xrc \&lt;br /&gt;
        --enable-monolithic \&lt;br /&gt;
        --enable-unicode&lt;br /&gt;
 make&lt;br /&gt;
 su&lt;br /&gt;
 make install&lt;br /&gt;
 exit&lt;br /&gt;
&lt;br /&gt;
Add /opt/wx/2.8/bin to the PATH (if you're shell is bash then edit /etc/profile or ~/.bash_profile)&lt;br /&gt;
(On Suse 10.1 edit /etc/profile.local, it will only be available after a new login).  an example PATH&lt;br /&gt;
 export PATH=/usr/bin:/opt/wx/2.8/bin:$PATH&lt;br /&gt;
&lt;br /&gt;
'''Note:''' On Ubuntu Hoary it was necessary to check &amp;quot;Run command as login shell&amp;quot; &lt;br /&gt;
in the gnome-terminal profile-settings, otherwise the PATH changes are not available in a gnome-terminal window.&lt;br /&gt;
&lt;br /&gt;
add /opt/wx/2.8/lib to /etc/ld.so.conf (nano /etc/ld.so.conf)&lt;br /&gt;
then run:&lt;br /&gt;
 ldconfig&lt;br /&gt;
 source /etc/profile&lt;br /&gt;
&lt;br /&gt;
That's it.  Now the linker will look in /opt/wx/2.8/lib for wx libraries and you will have a monolithic shared library unicode build.&lt;br /&gt;
&lt;br /&gt;
To check that things are working, type:&lt;br /&gt;
 wx-config --prefix&lt;br /&gt;
which should give you /opt/wx/2.8&lt;br /&gt;
 wx-config --libs&lt;br /&gt;
which should have at least&lt;br /&gt;
 -L/opt/wx/2.8/lib -lwx_gtk2-2.8&lt;br /&gt;
but can contain other flags as well.&lt;br /&gt;
 which wx-config&lt;br /&gt;
should return /opt/wx/2.8/bin/wx-config&lt;br /&gt;
&lt;br /&gt;
===Code::Blocks installation===&lt;br /&gt;
&lt;br /&gt;
====Downloading Code::Blocks====&lt;br /&gt;
&lt;br /&gt;
You can get Code::Blocks source code in one way:&lt;br /&gt;
* Get the latest sources from the SVN repository.&lt;br /&gt;
This method is described below.&lt;br /&gt;
&lt;br /&gt;
=====Getting the latest sources from SVN=====&lt;br /&gt;
'''IMPORTANT NOTICE: The Sourceforge CVS is no longer used although it still exists'''&lt;br /&gt;
&lt;br /&gt;
Enter your development directory:&lt;br /&gt;
&amp;lt;pre&amp;gt;cd ~/devel&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then checkout the source using one of [https://www.codeblocks.org/downloads/7 these] methods.&lt;br /&gt;
&lt;br /&gt;
This will create the directory &amp;lt;tt&amp;gt;trunk&amp;lt;/tt&amp;gt;.&lt;br /&gt;
Change to the source code directory, by issuing the following command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;cd trunk&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Building Code::Blocks SVN====&lt;br /&gt;
If you are a Gentoo user, please see [[Compiling_Code::Blocks_in_Gentoo]].&lt;br /&gt;
&lt;br /&gt;
Before beginning, it is often a good idea to check you have recent versions of autoconf and automake - repositories versions are not always recent enough. (if you do not have automake, then you will get &amp;quot;cannot find aclocal&amp;quot; error).&lt;br /&gt;
&lt;br /&gt;
If you're compiling the svn trunk versions of CodeBlocks (or future versions) then the unix build has switched to autotools.  So first build wxWidgets as described above and then build CodeBlocks as follows:&lt;br /&gt;
&lt;br /&gt;
 ./bootstrap&lt;br /&gt;
&lt;br /&gt;
This sets up the configure script and its dependencies.  It only needs to be run once (after downloading the source from svn).  '''If you get errors like:'''&lt;br /&gt;
 aclocal:configure.in:61: warning: macro `AM_OPTIONS_WXCONFIG' not found in library&lt;br /&gt;
Then aclocal is having trouble finding the wxWidgets .m4 files.  You can do one of two things:&lt;br /&gt;
To just get bootstrap to find the path this time do:&lt;br /&gt;
&amp;lt;!-- *********** Bad syntax... removed 2006-08-28 by BentFX ****************************&lt;br /&gt;
 export ACLOCAL_FLAGS=&amp;quot;--acdir=`wx-config --prefix`/share/aclocal&amp;quot;&lt;br /&gt;
&lt;br /&gt;
: Note: The above command resulted in missing macros when running ./bootstrap for me. Setting an additional search path instead of overwriting like above worked for me. In case of missing macros try &lt;br /&gt;
***********************************************************************************--&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;export ACLOCAL_FLAGS=&amp;quot;-I `wx-config --prefix`/share/aclocal&amp;quot;&amp;lt;/pre&amp;gt; &amp;lt;!--[[User:Jabber|Jabber]] 06:24, 2 August 2006 (EDT)--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To change the aclocal search path more permanently do:&lt;br /&gt;
 echo `wx-config --prefix`/share/aclocal &amp;gt;&amp;gt; /usr/share/aclocal/dirlist&lt;br /&gt;
Then aclocal will also search somewhere like /opt/wx/2.6/share/aclocal&lt;br /&gt;
&lt;br /&gt;
'''Note for Ubuntu users:''' The above is not the correct way to fix the AM_* errors. Rather, you only need to install the package named &amp;quot;wx-common&amp;quot; (Universe repository).&lt;br /&gt;
&lt;br /&gt;
If you get something like&lt;br /&gt;
 The usual way to define `LIBTOOL' is to add `AC_PROG_LIBTOOL'&lt;br /&gt;
&lt;br /&gt;
it can be solved by something like: (adapt path, use `wx-config --prefix` is necessary)&lt;br /&gt;
&lt;br /&gt;
 ACLOCAL_FLAGS=&amp;quot;-I /usr/share/aclocal&amp;quot; ./bootstrap&lt;br /&gt;
&lt;br /&gt;
(*Note// '''If you run ./bootstrap and get errors like''':&lt;br /&gt;
 : bad interpreter: File not found&lt;br /&gt;
then there exists a problem with DOS line-endings. i had this error after i tried to build a  codeblocks from sources which were checked out with cvs on a windows machine. After i checked out a fresh copy of codeblocks from cvs under Ubuntu linux (see above topic: Downloading the latest source package fom SVN), all errors were gone. &lt;br /&gt;
//tiwag 051008*)&amp;lt;br&amp;gt;&lt;br /&gt;
Or, instead of downloading from SVN, you might consider using the little command line tool dos2unix, which normally comes with most distributions. //lizzarddude060103&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
If configure aborts with some unspecific error message(&amp;quot;.infig.status: error: cannot find input file: Makefile&amp;quot;), you might consider also running&lt;br /&gt;
 dos2unix bootstrap acinclude.m4 codeblocks.pc.in configure.in Makefile.am&lt;br /&gt;
before running bootstrap&lt;br /&gt;
&lt;br /&gt;
Once you've run the bootstrap script, installing is as simple as:&lt;br /&gt;
 ./configure&lt;br /&gt;
 make&lt;br /&gt;
 make install&lt;br /&gt;
&lt;br /&gt;
If you have multiple versions of wxWidgets installed or kept them inplace, you can use&lt;br /&gt;
./configure --with-wx-config=/path/to/wx-config&lt;br /&gt;
&lt;br /&gt;
To uninstall you can later run:&lt;br /&gt;
 make uninstall&lt;br /&gt;
&lt;br /&gt;
If you want to recompile everything, first run:&lt;br /&gt;
 make clean&lt;br /&gt;
 make distclean&lt;br /&gt;
 make clean-bin&lt;br /&gt;
 make clean-zipfiles&lt;br /&gt;
and then follow the above sequence for installing.&lt;br /&gt;
&lt;br /&gt;
By default, CodeBlocks will install to /usr/local.  If you want it in its own tree (so you can have multiple versions of CodeBlocks, each in its own subdirectory of /opt) replace the above ./configure command with:&lt;br /&gt;
 ./configure --prefix=/opt/codeblocks-svn&lt;br /&gt;
or similar.  Then you can later install a different build like:&lt;br /&gt;
 ./configure --prefix=/opt/codeblocks2-svn&lt;br /&gt;
followed by 'make &amp;amp;&amp;amp; make install' as usual.&lt;br /&gt;
&lt;br /&gt;
By default, CodeBlocks will not compile the contributed plugins from SVN.  If you want to compile / install them too, replace the above ./configure command with:&lt;br /&gt;
 ./configure --with-contrib-plugins=all&lt;br /&gt;
followed by 'make &amp;amp;&amp;amp; make install' as usual.&lt;br /&gt;
&lt;br /&gt;
To see a list of other options available for configuring the build of CodeBlocks do:&lt;br /&gt;
 ./configure --help&lt;br /&gt;
&lt;br /&gt;
To compile under gentoo, use&lt;br /&gt;
 ./configure --with-wx-config=wx-config-2.8&lt;br /&gt;
&lt;br /&gt;
====Resolving issues with Code::Blocks SVN====&lt;br /&gt;
&lt;br /&gt;
When running Code::Blocks after the installation it might happen, that the system complains:&lt;br /&gt;
 codeblocks: error while loading shared libraries: libcodeblocks.so.0: cannot open shared object file: No such file or directory&lt;br /&gt;
In that case make sure the library path where the Code::Blocks libraries where installed into is &amp;quot;known&amp;quot; to the system. For example: On Ubuntu using a default build process on a clean system will install the Code::Blocks executables to /use/local/bin and the libraries to /usr/local/lib. The latter is usually not known to a &amp;quot;clean&amp;quot; Ubuntu system. To add it to the search path for libraries do the following (as root / using sudo respectively):&lt;br /&gt;
Add the following line to the file /etc/ld.so.conf:&lt;br /&gt;
 /usr/local/lib&lt;br /&gt;
...and run:&lt;br /&gt;
 ldconfig&lt;br /&gt;
That's it - Code::Blocks should now work just fine as all libraries are being found.&lt;/div&gt;</summary>
		<author><name>Spacemonkey</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=Installing_Code::Blocks_from_source_on_Linux&amp;diff=6182</id>
		<title>Installing Code::Blocks from source on Linux</title>
		<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php?title=Installing_Code::Blocks_from_source_on_Linux&amp;diff=6182"/>
		<updated>2009-11-19T13:21:07Z</updated>

		<summary type="html">&lt;p&gt;Spacemonkey: /* Checking the presence of GTK+ library */&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;
These are instructions on how to build Code::Blocks under Linux. These instructions should work for all Linux distros, as we'll be installing from sources.&lt;br /&gt;
&lt;br /&gt;
===Prerequisites===&lt;br /&gt;
&lt;br /&gt;
In order to successfully compile Code::Blocks, the [http://en.wikipedia.org/wiki/WxWidgets wxWidgets] User Interface library &amp;lt;u&amp;gt;must be installed&amp;lt;/u&amp;gt;. For most Linux users, this is maybe the only dependency not already installed. wxWidget can be used directly on top of the X server, in this case the variant of the wxWidget library is called wxX11. However this library [http://wiki.wxwidgets.org/WxWidgets_Compared_To_Other_Toolkits#Why_You_Shouldn.27t_Use_wxWidgets &amp;quot;is sub-par compared to other toolkits and unstable&amp;quot;]. Hence Code::Blocks uses wxGTK, the version of wxWidget based on GTK+. The exact requirement is libwxGTK-2.8.0 or later (2.8.3 is not recommanded because of some troubles). This creates an additional dependency on GTK+, consider the following:&lt;br /&gt;
&lt;br /&gt;
A possible implementation which does not exist: &lt;br /&gt;
&lt;br /&gt;
''Code::Blocks  -&amp;gt;  xwWidget (libwxX11)  -&amp;gt;  X''&lt;br /&gt;
&lt;br /&gt;
Current Code::Blocks implementation: &lt;br /&gt;
&lt;br /&gt;
''Code::Blocks  -&amp;gt;  '''xwWidget (&amp;gt; libwxGTK2.8)'''  -&amp;gt;  '''GTK+ (&amp;gt; libgtk-x11-2.0)'''  -&amp;gt;  X''&lt;br /&gt;
&lt;br /&gt;
This document helps you to install libwxGTK if necessary but does not cover the installation of GTK+. GTK+ is probably installed on your Linux anyway, so don't worry ;)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
''Note:'' All the instructions below, assume an existing directory named &amp;lt;tt&amp;gt;~/devel&amp;lt;/tt&amp;gt;. If you 'll be using a different one, adjust the path to match.&lt;br /&gt;
As a first step create this directory:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;mkdir ~/devel&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Checking the presence of GTK+ library ===&lt;br /&gt;
&lt;br /&gt;
Have a look in /usr/lib for something like &amp;quot;libgtk-x11-2.0.so&amp;quot; (Note the library must be 2.0 minimum). Alternatively, do a search with your package manager or go to your Linux distribution forum for help. If you don't want to loose time, you can even forget this check since there is a good probability that everything is already installed. If you use Gnome you can definitely forget this check and go to the next step, the library is already there!&lt;br /&gt;
&lt;br /&gt;
===wxGTK installation===&lt;br /&gt;
&lt;br /&gt;
==== Checking the presence of libwxGTK library ====&lt;br /&gt;
&lt;br /&gt;
In your package manager, look for 'libwxgtk' keyword and verify that all libgtk2.8 stuffs are there. Alternatively in command line execute:&lt;br /&gt;
&lt;br /&gt;
$ ls /usr/lib/libwx_gtk*&lt;br /&gt;
&lt;br /&gt;
and verify that you get some outputs. If you have nothing you must install the library as described below, and you can redo this check afterwards to verify that the installation worked correctly.&lt;br /&gt;
&lt;br /&gt;
====Getting wxGTK====&lt;br /&gt;
&lt;br /&gt;
Visit the [http://www.wxwidgets.org wxWidgets web site]. Click the &amp;quot;Download&amp;quot; button at the top of the page. Under wxWidgets 2.8.7 downloads, select wxGTK. Save the file in &amp;lt;tt&amp;gt;~/devel&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
====Uncompressing the wxGTK sources====&lt;br /&gt;
&lt;br /&gt;
After the download finishes, switch to &amp;lt;tt&amp;gt;~/devel&amp;lt;/tt&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;cd ~/devel&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, untar the wxGTK sources:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;tar zxf wxGTK-2.8.7.tar.gz&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Switch to the wxGTK directory&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;cd wxGTK-2.8.7&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====wxWidgets build====&lt;br /&gt;
&lt;br /&gt;
Here we will create a seperate build directory instead of building from the src directory, so that we can easily rebuild with different options (unicode / ansi, monolithic / many libs, etc).&lt;br /&gt;
&lt;br /&gt;
The documentation says the default is for gtk2 to use unicode and wx &amp;gt; 2.5 to build as a monolithic library.  This doesn't appear to be the case, so these flags are passed to configure.&lt;br /&gt;
&lt;br /&gt;
 mkdir build_gtk2_shared_monolithic_unicode&lt;br /&gt;
 cd build_gtk2_shared_monolithic_unicode&lt;br /&gt;
 ../configure --prefix=/opt/wx/2.8 \&lt;br /&gt;
        --enable-xrc \&lt;br /&gt;
        --enable-monolithic \&lt;br /&gt;
        --enable-unicode&lt;br /&gt;
 make&lt;br /&gt;
 su&lt;br /&gt;
 make install&lt;br /&gt;
 exit&lt;br /&gt;
&lt;br /&gt;
Add /opt/wx/2.8/bin to the PATH (if you're shell is bash then edit /etc/profile or ~/.bash_profile)&lt;br /&gt;
(On Suse 10.1 edit /etc/profile.local, it will only be available after a new login).  an example PATH&lt;br /&gt;
 export PATH=/usr/bin:/opt/wx/2.8/bin:$PATH&lt;br /&gt;
&lt;br /&gt;
'''Note:''' On Ubuntu Hoary it was necessary to check &amp;quot;Run command as login shell&amp;quot; &lt;br /&gt;
in the gnome-terminal profile-settings, otherwise the PATH changes are not available in a gnome-terminal window.&lt;br /&gt;
&lt;br /&gt;
add /opt/wx/2.8/lib to /etc/ld.so.conf (nano /etc/ld.so.conf)&lt;br /&gt;
then run:&lt;br /&gt;
 ldconfig&lt;br /&gt;
 source /etc/profile&lt;br /&gt;
&lt;br /&gt;
That's it.  Now the linker will look in /opt/wx/2.8/lib for wx libraries and you will have a monolithic shared library unicode build.&lt;br /&gt;
&lt;br /&gt;
To check that things are working, type:&lt;br /&gt;
 wx-config --prefix&lt;br /&gt;
which should give you /opt/wx/2.8&lt;br /&gt;
 wx-config --libs&lt;br /&gt;
which should have at least&lt;br /&gt;
 -L/opt/wx/2.8/lib -lwx_gtk2-2.8&lt;br /&gt;
but can contain other flags as well.&lt;br /&gt;
 which wx-config&lt;br /&gt;
should return /opt/wx/2.8/bin/wx-config&lt;br /&gt;
&lt;br /&gt;
===Code::Blocks installation===&lt;br /&gt;
&lt;br /&gt;
====Downloading Code::Blocks====&lt;br /&gt;
&lt;br /&gt;
You can get Code::Blocks source code in one way:&lt;br /&gt;
* Get the latest sources from the SVN repository.&lt;br /&gt;
This method is described below.&lt;br /&gt;
&lt;br /&gt;
=====Getting the latest sources from SVN=====&lt;br /&gt;
'''IMPORTANT NOTICE: The Sourceforge CVS is no longer used although it still exists'''&lt;br /&gt;
&lt;br /&gt;
Enter your development directory:&lt;br /&gt;
&amp;lt;pre&amp;gt;cd ~/devel&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then checkout the source using one of [https://www.codeblocks.org/downloads/7 these] methods.&lt;br /&gt;
&lt;br /&gt;
This will create the directory &amp;lt;tt&amp;gt;trunk&amp;lt;/tt&amp;gt;.&lt;br /&gt;
Change to the source code directory, by issuing the following command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;cd trunk&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Building Code::Blocks SVN====&lt;br /&gt;
If you are a Gentoo user, please see [[Compiling_Code::Blocks_in_Gentoo]].&lt;br /&gt;
&lt;br /&gt;
Before beginning, it is often a good idea to check you have recent versions of autoconf and automake - repositories versions are not always recent enough. (if you do not have automake, then you will get &amp;quot;cannot find aclocal&amp;quot; error).&lt;br /&gt;
&lt;br /&gt;
If you're compiling the svn trunk versions of CodeBlocks (or future versions) then the unix build has switched to autotools.  So first build wxWidgets as described above and then build CodeBlocks as follows:&lt;br /&gt;
&lt;br /&gt;
 ./bootstrap&lt;br /&gt;
&lt;br /&gt;
This sets up the configure script and its dependencies.  It only needs to be run once (after downloading the source from svn).  '''If you get errors like:'''&lt;br /&gt;
 aclocal:configure.in:61: warning: macro `AM_OPTIONS_WXCONFIG' not found in library&lt;br /&gt;
Then aclocal is having trouble finding the wxWidgets .m4 files.  You can do one of two things:&lt;br /&gt;
To just get bootstrap to find the path this time do:&lt;br /&gt;
&amp;lt;!-- *********** Bad syntax... removed 2006-08-28 by BentFX ****************************&lt;br /&gt;
 export ACLOCAL_FLAGS=&amp;quot;--acdir=`wx-config --prefix`/share/aclocal&amp;quot;&lt;br /&gt;
&lt;br /&gt;
: Note: The above command resulted in missing macros when running ./bootstrap for me. Setting an additional search path instead of overwriting like above worked for me. In case of missing macros try &lt;br /&gt;
***********************************************************************************--&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;export ACLOCAL_FLAGS=&amp;quot;-I `wx-config --prefix`/share/aclocal&amp;quot;&amp;lt;/pre&amp;gt; &amp;lt;!--[[User:Jabber|Jabber]] 06:24, 2 August 2006 (EDT)--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To change the aclocal search path more permanently do:&lt;br /&gt;
 echo `wx-config --prefix`/share/aclocal &amp;gt;&amp;gt; /usr/share/aclocal/dirlist&lt;br /&gt;
Then aclocal will also search somewhere like /opt/wx/2.6/share/aclocal&lt;br /&gt;
&lt;br /&gt;
'''Note for Ubuntu users:''' The above is not the correct way to fix the AM_* errors. Rather, you only need to install the package named &amp;quot;wx-common&amp;quot; (Universe repository).&lt;br /&gt;
&lt;br /&gt;
If you get something like&lt;br /&gt;
 The usual way to define `LIBTOOL' is to add `AC_PROG_LIBTOOL'&lt;br /&gt;
&lt;br /&gt;
it can be solved by something like: (adapt path, use `wx-config --prefix` is necessary)&lt;br /&gt;
&lt;br /&gt;
 ACLOCAL_FLAGS=&amp;quot;-I /usr/share/aclocal&amp;quot; ./bootstrap&lt;br /&gt;
&lt;br /&gt;
(*Note// '''If you run ./bootstrap and get errors like''':&lt;br /&gt;
 : bad interpreter: File not found&lt;br /&gt;
then there exists a problem with DOS line-endings. i had this error after i tried to build a  codeblocks from sources which were checked out with cvs on a windows machine. After i checked out a fresh copy of codeblocks from cvs under Ubuntu linux (see above topic: Downloading the latest source package fom SVN), all errors were gone. &lt;br /&gt;
//tiwag 051008*)&amp;lt;br&amp;gt;&lt;br /&gt;
Or, instead of downloading from SVN, you might consider using the little command line tool dos2unix, which normally comes with most distributions. //lizzarddude060103&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
If configure aborts with some unspecific error message(&amp;quot;.infig.status: error: cannot find input file: Makefile&amp;quot;), you might consider also running&lt;br /&gt;
 dos2unix bootstrap acinclude.m4 codeblocks.pc.in configure.in Makefile.am&lt;br /&gt;
before running bootstrap&lt;br /&gt;
&lt;br /&gt;
Once you've run the bootstrap script, installing is as simple as:&lt;br /&gt;
 ./configure&lt;br /&gt;
 make&lt;br /&gt;
 make install&lt;br /&gt;
&lt;br /&gt;
If you have multiple versions of wxWidgets installed or kept them inplace, you can use&lt;br /&gt;
./configure --with-wx-config=/path/to/wx-config&lt;br /&gt;
&lt;br /&gt;
To uninstall you can later run:&lt;br /&gt;
 make uninstall&lt;br /&gt;
&lt;br /&gt;
If you want to recompile everything, first run:&lt;br /&gt;
 make clean&lt;br /&gt;
 make distclean&lt;br /&gt;
 make clean-bin&lt;br /&gt;
 make clean-zipfiles&lt;br /&gt;
and then follow the above sequence for installing.&lt;br /&gt;
&lt;br /&gt;
By default, CodeBlocks will install to /usr/local.  If you want it in its own tree (so you can have multiple versions of CodeBlocks, each in its own subdirectory of /opt) replace the above ./configure command with:&lt;br /&gt;
 ./configure --prefix=/opt/codeblocks-svn&lt;br /&gt;
or similar.  Then you can later install a different build like:&lt;br /&gt;
 ./configure --prefix=/opt/codeblocks2-svn&lt;br /&gt;
followed by 'make &amp;amp;&amp;amp; make install' as usual.&lt;br /&gt;
&lt;br /&gt;
By default, CodeBlocks will not compile the contributed plugins from SVN.  If you want to compile / install them too, replace the above ./configure command with:&lt;br /&gt;
 ./configure --with-contrib-plugins=all&lt;br /&gt;
followed by 'make &amp;amp;&amp;amp; make install' as usual.&lt;br /&gt;
&lt;br /&gt;
To see a list of other options available for configuring the build of CodeBlocks do:&lt;br /&gt;
 ./configure --help&lt;br /&gt;
&lt;br /&gt;
To compile under gentoo, use&lt;br /&gt;
 ./configure --with-wx-config=wx-config-2.8&lt;br /&gt;
&lt;br /&gt;
====Resolving issues with Code::Blocks SVN====&lt;br /&gt;
&lt;br /&gt;
When running Code::Blocks after the installation it might happen, that the system complains:&lt;br /&gt;
 codeblocks: error while loading shared libraries: libcodeblocks.so.0: cannot open shared object file: No such file or directory&lt;br /&gt;
In that case make sure the library path where the Code::Blocks libraries where installed into is &amp;quot;known&amp;quot; to the system. For example: On Ubuntu using a default build process on a clean system will install the Code::Blocks executables to /use/local/bin and the libraries to /usr/local/lib. The latter is usually not known to a &amp;quot;clean&amp;quot; Ubuntu system. To add it to the search path for libraries do the following (as root / using sudo respectively):&lt;br /&gt;
Add the following line to the file /etc/ld.so.conf:&lt;br /&gt;
 /usr/local/lib&lt;br /&gt;
...and run:&lt;br /&gt;
 ldconfig&lt;br /&gt;
That's it - Code::Blocks should now work just fine as all libraries are being found.&lt;/div&gt;</summary>
		<author><name>Spacemonkey</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=Installing_Code::Blocks_from_source_on_Linux&amp;diff=6181</id>
		<title>Installing Code::Blocks from source on Linux</title>
		<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php?title=Installing_Code::Blocks_from_source_on_Linux&amp;diff=6181"/>
		<updated>2009-11-19T13:19:42Z</updated>

		<summary type="html">&lt;p&gt;Spacemonkey: /* Checking the presence of libwxGTK library */&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;
These are instructions on how to build Code::Blocks under Linux. These instructions should work for all Linux distros, as we'll be installing from sources.&lt;br /&gt;
&lt;br /&gt;
===Prerequisites===&lt;br /&gt;
&lt;br /&gt;
In order to successfully compile Code::Blocks, the [http://en.wikipedia.org/wiki/WxWidgets wxWidgets] User Interface library &amp;lt;u&amp;gt;must be installed&amp;lt;/u&amp;gt;. For most Linux users, this is maybe the only dependency not already installed. wxWidget can be used directly on top of the X server, in this case the variant of the wxWidget library is called wxX11. However this library [http://wiki.wxwidgets.org/WxWidgets_Compared_To_Other_Toolkits#Why_You_Shouldn.27t_Use_wxWidgets &amp;quot;is sub-par compared to other toolkits and unstable&amp;quot;]. Hence Code::Blocks uses wxGTK, the version of wxWidget based on GTK+. The exact requirement is libwxGTK-2.8.0 or later (2.8.3 is not recommanded because of some troubles). This creates an additional dependency on GTK+, consider the following:&lt;br /&gt;
&lt;br /&gt;
A possible implementation which does not exist: &lt;br /&gt;
&lt;br /&gt;
''Code::Blocks  -&amp;gt;  xwWidget (libwxX11)  -&amp;gt;  X''&lt;br /&gt;
&lt;br /&gt;
Current Code::Blocks implementation: &lt;br /&gt;
&lt;br /&gt;
''Code::Blocks  -&amp;gt;  '''xwWidget (&amp;gt; libwxGTK2.8)'''  -&amp;gt;  '''GTK+ (&amp;gt; libgtk-x11-2.0)'''  -&amp;gt;  X''&lt;br /&gt;
&lt;br /&gt;
This document helps you to install libwxGTK if necessary but does not cover the installation of GTK+. GTK+ is probably installed on your Linux anyway, so don't worry ;)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
''Note:'' All the instructions below, assume an existing directory named &amp;lt;tt&amp;gt;~/devel&amp;lt;/tt&amp;gt;. If you 'll be using a different one, adjust the path to match.&lt;br /&gt;
As a first step create this directory:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;mkdir ~/devel&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Checking the presence of GTK+ library ===&lt;br /&gt;
&lt;br /&gt;
Have a look in /usr/lib for something like &amp;quot;libgtk-x11-2.0.so&amp;quot; (Note the library must be 2.0 minimum). Alternatively, do a search with your package manager or go to your Linux distribution forum for help. If you use Gnome you can definitely forget this check and go to the next step, the library is already there!&lt;br /&gt;
&lt;br /&gt;
===wxGTK installation===&lt;br /&gt;
&lt;br /&gt;
==== Checking the presence of libwxGTK library ====&lt;br /&gt;
&lt;br /&gt;
In your package manager, look for 'libwxgtk' keyword and verify that all libgtk2.8 stuffs are there. Alternatively in command line execute:&lt;br /&gt;
&lt;br /&gt;
$ ls /usr/lib/libwx_gtk*&lt;br /&gt;
&lt;br /&gt;
and verify that you get some outputs. If you have nothing you must install the library as described below, and you can redo this check afterwards to verify that the installation worked correctly.&lt;br /&gt;
&lt;br /&gt;
====Getting wxGTK====&lt;br /&gt;
&lt;br /&gt;
Visit the [http://www.wxwidgets.org wxWidgets web site]. Click the &amp;quot;Download&amp;quot; button at the top of the page. Under wxWidgets 2.8.7 downloads, select wxGTK. Save the file in &amp;lt;tt&amp;gt;~/devel&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
====Uncompressing the wxGTK sources====&lt;br /&gt;
&lt;br /&gt;
After the download finishes, switch to &amp;lt;tt&amp;gt;~/devel&amp;lt;/tt&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;cd ~/devel&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, untar the wxGTK sources:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;tar zxf wxGTK-2.8.7.tar.gz&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Switch to the wxGTK directory&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;cd wxGTK-2.8.7&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====wxWidgets build====&lt;br /&gt;
&lt;br /&gt;
Here we will create a seperate build directory instead of building from the src directory, so that we can easily rebuild with different options (unicode / ansi, monolithic / many libs, etc).&lt;br /&gt;
&lt;br /&gt;
The documentation says the default is for gtk2 to use unicode and wx &amp;gt; 2.5 to build as a monolithic library.  This doesn't appear to be the case, so these flags are passed to configure.&lt;br /&gt;
&lt;br /&gt;
 mkdir build_gtk2_shared_monolithic_unicode&lt;br /&gt;
 cd build_gtk2_shared_monolithic_unicode&lt;br /&gt;
 ../configure --prefix=/opt/wx/2.8 \&lt;br /&gt;
        --enable-xrc \&lt;br /&gt;
        --enable-monolithic \&lt;br /&gt;
        --enable-unicode&lt;br /&gt;
 make&lt;br /&gt;
 su&lt;br /&gt;
 make install&lt;br /&gt;
 exit&lt;br /&gt;
&lt;br /&gt;
Add /opt/wx/2.8/bin to the PATH (if you're shell is bash then edit /etc/profile or ~/.bash_profile)&lt;br /&gt;
(On Suse 10.1 edit /etc/profile.local, it will only be available after a new login).  an example PATH&lt;br /&gt;
 export PATH=/usr/bin:/opt/wx/2.8/bin:$PATH&lt;br /&gt;
&lt;br /&gt;
'''Note:''' On Ubuntu Hoary it was necessary to check &amp;quot;Run command as login shell&amp;quot; &lt;br /&gt;
in the gnome-terminal profile-settings, otherwise the PATH changes are not available in a gnome-terminal window.&lt;br /&gt;
&lt;br /&gt;
add /opt/wx/2.8/lib to /etc/ld.so.conf (nano /etc/ld.so.conf)&lt;br /&gt;
then run:&lt;br /&gt;
 ldconfig&lt;br /&gt;
 source /etc/profile&lt;br /&gt;
&lt;br /&gt;
That's it.  Now the linker will look in /opt/wx/2.8/lib for wx libraries and you will have a monolithic shared library unicode build.&lt;br /&gt;
&lt;br /&gt;
To check that things are working, type:&lt;br /&gt;
 wx-config --prefix&lt;br /&gt;
which should give you /opt/wx/2.8&lt;br /&gt;
 wx-config --libs&lt;br /&gt;
which should have at least&lt;br /&gt;
 -L/opt/wx/2.8/lib -lwx_gtk2-2.8&lt;br /&gt;
but can contain other flags as well.&lt;br /&gt;
 which wx-config&lt;br /&gt;
should return /opt/wx/2.8/bin/wx-config&lt;br /&gt;
&lt;br /&gt;
===Code::Blocks installation===&lt;br /&gt;
&lt;br /&gt;
====Downloading Code::Blocks====&lt;br /&gt;
&lt;br /&gt;
You can get Code::Blocks source code in one way:&lt;br /&gt;
* Get the latest sources from the SVN repository.&lt;br /&gt;
This method is described below.&lt;br /&gt;
&lt;br /&gt;
=====Getting the latest sources from SVN=====&lt;br /&gt;
'''IMPORTANT NOTICE: The Sourceforge CVS is no longer used although it still exists'''&lt;br /&gt;
&lt;br /&gt;
Enter your development directory:&lt;br /&gt;
&amp;lt;pre&amp;gt;cd ~/devel&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then checkout the source using one of [https://www.codeblocks.org/downloads/7 these] methods.&lt;br /&gt;
&lt;br /&gt;
This will create the directory &amp;lt;tt&amp;gt;trunk&amp;lt;/tt&amp;gt;.&lt;br /&gt;
Change to the source code directory, by issuing the following command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;cd trunk&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Building Code::Blocks SVN====&lt;br /&gt;
If you are a Gentoo user, please see [[Compiling_Code::Blocks_in_Gentoo]].&lt;br /&gt;
&lt;br /&gt;
Before beginning, it is often a good idea to check you have recent versions of autoconf and automake - repositories versions are not always recent enough. (if you do not have automake, then you will get &amp;quot;cannot find aclocal&amp;quot; error).&lt;br /&gt;
&lt;br /&gt;
If you're compiling the svn trunk versions of CodeBlocks (or future versions) then the unix build has switched to autotools.  So first build wxWidgets as described above and then build CodeBlocks as follows:&lt;br /&gt;
&lt;br /&gt;
 ./bootstrap&lt;br /&gt;
&lt;br /&gt;
This sets up the configure script and its dependencies.  It only needs to be run once (after downloading the source from svn).  '''If you get errors like:'''&lt;br /&gt;
 aclocal:configure.in:61: warning: macro `AM_OPTIONS_WXCONFIG' not found in library&lt;br /&gt;
Then aclocal is having trouble finding the wxWidgets .m4 files.  You can do one of two things:&lt;br /&gt;
To just get bootstrap to find the path this time do:&lt;br /&gt;
&amp;lt;!-- *********** Bad syntax... removed 2006-08-28 by BentFX ****************************&lt;br /&gt;
 export ACLOCAL_FLAGS=&amp;quot;--acdir=`wx-config --prefix`/share/aclocal&amp;quot;&lt;br /&gt;
&lt;br /&gt;
: Note: The above command resulted in missing macros when running ./bootstrap for me. Setting an additional search path instead of overwriting like above worked for me. In case of missing macros try &lt;br /&gt;
***********************************************************************************--&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;export ACLOCAL_FLAGS=&amp;quot;-I `wx-config --prefix`/share/aclocal&amp;quot;&amp;lt;/pre&amp;gt; &amp;lt;!--[[User:Jabber|Jabber]] 06:24, 2 August 2006 (EDT)--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To change the aclocal search path more permanently do:&lt;br /&gt;
 echo `wx-config --prefix`/share/aclocal &amp;gt;&amp;gt; /usr/share/aclocal/dirlist&lt;br /&gt;
Then aclocal will also search somewhere like /opt/wx/2.6/share/aclocal&lt;br /&gt;
&lt;br /&gt;
'''Note for Ubuntu users:''' The above is not the correct way to fix the AM_* errors. Rather, you only need to install the package named &amp;quot;wx-common&amp;quot; (Universe repository).&lt;br /&gt;
&lt;br /&gt;
If you get something like&lt;br /&gt;
 The usual way to define `LIBTOOL' is to add `AC_PROG_LIBTOOL'&lt;br /&gt;
&lt;br /&gt;
it can be solved by something like: (adapt path, use `wx-config --prefix` is necessary)&lt;br /&gt;
&lt;br /&gt;
 ACLOCAL_FLAGS=&amp;quot;-I /usr/share/aclocal&amp;quot; ./bootstrap&lt;br /&gt;
&lt;br /&gt;
(*Note// '''If you run ./bootstrap and get errors like''':&lt;br /&gt;
 : bad interpreter: File not found&lt;br /&gt;
then there exists a problem with DOS line-endings. i had this error after i tried to build a  codeblocks from sources which were checked out with cvs on a windows machine. After i checked out a fresh copy of codeblocks from cvs under Ubuntu linux (see above topic: Downloading the latest source package fom SVN), all errors were gone. &lt;br /&gt;
//tiwag 051008*)&amp;lt;br&amp;gt;&lt;br /&gt;
Or, instead of downloading from SVN, you might consider using the little command line tool dos2unix, which normally comes with most distributions. //lizzarddude060103&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
If configure aborts with some unspecific error message(&amp;quot;.infig.status: error: cannot find input file: Makefile&amp;quot;), you might consider also running&lt;br /&gt;
 dos2unix bootstrap acinclude.m4 codeblocks.pc.in configure.in Makefile.am&lt;br /&gt;
before running bootstrap&lt;br /&gt;
&lt;br /&gt;
Once you've run the bootstrap script, installing is as simple as:&lt;br /&gt;
 ./configure&lt;br /&gt;
 make&lt;br /&gt;
 make install&lt;br /&gt;
&lt;br /&gt;
If you have multiple versions of wxWidgets installed or kept them inplace, you can use&lt;br /&gt;
./configure --with-wx-config=/path/to/wx-config&lt;br /&gt;
&lt;br /&gt;
To uninstall you can later run:&lt;br /&gt;
 make uninstall&lt;br /&gt;
&lt;br /&gt;
If you want to recompile everything, first run:&lt;br /&gt;
 make clean&lt;br /&gt;
 make distclean&lt;br /&gt;
 make clean-bin&lt;br /&gt;
 make clean-zipfiles&lt;br /&gt;
and then follow the above sequence for installing.&lt;br /&gt;
&lt;br /&gt;
By default, CodeBlocks will install to /usr/local.  If you want it in its own tree (so you can have multiple versions of CodeBlocks, each in its own subdirectory of /opt) replace the above ./configure command with:&lt;br /&gt;
 ./configure --prefix=/opt/codeblocks-svn&lt;br /&gt;
or similar.  Then you can later install a different build like:&lt;br /&gt;
 ./configure --prefix=/opt/codeblocks2-svn&lt;br /&gt;
followed by 'make &amp;amp;&amp;amp; make install' as usual.&lt;br /&gt;
&lt;br /&gt;
By default, CodeBlocks will not compile the contributed plugins from SVN.  If you want to compile / install them too, replace the above ./configure command with:&lt;br /&gt;
 ./configure --with-contrib-plugins=all&lt;br /&gt;
followed by 'make &amp;amp;&amp;amp; make install' as usual.&lt;br /&gt;
&lt;br /&gt;
To see a list of other options available for configuring the build of CodeBlocks do:&lt;br /&gt;
 ./configure --help&lt;br /&gt;
&lt;br /&gt;
To compile under gentoo, use&lt;br /&gt;
 ./configure --with-wx-config=wx-config-2.8&lt;br /&gt;
&lt;br /&gt;
====Resolving issues with Code::Blocks SVN====&lt;br /&gt;
&lt;br /&gt;
When running Code::Blocks after the installation it might happen, that the system complains:&lt;br /&gt;
 codeblocks: error while loading shared libraries: libcodeblocks.so.0: cannot open shared object file: No such file or directory&lt;br /&gt;
In that case make sure the library path where the Code::Blocks libraries where installed into is &amp;quot;known&amp;quot; to the system. For example: On Ubuntu using a default build process on a clean system will install the Code::Blocks executables to /use/local/bin and the libraries to /usr/local/lib. The latter is usually not known to a &amp;quot;clean&amp;quot; Ubuntu system. To add it to the search path for libraries do the following (as root / using sudo respectively):&lt;br /&gt;
Add the following line to the file /etc/ld.so.conf:&lt;br /&gt;
 /usr/local/lib&lt;br /&gt;
...and run:&lt;br /&gt;
 ldconfig&lt;br /&gt;
That's it - Code::Blocks should now work just fine as all libraries are being found.&lt;/div&gt;</summary>
		<author><name>Spacemonkey</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=Installing_Code::Blocks_from_source_on_Linux&amp;diff=6180</id>
		<title>Installing Code::Blocks from source on Linux</title>
		<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php?title=Installing_Code::Blocks_from_source_on_Linux&amp;diff=6180"/>
		<updated>2009-11-19T13:08:12Z</updated>

		<summary type="html">&lt;p&gt;Spacemonkey: /* Checking the presence of GTK+ library */&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;
These are instructions on how to build Code::Blocks under Linux. These instructions should work for all Linux distros, as we'll be installing from sources.&lt;br /&gt;
&lt;br /&gt;
===Prerequisites===&lt;br /&gt;
&lt;br /&gt;
In order to successfully compile Code::Blocks, the [http://en.wikipedia.org/wiki/WxWidgets wxWidgets] User Interface library &amp;lt;u&amp;gt;must be installed&amp;lt;/u&amp;gt;. For most Linux users, this is maybe the only dependency not already installed. wxWidget can be used directly on top of the X server, in this case the variant of the wxWidget library is called wxX11. However this library [http://wiki.wxwidgets.org/WxWidgets_Compared_To_Other_Toolkits#Why_You_Shouldn.27t_Use_wxWidgets &amp;quot;is sub-par compared to other toolkits and unstable&amp;quot;]. Hence Code::Blocks uses wxGTK, the version of wxWidget based on GTK+. The exact requirement is libwxGTK-2.8.0 or later (2.8.3 is not recommanded because of some troubles). This creates an additional dependency on GTK+, consider the following:&lt;br /&gt;
&lt;br /&gt;
A possible implementation which does not exist: &lt;br /&gt;
&lt;br /&gt;
''Code::Blocks  -&amp;gt;  xwWidget (libwxX11)  -&amp;gt;  X''&lt;br /&gt;
&lt;br /&gt;
Current Code::Blocks implementation: &lt;br /&gt;
&lt;br /&gt;
''Code::Blocks  -&amp;gt;  '''xwWidget (&amp;gt; libwxGTK2.8)'''  -&amp;gt;  '''GTK+ (&amp;gt; libgtk-x11-2.0)'''  -&amp;gt;  X''&lt;br /&gt;
&lt;br /&gt;
This document helps you to install libwxGTK if necessary but does not cover the installation of GTK+. GTK+ is probably installed on your Linux anyway, so don't worry ;)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
''Note:'' All the instructions below, assume an existing directory named &amp;lt;tt&amp;gt;~/devel&amp;lt;/tt&amp;gt;. If you 'll be using a different one, adjust the path to match.&lt;br /&gt;
As a first step create this directory:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;mkdir ~/devel&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Checking the presence of GTK+ library ===&lt;br /&gt;
&lt;br /&gt;
Have a look in /usr/lib for something like &amp;quot;libgtk-x11-2.0.so&amp;quot; (Note the library must be 2.0 minimum). Alternatively, do a search with your package manager or go to your Linux distribution forum for help. If you use Gnome you can definitely forget this check and go to the next step, the library is already there!&lt;br /&gt;
&lt;br /&gt;
===wxGTK installation===&lt;br /&gt;
&lt;br /&gt;
==== Checking the presence of libwxGTK library ====&lt;br /&gt;
&lt;br /&gt;
====Getting wxGTK====&lt;br /&gt;
&lt;br /&gt;
Visit the [http://www.wxwidgets.org wxWidgets web site]. Click the &amp;quot;Download&amp;quot; button at the top of the page. Under wxWidgets 2.8.7 downloads, select wxGTK. Save the file in &amp;lt;tt&amp;gt;~/devel&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
====Uncompressing the wxGTK sources====&lt;br /&gt;
&lt;br /&gt;
After the download finishes, switch to &amp;lt;tt&amp;gt;~/devel&amp;lt;/tt&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;cd ~/devel&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, untar the wxGTK sources:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;tar zxf wxGTK-2.8.7.tar.gz&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Switch to the wxGTK directory&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;cd wxGTK-2.8.7&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====wxWidgets build====&lt;br /&gt;
&lt;br /&gt;
Here we will create a seperate build directory instead of building from the src directory, so that we can easily rebuild with different options (unicode / ansi, monolithic / many libs, etc).&lt;br /&gt;
&lt;br /&gt;
The documentation says the default is for gtk2 to use unicode and wx &amp;gt; 2.5 to build as a monolithic library.  This doesn't appear to be the case, so these flags are passed to configure.&lt;br /&gt;
&lt;br /&gt;
 mkdir build_gtk2_shared_monolithic_unicode&lt;br /&gt;
 cd build_gtk2_shared_monolithic_unicode&lt;br /&gt;
 ../configure --prefix=/opt/wx/2.8 \&lt;br /&gt;
        --enable-xrc \&lt;br /&gt;
        --enable-monolithic \&lt;br /&gt;
        --enable-unicode&lt;br /&gt;
 make&lt;br /&gt;
 su&lt;br /&gt;
 make install&lt;br /&gt;
 exit&lt;br /&gt;
&lt;br /&gt;
Add /opt/wx/2.8/bin to the PATH (if you're shell is bash then edit /etc/profile or ~/.bash_profile)&lt;br /&gt;
(On Suse 10.1 edit /etc/profile.local, it will only be available after a new login).  an example PATH&lt;br /&gt;
 export PATH=/usr/bin:/opt/wx/2.8/bin:$PATH&lt;br /&gt;
&lt;br /&gt;
'''Note:''' On Ubuntu Hoary it was necessary to check &amp;quot;Run command as login shell&amp;quot; &lt;br /&gt;
in the gnome-terminal profile-settings, otherwise the PATH changes are not available in a gnome-terminal window.&lt;br /&gt;
&lt;br /&gt;
add /opt/wx/2.8/lib to /etc/ld.so.conf (nano /etc/ld.so.conf)&lt;br /&gt;
then run:&lt;br /&gt;
 ldconfig&lt;br /&gt;
 source /etc/profile&lt;br /&gt;
&lt;br /&gt;
That's it.  Now the linker will look in /opt/wx/2.8/lib for wx libraries and you will have a monolithic shared library unicode build.&lt;br /&gt;
&lt;br /&gt;
To check that things are working, type:&lt;br /&gt;
 wx-config --prefix&lt;br /&gt;
which should give you /opt/wx/2.8&lt;br /&gt;
 wx-config --libs&lt;br /&gt;
which should have at least&lt;br /&gt;
 -L/opt/wx/2.8/lib -lwx_gtk2-2.8&lt;br /&gt;
but can contain other flags as well.&lt;br /&gt;
 which wx-config&lt;br /&gt;
should return /opt/wx/2.8/bin/wx-config&lt;br /&gt;
&lt;br /&gt;
===Code::Blocks installation===&lt;br /&gt;
&lt;br /&gt;
====Downloading Code::Blocks====&lt;br /&gt;
&lt;br /&gt;
You can get Code::Blocks source code in one way:&lt;br /&gt;
* Get the latest sources from the SVN repository.&lt;br /&gt;
This method is described below.&lt;br /&gt;
&lt;br /&gt;
=====Getting the latest sources from SVN=====&lt;br /&gt;
'''IMPORTANT NOTICE: The Sourceforge CVS is no longer used although it still exists'''&lt;br /&gt;
&lt;br /&gt;
Enter your development directory:&lt;br /&gt;
&amp;lt;pre&amp;gt;cd ~/devel&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then checkout the source using one of [https://www.codeblocks.org/downloads/7 these] methods.&lt;br /&gt;
&lt;br /&gt;
This will create the directory &amp;lt;tt&amp;gt;trunk&amp;lt;/tt&amp;gt;.&lt;br /&gt;
Change to the source code directory, by issuing the following command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;cd trunk&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Building Code::Blocks SVN====&lt;br /&gt;
If you are a Gentoo user, please see [[Compiling_Code::Blocks_in_Gentoo]].&lt;br /&gt;
&lt;br /&gt;
Before beginning, it is often a good idea to check you have recent versions of autoconf and automake - repositories versions are not always recent enough. (if you do not have automake, then you will get &amp;quot;cannot find aclocal&amp;quot; error).&lt;br /&gt;
&lt;br /&gt;
If you're compiling the svn trunk versions of CodeBlocks (or future versions) then the unix build has switched to autotools.  So first build wxWidgets as described above and then build CodeBlocks as follows:&lt;br /&gt;
&lt;br /&gt;
 ./bootstrap&lt;br /&gt;
&lt;br /&gt;
This sets up the configure script and its dependencies.  It only needs to be run once (after downloading the source from svn).  '''If you get errors like:'''&lt;br /&gt;
 aclocal:configure.in:61: warning: macro `AM_OPTIONS_WXCONFIG' not found in library&lt;br /&gt;
Then aclocal is having trouble finding the wxWidgets .m4 files.  You can do one of two things:&lt;br /&gt;
To just get bootstrap to find the path this time do:&lt;br /&gt;
&amp;lt;!-- *********** Bad syntax... removed 2006-08-28 by BentFX ****************************&lt;br /&gt;
 export ACLOCAL_FLAGS=&amp;quot;--acdir=`wx-config --prefix`/share/aclocal&amp;quot;&lt;br /&gt;
&lt;br /&gt;
: Note: The above command resulted in missing macros when running ./bootstrap for me. Setting an additional search path instead of overwriting like above worked for me. In case of missing macros try &lt;br /&gt;
***********************************************************************************--&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;export ACLOCAL_FLAGS=&amp;quot;-I `wx-config --prefix`/share/aclocal&amp;quot;&amp;lt;/pre&amp;gt; &amp;lt;!--[[User:Jabber|Jabber]] 06:24, 2 August 2006 (EDT)--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To change the aclocal search path more permanently do:&lt;br /&gt;
 echo `wx-config --prefix`/share/aclocal &amp;gt;&amp;gt; /usr/share/aclocal/dirlist&lt;br /&gt;
Then aclocal will also search somewhere like /opt/wx/2.6/share/aclocal&lt;br /&gt;
&lt;br /&gt;
'''Note for Ubuntu users:''' The above is not the correct way to fix the AM_* errors. Rather, you only need to install the package named &amp;quot;wx-common&amp;quot; (Universe repository).&lt;br /&gt;
&lt;br /&gt;
If you get something like&lt;br /&gt;
 The usual way to define `LIBTOOL' is to add `AC_PROG_LIBTOOL'&lt;br /&gt;
&lt;br /&gt;
it can be solved by something like: (adapt path, use `wx-config --prefix` is necessary)&lt;br /&gt;
&lt;br /&gt;
 ACLOCAL_FLAGS=&amp;quot;-I /usr/share/aclocal&amp;quot; ./bootstrap&lt;br /&gt;
&lt;br /&gt;
(*Note// '''If you run ./bootstrap and get errors like''':&lt;br /&gt;
 : bad interpreter: File not found&lt;br /&gt;
then there exists a problem with DOS line-endings. i had this error after i tried to build a  codeblocks from sources which were checked out with cvs on a windows machine. After i checked out a fresh copy of codeblocks from cvs under Ubuntu linux (see above topic: Downloading the latest source package fom SVN), all errors were gone. &lt;br /&gt;
//tiwag 051008*)&amp;lt;br&amp;gt;&lt;br /&gt;
Or, instead of downloading from SVN, you might consider using the little command line tool dos2unix, which normally comes with most distributions. //lizzarddude060103&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
If configure aborts with some unspecific error message(&amp;quot;.infig.status: error: cannot find input file: Makefile&amp;quot;), you might consider also running&lt;br /&gt;
 dos2unix bootstrap acinclude.m4 codeblocks.pc.in configure.in Makefile.am&lt;br /&gt;
before running bootstrap&lt;br /&gt;
&lt;br /&gt;
Once you've run the bootstrap script, installing is as simple as:&lt;br /&gt;
 ./configure&lt;br /&gt;
 make&lt;br /&gt;
 make install&lt;br /&gt;
&lt;br /&gt;
If you have multiple versions of wxWidgets installed or kept them inplace, you can use&lt;br /&gt;
./configure --with-wx-config=/path/to/wx-config&lt;br /&gt;
&lt;br /&gt;
To uninstall you can later run:&lt;br /&gt;
 make uninstall&lt;br /&gt;
&lt;br /&gt;
If you want to recompile everything, first run:&lt;br /&gt;
 make clean&lt;br /&gt;
 make distclean&lt;br /&gt;
 make clean-bin&lt;br /&gt;
 make clean-zipfiles&lt;br /&gt;
and then follow the above sequence for installing.&lt;br /&gt;
&lt;br /&gt;
By default, CodeBlocks will install to /usr/local.  If you want it in its own tree (so you can have multiple versions of CodeBlocks, each in its own subdirectory of /opt) replace the above ./configure command with:&lt;br /&gt;
 ./configure --prefix=/opt/codeblocks-svn&lt;br /&gt;
or similar.  Then you can later install a different build like:&lt;br /&gt;
 ./configure --prefix=/opt/codeblocks2-svn&lt;br /&gt;
followed by 'make &amp;amp;&amp;amp; make install' as usual.&lt;br /&gt;
&lt;br /&gt;
By default, CodeBlocks will not compile the contributed plugins from SVN.  If you want to compile / install them too, replace the above ./configure command with:&lt;br /&gt;
 ./configure --with-contrib-plugins=all&lt;br /&gt;
followed by 'make &amp;amp;&amp;amp; make install' as usual.&lt;br /&gt;
&lt;br /&gt;
To see a list of other options available for configuring the build of CodeBlocks do:&lt;br /&gt;
 ./configure --help&lt;br /&gt;
&lt;br /&gt;
To compile under gentoo, use&lt;br /&gt;
 ./configure --with-wx-config=wx-config-2.8&lt;br /&gt;
&lt;br /&gt;
====Resolving issues with Code::Blocks SVN====&lt;br /&gt;
&lt;br /&gt;
When running Code::Blocks after the installation it might happen, that the system complains:&lt;br /&gt;
 codeblocks: error while loading shared libraries: libcodeblocks.so.0: cannot open shared object file: No such file or directory&lt;br /&gt;
In that case make sure the library path where the Code::Blocks libraries where installed into is &amp;quot;known&amp;quot; to the system. For example: On Ubuntu using a default build process on a clean system will install the Code::Blocks executables to /use/local/bin and the libraries to /usr/local/lib. The latter is usually not known to a &amp;quot;clean&amp;quot; Ubuntu system. To add it to the search path for libraries do the following (as root / using sudo respectively):&lt;br /&gt;
Add the following line to the file /etc/ld.so.conf:&lt;br /&gt;
 /usr/local/lib&lt;br /&gt;
...and run:&lt;br /&gt;
 ldconfig&lt;br /&gt;
That's it - Code::Blocks should now work just fine as all libraries are being found.&lt;/div&gt;</summary>
		<author><name>Spacemonkey</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=Installing_Code::Blocks_from_source_on_Linux&amp;diff=6179</id>
		<title>Installing Code::Blocks from source on Linux</title>
		<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php?title=Installing_Code::Blocks_from_source_on_Linux&amp;diff=6179"/>
		<updated>2009-11-19T13:05:09Z</updated>

		<summary type="html">&lt;p&gt;Spacemonkey: /* Checking the presence of GTK+ library */&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;
These are instructions on how to build Code::Blocks under Linux. These instructions should work for all Linux distros, as we'll be installing from sources.&lt;br /&gt;
&lt;br /&gt;
===Prerequisites===&lt;br /&gt;
&lt;br /&gt;
In order to successfully compile Code::Blocks, the [http://en.wikipedia.org/wiki/WxWidgets wxWidgets] User Interface library &amp;lt;u&amp;gt;must be installed&amp;lt;/u&amp;gt;. For most Linux users, this is maybe the only dependency not already installed. wxWidget can be used directly on top of the X server, in this case the variant of the wxWidget library is called wxX11. However this library [http://wiki.wxwidgets.org/WxWidgets_Compared_To_Other_Toolkits#Why_You_Shouldn.27t_Use_wxWidgets &amp;quot;is sub-par compared to other toolkits and unstable&amp;quot;]. Hence Code::Blocks uses wxGTK, the version of wxWidget based on GTK+. The exact requirement is libwxGTK-2.8.0 or later (2.8.3 is not recommanded because of some troubles). This creates an additional dependency on GTK+, consider the following:&lt;br /&gt;
&lt;br /&gt;
A possible implementation which does not exist: &lt;br /&gt;
&lt;br /&gt;
''Code::Blocks  -&amp;gt;  xwWidget (libwxX11)  -&amp;gt;  X''&lt;br /&gt;
&lt;br /&gt;
Current Code::Blocks implementation: &lt;br /&gt;
&lt;br /&gt;
''Code::Blocks  -&amp;gt;  '''xwWidget (&amp;gt; libwxGTK2.8)'''  -&amp;gt;  '''GTK+ (&amp;gt; libgtk-x11-2.0)'''  -&amp;gt;  X''&lt;br /&gt;
&lt;br /&gt;
This document helps you to install libwxGTK if necessary but does not cover the installation of GTK+. GTK+ is probably installed on your Linux anyway, so don't worry ;)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
''Note:'' All the instructions below, assume an existing directory named &amp;lt;tt&amp;gt;~/devel&amp;lt;/tt&amp;gt;. If you 'll be using a different one, adjust the path to match.&lt;br /&gt;
As a first step create this directory:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;mkdir ~/devel&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Checking the presence of GTK+ library ===&lt;br /&gt;
&lt;br /&gt;
Have a look in /usr/lib for something like &amp;quot;libgtk-x11-2.0.so&amp;quot;. Alternatively, do a search with your package manager. If you are a normal Linux desktop user, you can probably forget this check, the library is already there. If you use Gnome you can definitely forget this check and go to the next step!&lt;br /&gt;
&lt;br /&gt;
===wxGTK installation===&lt;br /&gt;
&lt;br /&gt;
==== Checking the presence of libwxGTK library ====&lt;br /&gt;
&lt;br /&gt;
====Getting wxGTK====&lt;br /&gt;
&lt;br /&gt;
Visit the [http://www.wxwidgets.org wxWidgets web site]. Click the &amp;quot;Download&amp;quot; button at the top of the page. Under wxWidgets 2.8.7 downloads, select wxGTK. Save the file in &amp;lt;tt&amp;gt;~/devel&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
====Uncompressing the wxGTK sources====&lt;br /&gt;
&lt;br /&gt;
After the download finishes, switch to &amp;lt;tt&amp;gt;~/devel&amp;lt;/tt&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;cd ~/devel&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, untar the wxGTK sources:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;tar zxf wxGTK-2.8.7.tar.gz&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Switch to the wxGTK directory&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;cd wxGTK-2.8.7&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====wxWidgets build====&lt;br /&gt;
&lt;br /&gt;
Here we will create a seperate build directory instead of building from the src directory, so that we can easily rebuild with different options (unicode / ansi, monolithic / many libs, etc).&lt;br /&gt;
&lt;br /&gt;
The documentation says the default is for gtk2 to use unicode and wx &amp;gt; 2.5 to build as a monolithic library.  This doesn't appear to be the case, so these flags are passed to configure.&lt;br /&gt;
&lt;br /&gt;
 mkdir build_gtk2_shared_monolithic_unicode&lt;br /&gt;
 cd build_gtk2_shared_monolithic_unicode&lt;br /&gt;
 ../configure --prefix=/opt/wx/2.8 \&lt;br /&gt;
        --enable-xrc \&lt;br /&gt;
        --enable-monolithic \&lt;br /&gt;
        --enable-unicode&lt;br /&gt;
 make&lt;br /&gt;
 su&lt;br /&gt;
 make install&lt;br /&gt;
 exit&lt;br /&gt;
&lt;br /&gt;
Add /opt/wx/2.8/bin to the PATH (if you're shell is bash then edit /etc/profile or ~/.bash_profile)&lt;br /&gt;
(On Suse 10.1 edit /etc/profile.local, it will only be available after a new login).  an example PATH&lt;br /&gt;
 export PATH=/usr/bin:/opt/wx/2.8/bin:$PATH&lt;br /&gt;
&lt;br /&gt;
'''Note:''' On Ubuntu Hoary it was necessary to check &amp;quot;Run command as login shell&amp;quot; &lt;br /&gt;
in the gnome-terminal profile-settings, otherwise the PATH changes are not available in a gnome-terminal window.&lt;br /&gt;
&lt;br /&gt;
add /opt/wx/2.8/lib to /etc/ld.so.conf (nano /etc/ld.so.conf)&lt;br /&gt;
then run:&lt;br /&gt;
 ldconfig&lt;br /&gt;
 source /etc/profile&lt;br /&gt;
&lt;br /&gt;
That's it.  Now the linker will look in /opt/wx/2.8/lib for wx libraries and you will have a monolithic shared library unicode build.&lt;br /&gt;
&lt;br /&gt;
To check that things are working, type:&lt;br /&gt;
 wx-config --prefix&lt;br /&gt;
which should give you /opt/wx/2.8&lt;br /&gt;
 wx-config --libs&lt;br /&gt;
which should have at least&lt;br /&gt;
 -L/opt/wx/2.8/lib -lwx_gtk2-2.8&lt;br /&gt;
but can contain other flags as well.&lt;br /&gt;
 which wx-config&lt;br /&gt;
should return /opt/wx/2.8/bin/wx-config&lt;br /&gt;
&lt;br /&gt;
===Code::Blocks installation===&lt;br /&gt;
&lt;br /&gt;
====Downloading Code::Blocks====&lt;br /&gt;
&lt;br /&gt;
You can get Code::Blocks source code in one way:&lt;br /&gt;
* Get the latest sources from the SVN repository.&lt;br /&gt;
This method is described below.&lt;br /&gt;
&lt;br /&gt;
=====Getting the latest sources from SVN=====&lt;br /&gt;
'''IMPORTANT NOTICE: The Sourceforge CVS is no longer used although it still exists'''&lt;br /&gt;
&lt;br /&gt;
Enter your development directory:&lt;br /&gt;
&amp;lt;pre&amp;gt;cd ~/devel&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then checkout the source using one of [https://www.codeblocks.org/downloads/7 these] methods.&lt;br /&gt;
&lt;br /&gt;
This will create the directory &amp;lt;tt&amp;gt;trunk&amp;lt;/tt&amp;gt;.&lt;br /&gt;
Change to the source code directory, by issuing the following command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;cd trunk&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Building Code::Blocks SVN====&lt;br /&gt;
If you are a Gentoo user, please see [[Compiling_Code::Blocks_in_Gentoo]].&lt;br /&gt;
&lt;br /&gt;
Before beginning, it is often a good idea to check you have recent versions of autoconf and automake - repositories versions are not always recent enough. (if you do not have automake, then you will get &amp;quot;cannot find aclocal&amp;quot; error).&lt;br /&gt;
&lt;br /&gt;
If you're compiling the svn trunk versions of CodeBlocks (or future versions) then the unix build has switched to autotools.  So first build wxWidgets as described above and then build CodeBlocks as follows:&lt;br /&gt;
&lt;br /&gt;
 ./bootstrap&lt;br /&gt;
&lt;br /&gt;
This sets up the configure script and its dependencies.  It only needs to be run once (after downloading the source from svn).  '''If you get errors like:'''&lt;br /&gt;
 aclocal:configure.in:61: warning: macro `AM_OPTIONS_WXCONFIG' not found in library&lt;br /&gt;
Then aclocal is having trouble finding the wxWidgets .m4 files.  You can do one of two things:&lt;br /&gt;
To just get bootstrap to find the path this time do:&lt;br /&gt;
&amp;lt;!-- *********** Bad syntax... removed 2006-08-28 by BentFX ****************************&lt;br /&gt;
 export ACLOCAL_FLAGS=&amp;quot;--acdir=`wx-config --prefix`/share/aclocal&amp;quot;&lt;br /&gt;
&lt;br /&gt;
: Note: The above command resulted in missing macros when running ./bootstrap for me. Setting an additional search path instead of overwriting like above worked for me. In case of missing macros try &lt;br /&gt;
***********************************************************************************--&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;export ACLOCAL_FLAGS=&amp;quot;-I `wx-config --prefix`/share/aclocal&amp;quot;&amp;lt;/pre&amp;gt; &amp;lt;!--[[User:Jabber|Jabber]] 06:24, 2 August 2006 (EDT)--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To change the aclocal search path more permanently do:&lt;br /&gt;
 echo `wx-config --prefix`/share/aclocal &amp;gt;&amp;gt; /usr/share/aclocal/dirlist&lt;br /&gt;
Then aclocal will also search somewhere like /opt/wx/2.6/share/aclocal&lt;br /&gt;
&lt;br /&gt;
'''Note for Ubuntu users:''' The above is not the correct way to fix the AM_* errors. Rather, you only need to install the package named &amp;quot;wx-common&amp;quot; (Universe repository).&lt;br /&gt;
&lt;br /&gt;
If you get something like&lt;br /&gt;
 The usual way to define `LIBTOOL' is to add `AC_PROG_LIBTOOL'&lt;br /&gt;
&lt;br /&gt;
it can be solved by something like: (adapt path, use `wx-config --prefix` is necessary)&lt;br /&gt;
&lt;br /&gt;
 ACLOCAL_FLAGS=&amp;quot;-I /usr/share/aclocal&amp;quot; ./bootstrap&lt;br /&gt;
&lt;br /&gt;
(*Note// '''If you run ./bootstrap and get errors like''':&lt;br /&gt;
 : bad interpreter: File not found&lt;br /&gt;
then there exists a problem with DOS line-endings. i had this error after i tried to build a  codeblocks from sources which were checked out with cvs on a windows machine. After i checked out a fresh copy of codeblocks from cvs under Ubuntu linux (see above topic: Downloading the latest source package fom SVN), all errors were gone. &lt;br /&gt;
//tiwag 051008*)&amp;lt;br&amp;gt;&lt;br /&gt;
Or, instead of downloading from SVN, you might consider using the little command line tool dos2unix, which normally comes with most distributions. //lizzarddude060103&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
If configure aborts with some unspecific error message(&amp;quot;.infig.status: error: cannot find input file: Makefile&amp;quot;), you might consider also running&lt;br /&gt;
 dos2unix bootstrap acinclude.m4 codeblocks.pc.in configure.in Makefile.am&lt;br /&gt;
before running bootstrap&lt;br /&gt;
&lt;br /&gt;
Once you've run the bootstrap script, installing is as simple as:&lt;br /&gt;
 ./configure&lt;br /&gt;
 make&lt;br /&gt;
 make install&lt;br /&gt;
&lt;br /&gt;
If you have multiple versions of wxWidgets installed or kept them inplace, you can use&lt;br /&gt;
./configure --with-wx-config=/path/to/wx-config&lt;br /&gt;
&lt;br /&gt;
To uninstall you can later run:&lt;br /&gt;
 make uninstall&lt;br /&gt;
&lt;br /&gt;
If you want to recompile everything, first run:&lt;br /&gt;
 make clean&lt;br /&gt;
 make distclean&lt;br /&gt;
 make clean-bin&lt;br /&gt;
 make clean-zipfiles&lt;br /&gt;
and then follow the above sequence for installing.&lt;br /&gt;
&lt;br /&gt;
By default, CodeBlocks will install to /usr/local.  If you want it in its own tree (so you can have multiple versions of CodeBlocks, each in its own subdirectory of /opt) replace the above ./configure command with:&lt;br /&gt;
 ./configure --prefix=/opt/codeblocks-svn&lt;br /&gt;
or similar.  Then you can later install a different build like:&lt;br /&gt;
 ./configure --prefix=/opt/codeblocks2-svn&lt;br /&gt;
followed by 'make &amp;amp;&amp;amp; make install' as usual.&lt;br /&gt;
&lt;br /&gt;
By default, CodeBlocks will not compile the contributed plugins from SVN.  If you want to compile / install them too, replace the above ./configure command with:&lt;br /&gt;
 ./configure --with-contrib-plugins=all&lt;br /&gt;
followed by 'make &amp;amp;&amp;amp; make install' as usual.&lt;br /&gt;
&lt;br /&gt;
To see a list of other options available for configuring the build of CodeBlocks do:&lt;br /&gt;
 ./configure --help&lt;br /&gt;
&lt;br /&gt;
To compile under gentoo, use&lt;br /&gt;
 ./configure --with-wx-config=wx-config-2.8&lt;br /&gt;
&lt;br /&gt;
====Resolving issues with Code::Blocks SVN====&lt;br /&gt;
&lt;br /&gt;
When running Code::Blocks after the installation it might happen, that the system complains:&lt;br /&gt;
 codeblocks: error while loading shared libraries: libcodeblocks.so.0: cannot open shared object file: No such file or directory&lt;br /&gt;
In that case make sure the library path where the Code::Blocks libraries where installed into is &amp;quot;known&amp;quot; to the system. For example: On Ubuntu using a default build process on a clean system will install the Code::Blocks executables to /use/local/bin and the libraries to /usr/local/lib. The latter is usually not known to a &amp;quot;clean&amp;quot; Ubuntu system. To add it to the search path for libraries do the following (as root / using sudo respectively):&lt;br /&gt;
Add the following line to the file /etc/ld.so.conf:&lt;br /&gt;
 /usr/local/lib&lt;br /&gt;
...and run:&lt;br /&gt;
 ldconfig&lt;br /&gt;
That's it - Code::Blocks should now work just fine as all libraries are being found.&lt;/div&gt;</summary>
		<author><name>Spacemonkey</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=Installing_Code::Blocks_from_source_on_Linux&amp;diff=6178</id>
		<title>Installing Code::Blocks from source on Linux</title>
		<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php?title=Installing_Code::Blocks_from_source_on_Linux&amp;diff=6178"/>
		<updated>2009-11-19T12:54:00Z</updated>

		<summary type="html">&lt;p&gt;Spacemonkey: &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;
These are instructions on how to build Code::Blocks under Linux. These instructions should work for all Linux distros, as we'll be installing from sources.&lt;br /&gt;
&lt;br /&gt;
===Prerequisites===&lt;br /&gt;
&lt;br /&gt;
In order to successfully compile Code::Blocks, the [http://en.wikipedia.org/wiki/WxWidgets wxWidgets] User Interface library &amp;lt;u&amp;gt;must be installed&amp;lt;/u&amp;gt;. For most Linux users, this is maybe the only dependency not already installed. wxWidget can be used directly on top of the X server, in this case the variant of the wxWidget library is called wxX11. However this library [http://wiki.wxwidgets.org/WxWidgets_Compared_To_Other_Toolkits#Why_You_Shouldn.27t_Use_wxWidgets &amp;quot;is sub-par compared to other toolkits and unstable&amp;quot;]. Hence Code::Blocks uses wxGTK, the version of wxWidget based on GTK+. The exact requirement is libwxGTK-2.8.0 or later (2.8.3 is not recommanded because of some troubles). This creates an additional dependency on GTK+, consider the following:&lt;br /&gt;
&lt;br /&gt;
A possible implementation which does not exist: &lt;br /&gt;
&lt;br /&gt;
''Code::Blocks  -&amp;gt;  xwWidget (libwxX11)  -&amp;gt;  X''&lt;br /&gt;
&lt;br /&gt;
Current Code::Blocks implementation: &lt;br /&gt;
&lt;br /&gt;
''Code::Blocks  -&amp;gt;  '''xwWidget (&amp;gt; libwxGTK2.8)'''  -&amp;gt;  '''GTK+ (&amp;gt; libgtk-x11-2.0)'''  -&amp;gt;  X''&lt;br /&gt;
&lt;br /&gt;
This document helps you to install libwxGTK if necessary but does not cover the installation of GTK+. GTK+ is probably installed on your Linux anyway, so don't worry ;)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
''Note:'' All the instructions below, assume an existing directory named &amp;lt;tt&amp;gt;~/devel&amp;lt;/tt&amp;gt;. If you 'll be using a different one, adjust the path to match.&lt;br /&gt;
As a first step create this directory:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;mkdir ~/devel&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Checking the presence of GTK+ library ===&lt;br /&gt;
&lt;br /&gt;
===wxGTK installation===&lt;br /&gt;
&lt;br /&gt;
==== Checking the presence of libwxGTK library ====&lt;br /&gt;
&lt;br /&gt;
====Getting wxGTK====&lt;br /&gt;
&lt;br /&gt;
Visit the [http://www.wxwidgets.org wxWidgets web site]. Click the &amp;quot;Download&amp;quot; button at the top of the page. Under wxWidgets 2.8.7 downloads, select wxGTK. Save the file in &amp;lt;tt&amp;gt;~/devel&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
====Uncompressing the wxGTK sources====&lt;br /&gt;
&lt;br /&gt;
After the download finishes, switch to &amp;lt;tt&amp;gt;~/devel&amp;lt;/tt&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;cd ~/devel&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, untar the wxGTK sources:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;tar zxf wxGTK-2.8.7.tar.gz&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Switch to the wxGTK directory&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;cd wxGTK-2.8.7&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====wxWidgets build====&lt;br /&gt;
&lt;br /&gt;
Here we will create a seperate build directory instead of building from the src directory, so that we can easily rebuild with different options (unicode / ansi, monolithic / many libs, etc).&lt;br /&gt;
&lt;br /&gt;
The documentation says the default is for gtk2 to use unicode and wx &amp;gt; 2.5 to build as a monolithic library.  This doesn't appear to be the case, so these flags are passed to configure.&lt;br /&gt;
&lt;br /&gt;
 mkdir build_gtk2_shared_monolithic_unicode&lt;br /&gt;
 cd build_gtk2_shared_monolithic_unicode&lt;br /&gt;
 ../configure --prefix=/opt/wx/2.8 \&lt;br /&gt;
        --enable-xrc \&lt;br /&gt;
        --enable-monolithic \&lt;br /&gt;
        --enable-unicode&lt;br /&gt;
 make&lt;br /&gt;
 su&lt;br /&gt;
 make install&lt;br /&gt;
 exit&lt;br /&gt;
&lt;br /&gt;
Add /opt/wx/2.8/bin to the PATH (if you're shell is bash then edit /etc/profile or ~/.bash_profile)&lt;br /&gt;
(On Suse 10.1 edit /etc/profile.local, it will only be available after a new login).  an example PATH&lt;br /&gt;
 export PATH=/usr/bin:/opt/wx/2.8/bin:$PATH&lt;br /&gt;
&lt;br /&gt;
'''Note:''' On Ubuntu Hoary it was necessary to check &amp;quot;Run command as login shell&amp;quot; &lt;br /&gt;
in the gnome-terminal profile-settings, otherwise the PATH changes are not available in a gnome-terminal window.&lt;br /&gt;
&lt;br /&gt;
add /opt/wx/2.8/lib to /etc/ld.so.conf (nano /etc/ld.so.conf)&lt;br /&gt;
then run:&lt;br /&gt;
 ldconfig&lt;br /&gt;
 source /etc/profile&lt;br /&gt;
&lt;br /&gt;
That's it.  Now the linker will look in /opt/wx/2.8/lib for wx libraries and you will have a monolithic shared library unicode build.&lt;br /&gt;
&lt;br /&gt;
To check that things are working, type:&lt;br /&gt;
 wx-config --prefix&lt;br /&gt;
which should give you /opt/wx/2.8&lt;br /&gt;
 wx-config --libs&lt;br /&gt;
which should have at least&lt;br /&gt;
 -L/opt/wx/2.8/lib -lwx_gtk2-2.8&lt;br /&gt;
but can contain other flags as well.&lt;br /&gt;
 which wx-config&lt;br /&gt;
should return /opt/wx/2.8/bin/wx-config&lt;br /&gt;
&lt;br /&gt;
===Code::Blocks installation===&lt;br /&gt;
&lt;br /&gt;
====Downloading Code::Blocks====&lt;br /&gt;
&lt;br /&gt;
You can get Code::Blocks source code in one way:&lt;br /&gt;
* Get the latest sources from the SVN repository.&lt;br /&gt;
This method is described below.&lt;br /&gt;
&lt;br /&gt;
=====Getting the latest sources from SVN=====&lt;br /&gt;
'''IMPORTANT NOTICE: The Sourceforge CVS is no longer used although it still exists'''&lt;br /&gt;
&lt;br /&gt;
Enter your development directory:&lt;br /&gt;
&amp;lt;pre&amp;gt;cd ~/devel&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then checkout the source using one of [https://www.codeblocks.org/downloads/7 these] methods.&lt;br /&gt;
&lt;br /&gt;
This will create the directory &amp;lt;tt&amp;gt;trunk&amp;lt;/tt&amp;gt;.&lt;br /&gt;
Change to the source code directory, by issuing the following command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;cd trunk&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Building Code::Blocks SVN====&lt;br /&gt;
If you are a Gentoo user, please see [[Compiling_Code::Blocks_in_Gentoo]].&lt;br /&gt;
&lt;br /&gt;
Before beginning, it is often a good idea to check you have recent versions of autoconf and automake - repositories versions are not always recent enough. (if you do not have automake, then you will get &amp;quot;cannot find aclocal&amp;quot; error).&lt;br /&gt;
&lt;br /&gt;
If you're compiling the svn trunk versions of CodeBlocks (or future versions) then the unix build has switched to autotools.  So first build wxWidgets as described above and then build CodeBlocks as follows:&lt;br /&gt;
&lt;br /&gt;
 ./bootstrap&lt;br /&gt;
&lt;br /&gt;
This sets up the configure script and its dependencies.  It only needs to be run once (after downloading the source from svn).  '''If you get errors like:'''&lt;br /&gt;
 aclocal:configure.in:61: warning: macro `AM_OPTIONS_WXCONFIG' not found in library&lt;br /&gt;
Then aclocal is having trouble finding the wxWidgets .m4 files.  You can do one of two things:&lt;br /&gt;
To just get bootstrap to find the path this time do:&lt;br /&gt;
&amp;lt;!-- *********** Bad syntax... removed 2006-08-28 by BentFX ****************************&lt;br /&gt;
 export ACLOCAL_FLAGS=&amp;quot;--acdir=`wx-config --prefix`/share/aclocal&amp;quot;&lt;br /&gt;
&lt;br /&gt;
: Note: The above command resulted in missing macros when running ./bootstrap for me. Setting an additional search path instead of overwriting like above worked for me. In case of missing macros try &lt;br /&gt;
***********************************************************************************--&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;export ACLOCAL_FLAGS=&amp;quot;-I `wx-config --prefix`/share/aclocal&amp;quot;&amp;lt;/pre&amp;gt; &amp;lt;!--[[User:Jabber|Jabber]] 06:24, 2 August 2006 (EDT)--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To change the aclocal search path more permanently do:&lt;br /&gt;
 echo `wx-config --prefix`/share/aclocal &amp;gt;&amp;gt; /usr/share/aclocal/dirlist&lt;br /&gt;
Then aclocal will also search somewhere like /opt/wx/2.6/share/aclocal&lt;br /&gt;
&lt;br /&gt;
'''Note for Ubuntu users:''' The above is not the correct way to fix the AM_* errors. Rather, you only need to install the package named &amp;quot;wx-common&amp;quot; (Universe repository).&lt;br /&gt;
&lt;br /&gt;
If you get something like&lt;br /&gt;
 The usual way to define `LIBTOOL' is to add `AC_PROG_LIBTOOL'&lt;br /&gt;
&lt;br /&gt;
it can be solved by something like: (adapt path, use `wx-config --prefix` is necessary)&lt;br /&gt;
&lt;br /&gt;
 ACLOCAL_FLAGS=&amp;quot;-I /usr/share/aclocal&amp;quot; ./bootstrap&lt;br /&gt;
&lt;br /&gt;
(*Note// '''If you run ./bootstrap and get errors like''':&lt;br /&gt;
 : bad interpreter: File not found&lt;br /&gt;
then there exists a problem with DOS line-endings. i had this error after i tried to build a  codeblocks from sources which were checked out with cvs on a windows machine. After i checked out a fresh copy of codeblocks from cvs under Ubuntu linux (see above topic: Downloading the latest source package fom SVN), all errors were gone. &lt;br /&gt;
//tiwag 051008*)&amp;lt;br&amp;gt;&lt;br /&gt;
Or, instead of downloading from SVN, you might consider using the little command line tool dos2unix, which normally comes with most distributions. //lizzarddude060103&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
If configure aborts with some unspecific error message(&amp;quot;.infig.status: error: cannot find input file: Makefile&amp;quot;), you might consider also running&lt;br /&gt;
 dos2unix bootstrap acinclude.m4 codeblocks.pc.in configure.in Makefile.am&lt;br /&gt;
before running bootstrap&lt;br /&gt;
&lt;br /&gt;
Once you've run the bootstrap script, installing is as simple as:&lt;br /&gt;
 ./configure&lt;br /&gt;
 make&lt;br /&gt;
 make install&lt;br /&gt;
&lt;br /&gt;
If you have multiple versions of wxWidgets installed or kept them inplace, you can use&lt;br /&gt;
./configure --with-wx-config=/path/to/wx-config&lt;br /&gt;
&lt;br /&gt;
To uninstall you can later run:&lt;br /&gt;
 make uninstall&lt;br /&gt;
&lt;br /&gt;
If you want to recompile everything, first run:&lt;br /&gt;
 make clean&lt;br /&gt;
 make distclean&lt;br /&gt;
 make clean-bin&lt;br /&gt;
 make clean-zipfiles&lt;br /&gt;
and then follow the above sequence for installing.&lt;br /&gt;
&lt;br /&gt;
By default, CodeBlocks will install to /usr/local.  If you want it in its own tree (so you can have multiple versions of CodeBlocks, each in its own subdirectory of /opt) replace the above ./configure command with:&lt;br /&gt;
 ./configure --prefix=/opt/codeblocks-svn&lt;br /&gt;
or similar.  Then you can later install a different build like:&lt;br /&gt;
 ./configure --prefix=/opt/codeblocks2-svn&lt;br /&gt;
followed by 'make &amp;amp;&amp;amp; make install' as usual.&lt;br /&gt;
&lt;br /&gt;
By default, CodeBlocks will not compile the contributed plugins from SVN.  If you want to compile / install them too, replace the above ./configure command with:&lt;br /&gt;
 ./configure --with-contrib-plugins=all&lt;br /&gt;
followed by 'make &amp;amp;&amp;amp; make install' as usual.&lt;br /&gt;
&lt;br /&gt;
To see a list of other options available for configuring the build of CodeBlocks do:&lt;br /&gt;
 ./configure --help&lt;br /&gt;
&lt;br /&gt;
To compile under gentoo, use&lt;br /&gt;
 ./configure --with-wx-config=wx-config-2.8&lt;br /&gt;
&lt;br /&gt;
====Resolving issues with Code::Blocks SVN====&lt;br /&gt;
&lt;br /&gt;
When running Code::Blocks after the installation it might happen, that the system complains:&lt;br /&gt;
 codeblocks: error while loading shared libraries: libcodeblocks.so.0: cannot open shared object file: No such file or directory&lt;br /&gt;
In that case make sure the library path where the Code::Blocks libraries where installed into is &amp;quot;known&amp;quot; to the system. For example: On Ubuntu using a default build process on a clean system will install the Code::Blocks executables to /use/local/bin and the libraries to /usr/local/lib. The latter is usually not known to a &amp;quot;clean&amp;quot; Ubuntu system. To add it to the search path for libraries do the following (as root / using sudo respectively):&lt;br /&gt;
Add the following line to the file /etc/ld.so.conf:&lt;br /&gt;
 /usr/local/lib&lt;br /&gt;
...and run:&lt;br /&gt;
 ldconfig&lt;br /&gt;
That's it - Code::Blocks should now work just fine as all libraries are being found.&lt;/div&gt;</summary>
		<author><name>Spacemonkey</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=Installing_Code::Blocks_from_source_on_Linux&amp;diff=6177</id>
		<title>Installing Code::Blocks from source on Linux</title>
		<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php?title=Installing_Code::Blocks_from_source_on_Linux&amp;diff=6177"/>
		<updated>2009-11-19T12:52:21Z</updated>

		<summary type="html">&lt;p&gt;Spacemonkey: &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;
These are instructions on how to build Code::Blocks under Linux. These instructions should work for all Linux distros, as we'll be installing from sources.&lt;br /&gt;
&lt;br /&gt;
===Prerequisites===&lt;br /&gt;
&lt;br /&gt;
In order to successfully compile Code::Blocks, the [http://en.wikipedia.org/wiki/WxWidgets wxWidgets] User Interface library &amp;lt;u&amp;gt;must be installed&amp;lt;/u&amp;gt;. For most Linux users, this is maybe the only dependency not already installed. wxWidget can be used directly on top of the X server, in this case the variant of the wxWidget library is called wxX11. However this library [http://wiki.wxwidgets.org/WxWidgets_Compared_To_Other_Toolkits#Why_You_Shouldn.27t_Use_wxWidgets &amp;quot;is sub-par compared to other toolkits and unstable&amp;quot;]. Hence Code::Blocks uses wxGTK, the version of wxWidget based on GTK+. The exact requirement is libwxGTK-2.8.0 or later (2.8.3 is not recommanded because of some troubles). This creates an additional dependency on GTK+, consider the following:&lt;br /&gt;
&lt;br /&gt;
A possible implementation which does not exist: &lt;br /&gt;
&lt;br /&gt;
''Code::Blocks  -&amp;gt;  xwWidget (libwxX11)  -&amp;gt;  X''&lt;br /&gt;
&lt;br /&gt;
Current Code::Blocks implementation: &lt;br /&gt;
&lt;br /&gt;
''Code::Blocks  -&amp;gt;  '''xwWidget (&amp;gt; libwxGTK2.8)'''  -&amp;gt;  '''GTK+ (&amp;gt; libgtk-x11-2.0)'''  -&amp;gt;  X''&lt;br /&gt;
&lt;br /&gt;
This document helps you to install libwxGTK if necessary but does not cover the installation of GTK+. GTK+ is probably installed on your Linux anyway, so don't worry ;)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
''Note:'' All the instructions below, assume an existing directory named &amp;lt;tt&amp;gt;~/devel&amp;lt;/tt&amp;gt;. If you 'll be using a different one, adjust the path to match.&lt;br /&gt;
As a first step create this directory:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;mkdir ~/devel&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===wxGTK installation===&lt;br /&gt;
&lt;br /&gt;
==== Checking the presence of GTK+ 2.0 library ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Getting wxGTK====&lt;br /&gt;
&lt;br /&gt;
Visit the [http://www.wxwidgets.org wxWidgets web site]. Click the &amp;quot;Download&amp;quot; button at the top of the page. Under wxWidgets 2.8.7 downloads, select wxGTK. Save the file in &amp;lt;tt&amp;gt;~/devel&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
====Uncompressing the wxGTK sources====&lt;br /&gt;
&lt;br /&gt;
After the download finishes, switch to &amp;lt;tt&amp;gt;~/devel&amp;lt;/tt&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;cd ~/devel&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, untar the wxGTK sources:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;tar zxf wxGTK-2.8.7.tar.gz&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Switch to the wxGTK directory&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;cd wxGTK-2.8.7&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====wxWidgets build====&lt;br /&gt;
&lt;br /&gt;
Here we will create a seperate build directory instead of building from the src directory, so that we can easily rebuild with different options (unicode / ansi, monolithic / many libs, etc).&lt;br /&gt;
&lt;br /&gt;
The documentation says the default is for gtk2 to use unicode and wx &amp;gt; 2.5 to build as a monolithic library.  This doesn't appear to be the case, so these flags are passed to configure.&lt;br /&gt;
&lt;br /&gt;
 mkdir build_gtk2_shared_monolithic_unicode&lt;br /&gt;
 cd build_gtk2_shared_monolithic_unicode&lt;br /&gt;
 ../configure --prefix=/opt/wx/2.8 \&lt;br /&gt;
        --enable-xrc \&lt;br /&gt;
        --enable-monolithic \&lt;br /&gt;
        --enable-unicode&lt;br /&gt;
 make&lt;br /&gt;
 su&lt;br /&gt;
 make install&lt;br /&gt;
 exit&lt;br /&gt;
&lt;br /&gt;
Add /opt/wx/2.8/bin to the PATH (if you're shell is bash then edit /etc/profile or ~/.bash_profile)&lt;br /&gt;
(On Suse 10.1 edit /etc/profile.local, it will only be available after a new login).  an example PATH&lt;br /&gt;
 export PATH=/usr/bin:/opt/wx/2.8/bin:$PATH&lt;br /&gt;
&lt;br /&gt;
'''Note:''' On Ubuntu Hoary it was necessary to check &amp;quot;Run command as login shell&amp;quot; &lt;br /&gt;
in the gnome-terminal profile-settings, otherwise the PATH changes are not available in a gnome-terminal window.&lt;br /&gt;
&lt;br /&gt;
add /opt/wx/2.8/lib to /etc/ld.so.conf (nano /etc/ld.so.conf)&lt;br /&gt;
then run:&lt;br /&gt;
 ldconfig&lt;br /&gt;
 source /etc/profile&lt;br /&gt;
&lt;br /&gt;
That's it.  Now the linker will look in /opt/wx/2.8/lib for wx libraries and you will have a monolithic shared library unicode build.&lt;br /&gt;
&lt;br /&gt;
To check that things are working, type:&lt;br /&gt;
 wx-config --prefix&lt;br /&gt;
which should give you /opt/wx/2.8&lt;br /&gt;
 wx-config --libs&lt;br /&gt;
which should have at least&lt;br /&gt;
 -L/opt/wx/2.8/lib -lwx_gtk2-2.8&lt;br /&gt;
but can contain other flags as well.&lt;br /&gt;
 which wx-config&lt;br /&gt;
should return /opt/wx/2.8/bin/wx-config&lt;br /&gt;
&lt;br /&gt;
===Code::Blocks installation===&lt;br /&gt;
&lt;br /&gt;
====Downloading Code::Blocks====&lt;br /&gt;
&lt;br /&gt;
You can get Code::Blocks source code in one way:&lt;br /&gt;
* Get the latest sources from the SVN repository.&lt;br /&gt;
This method is described below.&lt;br /&gt;
&lt;br /&gt;
=====Getting the latest sources from SVN=====&lt;br /&gt;
'''IMPORTANT NOTICE: The Sourceforge CVS is no longer used although it still exists'''&lt;br /&gt;
&lt;br /&gt;
Enter your development directory:&lt;br /&gt;
&amp;lt;pre&amp;gt;cd ~/devel&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then checkout the source using one of [https://www.codeblocks.org/downloads/7 these] methods.&lt;br /&gt;
&lt;br /&gt;
This will create the directory &amp;lt;tt&amp;gt;trunk&amp;lt;/tt&amp;gt;.&lt;br /&gt;
Change to the source code directory, by issuing the following command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;cd trunk&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Building Code::Blocks SVN====&lt;br /&gt;
If you are a Gentoo user, please see [[Compiling_Code::Blocks_in_Gentoo]].&lt;br /&gt;
&lt;br /&gt;
Before beginning, it is often a good idea to check you have recent versions of autoconf and automake - repositories versions are not always recent enough. (if you do not have automake, then you will get &amp;quot;cannot find aclocal&amp;quot; error).&lt;br /&gt;
&lt;br /&gt;
If you're compiling the svn trunk versions of CodeBlocks (or future versions) then the unix build has switched to autotools.  So first build wxWidgets as described above and then build CodeBlocks as follows:&lt;br /&gt;
&lt;br /&gt;
 ./bootstrap&lt;br /&gt;
&lt;br /&gt;
This sets up the configure script and its dependencies.  It only needs to be run once (after downloading the source from svn).  '''If you get errors like:'''&lt;br /&gt;
 aclocal:configure.in:61: warning: macro `AM_OPTIONS_WXCONFIG' not found in library&lt;br /&gt;
Then aclocal is having trouble finding the wxWidgets .m4 files.  You can do one of two things:&lt;br /&gt;
To just get bootstrap to find the path this time do:&lt;br /&gt;
&amp;lt;!-- *********** Bad syntax... removed 2006-08-28 by BentFX ****************************&lt;br /&gt;
 export ACLOCAL_FLAGS=&amp;quot;--acdir=`wx-config --prefix`/share/aclocal&amp;quot;&lt;br /&gt;
&lt;br /&gt;
: Note: The above command resulted in missing macros when running ./bootstrap for me. Setting an additional search path instead of overwriting like above worked for me. In case of missing macros try &lt;br /&gt;
***********************************************************************************--&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;export ACLOCAL_FLAGS=&amp;quot;-I `wx-config --prefix`/share/aclocal&amp;quot;&amp;lt;/pre&amp;gt; &amp;lt;!--[[User:Jabber|Jabber]] 06:24, 2 August 2006 (EDT)--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To change the aclocal search path more permanently do:&lt;br /&gt;
 echo `wx-config --prefix`/share/aclocal &amp;gt;&amp;gt; /usr/share/aclocal/dirlist&lt;br /&gt;
Then aclocal will also search somewhere like /opt/wx/2.6/share/aclocal&lt;br /&gt;
&lt;br /&gt;
'''Note for Ubuntu users:''' The above is not the correct way to fix the AM_* errors. Rather, you only need to install the package named &amp;quot;wx-common&amp;quot; (Universe repository).&lt;br /&gt;
&lt;br /&gt;
If you get something like&lt;br /&gt;
 The usual way to define `LIBTOOL' is to add `AC_PROG_LIBTOOL'&lt;br /&gt;
&lt;br /&gt;
it can be solved by something like: (adapt path, use `wx-config --prefix` is necessary)&lt;br /&gt;
&lt;br /&gt;
 ACLOCAL_FLAGS=&amp;quot;-I /usr/share/aclocal&amp;quot; ./bootstrap&lt;br /&gt;
&lt;br /&gt;
(*Note// '''If you run ./bootstrap and get errors like''':&lt;br /&gt;
 : bad interpreter: File not found&lt;br /&gt;
then there exists a problem with DOS line-endings. i had this error after i tried to build a  codeblocks from sources which were checked out with cvs on a windows machine. After i checked out a fresh copy of codeblocks from cvs under Ubuntu linux (see above topic: Downloading the latest source package fom SVN), all errors were gone. &lt;br /&gt;
//tiwag 051008*)&amp;lt;br&amp;gt;&lt;br /&gt;
Or, instead of downloading from SVN, you might consider using the little command line tool dos2unix, which normally comes with most distributions. //lizzarddude060103&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
If configure aborts with some unspecific error message(&amp;quot;.infig.status: error: cannot find input file: Makefile&amp;quot;), you might consider also running&lt;br /&gt;
 dos2unix bootstrap acinclude.m4 codeblocks.pc.in configure.in Makefile.am&lt;br /&gt;
before running bootstrap&lt;br /&gt;
&lt;br /&gt;
Once you've run the bootstrap script, installing is as simple as:&lt;br /&gt;
 ./configure&lt;br /&gt;
 make&lt;br /&gt;
 make install&lt;br /&gt;
&lt;br /&gt;
If you have multiple versions of wxWidgets installed or kept them inplace, you can use&lt;br /&gt;
./configure --with-wx-config=/path/to/wx-config&lt;br /&gt;
&lt;br /&gt;
To uninstall you can later run:&lt;br /&gt;
 make uninstall&lt;br /&gt;
&lt;br /&gt;
If you want to recompile everything, first run:&lt;br /&gt;
 make clean&lt;br /&gt;
 make distclean&lt;br /&gt;
 make clean-bin&lt;br /&gt;
 make clean-zipfiles&lt;br /&gt;
and then follow the above sequence for installing.&lt;br /&gt;
&lt;br /&gt;
By default, CodeBlocks will install to /usr/local.  If you want it in its own tree (so you can have multiple versions of CodeBlocks, each in its own subdirectory of /opt) replace the above ./configure command with:&lt;br /&gt;
 ./configure --prefix=/opt/codeblocks-svn&lt;br /&gt;
or similar.  Then you can later install a different build like:&lt;br /&gt;
 ./configure --prefix=/opt/codeblocks2-svn&lt;br /&gt;
followed by 'make &amp;amp;&amp;amp; make install' as usual.&lt;br /&gt;
&lt;br /&gt;
By default, CodeBlocks will not compile the contributed plugins from SVN.  If you want to compile / install them too, replace the above ./configure command with:&lt;br /&gt;
 ./configure --with-contrib-plugins=all&lt;br /&gt;
followed by 'make &amp;amp;&amp;amp; make install' as usual.&lt;br /&gt;
&lt;br /&gt;
To see a list of other options available for configuring the build of CodeBlocks do:&lt;br /&gt;
 ./configure --help&lt;br /&gt;
&lt;br /&gt;
To compile under gentoo, use&lt;br /&gt;
 ./configure --with-wx-config=wx-config-2.8&lt;br /&gt;
&lt;br /&gt;
====Resolving issues with Code::Blocks SVN====&lt;br /&gt;
&lt;br /&gt;
When running Code::Blocks after the installation it might happen, that the system complains:&lt;br /&gt;
 codeblocks: error while loading shared libraries: libcodeblocks.so.0: cannot open shared object file: No such file or directory&lt;br /&gt;
In that case make sure the library path where the Code::Blocks libraries where installed into is &amp;quot;known&amp;quot; to the system. For example: On Ubuntu using a default build process on a clean system will install the Code::Blocks executables to /use/local/bin and the libraries to /usr/local/lib. The latter is usually not known to a &amp;quot;clean&amp;quot; Ubuntu system. To add it to the search path for libraries do the following (as root / using sudo respectively):&lt;br /&gt;
Add the following line to the file /etc/ld.so.conf:&lt;br /&gt;
 /usr/local/lib&lt;br /&gt;
...and run:&lt;br /&gt;
 ldconfig&lt;br /&gt;
That's it - Code::Blocks should now work just fine as all libraries are being found.&lt;/div&gt;</summary>
		<author><name>Spacemonkey</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=Installing_Code::Blocks_from_source_on_Linux&amp;diff=6176</id>
		<title>Installing Code::Blocks from source on Linux</title>
		<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php?title=Installing_Code::Blocks_from_source_on_Linux&amp;diff=6176"/>
		<updated>2009-11-19T12:51:40Z</updated>

		<summary type="html">&lt;p&gt;Spacemonkey: &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;
These are instructions on how to build Code::Blocks under Linux. These instructions should work for all Linux distros, as we'll be installing from sources.&lt;br /&gt;
&lt;br /&gt;
===Prerequisites===&lt;br /&gt;
&lt;br /&gt;
In order to successfully compile Code::Blocks, the [http://en.wikipedia.org/wiki/WxWidgets wxWidgets] User Interface library &amp;lt;u&amp;gt;must be installed&amp;lt;/u&amp;gt;. For most Linux users, this is maybe the only dependency not already installed. wxWidget can be used directly on top of the X server, in this case the variant of the wxWidget library is called wxX11. However this library [http://wiki.wxwidgets.org/WxWidgets_Compared_To_Other_Toolkits#Why_You_Shouldn.27t_Use_wxWidgets &amp;quot;is sub-par compared to other toolkits and unstable&amp;quot;]. Hence Code::Blocks uses wxGTK, the version of wxWidget based on GTK+. The exact requirement is libwxGTK-2.8.0 or later (2.8.3 is not recommanded because of some troubles). This creates an additional dependency on GTK+, consider the following:&lt;br /&gt;
&lt;br /&gt;
A possible implementation which does not exist: &lt;br /&gt;
&lt;br /&gt;
''Code::Blocks  -&amp;gt;  xwWidget (libwxX11)  -&amp;gt;  X''&lt;br /&gt;
&lt;br /&gt;
Current Code::Blocks implementation: &lt;br /&gt;
&lt;br /&gt;
''Code::Blocks  -&amp;gt;  '''xwWidget (&amp;gt; libwxGTK2.8)'''  -&amp;gt;  '''GTK+ (&amp;gt; libgtk-x11-2.0)'''  -&amp;gt;  X''&lt;br /&gt;
&lt;br /&gt;
This document helps you to install libwxGTK if necessary but does not cover the installation of GTK+. GTK+ is probably installed on your Linux anyway, so don't worry ;)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
''Note:'' All the instructions below, assume an existing directory named &amp;lt;tt&amp;gt;~/devel&amp;lt;/tt&amp;gt;. If you 'll be using a different one, adjust the path to match.&lt;br /&gt;
As a first step create this directory:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;mkdir ~/devel&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===wxGTK installation===&lt;br /&gt;
&lt;br /&gt;
=== Checking the presence of GTK+ 2.0 library ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Getting wxGTK====&lt;br /&gt;
&lt;br /&gt;
Visit the [http://www.wxwidgets.org wxWidgets web site]. Click the &amp;quot;Download&amp;quot; button at the top of the page. Under wxWidgets 2.8.7 downloads, select wxGTK. Save the file in &amp;lt;tt&amp;gt;~/devel&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
====Uncompressing the wxGTK sources====&lt;br /&gt;
&lt;br /&gt;
After the download finishes, switch to &amp;lt;tt&amp;gt;~/devel&amp;lt;/tt&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;cd ~/devel&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, untar the wxGTK sources:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;tar zxf wxGTK-2.8.7.tar.gz&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Switch to the wxGTK directory&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;cd wxGTK-2.8.7&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====wxWidgets build====&lt;br /&gt;
&lt;br /&gt;
Here we will create a seperate build directory instead of building from the src directory, so that we can easily rebuild with different options (unicode / ansi, monolithic / many libs, etc).&lt;br /&gt;
&lt;br /&gt;
The documentation says the default is for gtk2 to use unicode and wx &amp;gt; 2.5 to build as a monolithic library.  This doesn't appear to be the case, so these flags are passed to configure.&lt;br /&gt;
&lt;br /&gt;
 mkdir build_gtk2_shared_monolithic_unicode&lt;br /&gt;
 cd build_gtk2_shared_monolithic_unicode&lt;br /&gt;
 ../configure --prefix=/opt/wx/2.8 \&lt;br /&gt;
        --enable-xrc \&lt;br /&gt;
        --enable-monolithic \&lt;br /&gt;
        --enable-unicode&lt;br /&gt;
 make&lt;br /&gt;
 su&lt;br /&gt;
 make install&lt;br /&gt;
 exit&lt;br /&gt;
&lt;br /&gt;
Add /opt/wx/2.8/bin to the PATH (if you're shell is bash then edit /etc/profile or ~/.bash_profile)&lt;br /&gt;
(On Suse 10.1 edit /etc/profile.local, it will only be available after a new login).  an example PATH&lt;br /&gt;
 export PATH=/usr/bin:/opt/wx/2.8/bin:$PATH&lt;br /&gt;
&lt;br /&gt;
'''Note:''' On Ubuntu Hoary it was necessary to check &amp;quot;Run command as login shell&amp;quot; &lt;br /&gt;
in the gnome-terminal profile-settings, otherwise the PATH changes are not available in a gnome-terminal window.&lt;br /&gt;
&lt;br /&gt;
add /opt/wx/2.8/lib to /etc/ld.so.conf (nano /etc/ld.so.conf)&lt;br /&gt;
then run:&lt;br /&gt;
 ldconfig&lt;br /&gt;
 source /etc/profile&lt;br /&gt;
&lt;br /&gt;
That's it.  Now the linker will look in /opt/wx/2.8/lib for wx libraries and you will have a monolithic shared library unicode build.&lt;br /&gt;
&lt;br /&gt;
To check that things are working, type:&lt;br /&gt;
 wx-config --prefix&lt;br /&gt;
which should give you /opt/wx/2.8&lt;br /&gt;
 wx-config --libs&lt;br /&gt;
which should have at least&lt;br /&gt;
 -L/opt/wx/2.8/lib -lwx_gtk2-2.8&lt;br /&gt;
but can contain other flags as well.&lt;br /&gt;
 which wx-config&lt;br /&gt;
should return /opt/wx/2.8/bin/wx-config&lt;br /&gt;
&lt;br /&gt;
===Code::Blocks installation===&lt;br /&gt;
&lt;br /&gt;
====Downloading Code::Blocks====&lt;br /&gt;
&lt;br /&gt;
You can get Code::Blocks source code in one way:&lt;br /&gt;
* Get the latest sources from the SVN repository.&lt;br /&gt;
This method is described below.&lt;br /&gt;
&lt;br /&gt;
=====Getting the latest sources from SVN=====&lt;br /&gt;
'''IMPORTANT NOTICE: The Sourceforge CVS is no longer used although it still exists'''&lt;br /&gt;
&lt;br /&gt;
Enter your development directory:&lt;br /&gt;
&amp;lt;pre&amp;gt;cd ~/devel&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then checkout the source using one of [https://www.codeblocks.org/downloads/7 these] methods.&lt;br /&gt;
&lt;br /&gt;
This will create the directory &amp;lt;tt&amp;gt;trunk&amp;lt;/tt&amp;gt;.&lt;br /&gt;
Change to the source code directory, by issuing the following command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;cd trunk&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Building Code::Blocks SVN====&lt;br /&gt;
If you are a Gentoo user, please see [[Compiling_Code::Blocks_in_Gentoo]].&lt;br /&gt;
&lt;br /&gt;
Before beginning, it is often a good idea to check you have recent versions of autoconf and automake - repositories versions are not always recent enough. (if you do not have automake, then you will get &amp;quot;cannot find aclocal&amp;quot; error).&lt;br /&gt;
&lt;br /&gt;
If you're compiling the svn trunk versions of CodeBlocks (or future versions) then the unix build has switched to autotools.  So first build wxWidgets as described above and then build CodeBlocks as follows:&lt;br /&gt;
&lt;br /&gt;
 ./bootstrap&lt;br /&gt;
&lt;br /&gt;
This sets up the configure script and its dependencies.  It only needs to be run once (after downloading the source from svn).  '''If you get errors like:'''&lt;br /&gt;
 aclocal:configure.in:61: warning: macro `AM_OPTIONS_WXCONFIG' not found in library&lt;br /&gt;
Then aclocal is having trouble finding the wxWidgets .m4 files.  You can do one of two things:&lt;br /&gt;
To just get bootstrap to find the path this time do:&lt;br /&gt;
&amp;lt;!-- *********** Bad syntax... removed 2006-08-28 by BentFX ****************************&lt;br /&gt;
 export ACLOCAL_FLAGS=&amp;quot;--acdir=`wx-config --prefix`/share/aclocal&amp;quot;&lt;br /&gt;
&lt;br /&gt;
: Note: The above command resulted in missing macros when running ./bootstrap for me. Setting an additional search path instead of overwriting like above worked for me. In case of missing macros try &lt;br /&gt;
***********************************************************************************--&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;export ACLOCAL_FLAGS=&amp;quot;-I `wx-config --prefix`/share/aclocal&amp;quot;&amp;lt;/pre&amp;gt; &amp;lt;!--[[User:Jabber|Jabber]] 06:24, 2 August 2006 (EDT)--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To change the aclocal search path more permanently do:&lt;br /&gt;
 echo `wx-config --prefix`/share/aclocal &amp;gt;&amp;gt; /usr/share/aclocal/dirlist&lt;br /&gt;
Then aclocal will also search somewhere like /opt/wx/2.6/share/aclocal&lt;br /&gt;
&lt;br /&gt;
'''Note for Ubuntu users:''' The above is not the correct way to fix the AM_* errors. Rather, you only need to install the package named &amp;quot;wx-common&amp;quot; (Universe repository).&lt;br /&gt;
&lt;br /&gt;
If you get something like&lt;br /&gt;
 The usual way to define `LIBTOOL' is to add `AC_PROG_LIBTOOL'&lt;br /&gt;
&lt;br /&gt;
it can be solved by something like: (adapt path, use `wx-config --prefix` is necessary)&lt;br /&gt;
&lt;br /&gt;
 ACLOCAL_FLAGS=&amp;quot;-I /usr/share/aclocal&amp;quot; ./bootstrap&lt;br /&gt;
&lt;br /&gt;
(*Note// '''If you run ./bootstrap and get errors like''':&lt;br /&gt;
 : bad interpreter: File not found&lt;br /&gt;
then there exists a problem with DOS line-endings. i had this error after i tried to build a  codeblocks from sources which were checked out with cvs on a windows machine. After i checked out a fresh copy of codeblocks from cvs under Ubuntu linux (see above topic: Downloading the latest source package fom SVN), all errors were gone. &lt;br /&gt;
//tiwag 051008*)&amp;lt;br&amp;gt;&lt;br /&gt;
Or, instead of downloading from SVN, you might consider using the little command line tool dos2unix, which normally comes with most distributions. //lizzarddude060103&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
If configure aborts with some unspecific error message(&amp;quot;.infig.status: error: cannot find input file: Makefile&amp;quot;), you might consider also running&lt;br /&gt;
 dos2unix bootstrap acinclude.m4 codeblocks.pc.in configure.in Makefile.am&lt;br /&gt;
before running bootstrap&lt;br /&gt;
&lt;br /&gt;
Once you've run the bootstrap script, installing is as simple as:&lt;br /&gt;
 ./configure&lt;br /&gt;
 make&lt;br /&gt;
 make install&lt;br /&gt;
&lt;br /&gt;
If you have multiple versions of wxWidgets installed or kept them inplace, you can use&lt;br /&gt;
./configure --with-wx-config=/path/to/wx-config&lt;br /&gt;
&lt;br /&gt;
To uninstall you can later run:&lt;br /&gt;
 make uninstall&lt;br /&gt;
&lt;br /&gt;
If you want to recompile everything, first run:&lt;br /&gt;
 make clean&lt;br /&gt;
 make distclean&lt;br /&gt;
 make clean-bin&lt;br /&gt;
 make clean-zipfiles&lt;br /&gt;
and then follow the above sequence for installing.&lt;br /&gt;
&lt;br /&gt;
By default, CodeBlocks will install to /usr/local.  If you want it in its own tree (so you can have multiple versions of CodeBlocks, each in its own subdirectory of /opt) replace the above ./configure command with:&lt;br /&gt;
 ./configure --prefix=/opt/codeblocks-svn&lt;br /&gt;
or similar.  Then you can later install a different build like:&lt;br /&gt;
 ./configure --prefix=/opt/codeblocks2-svn&lt;br /&gt;
followed by 'make &amp;amp;&amp;amp; make install' as usual.&lt;br /&gt;
&lt;br /&gt;
By default, CodeBlocks will not compile the contributed plugins from SVN.  If you want to compile / install them too, replace the above ./configure command with:&lt;br /&gt;
 ./configure --with-contrib-plugins=all&lt;br /&gt;
followed by 'make &amp;amp;&amp;amp; make install' as usual.&lt;br /&gt;
&lt;br /&gt;
To see a list of other options available for configuring the build of CodeBlocks do:&lt;br /&gt;
 ./configure --help&lt;br /&gt;
&lt;br /&gt;
To compile under gentoo, use&lt;br /&gt;
 ./configure --with-wx-config=wx-config-2.8&lt;br /&gt;
&lt;br /&gt;
====Resolving issues with Code::Blocks SVN====&lt;br /&gt;
&lt;br /&gt;
When running Code::Blocks after the installation it might happen, that the system complains:&lt;br /&gt;
 codeblocks: error while loading shared libraries: libcodeblocks.so.0: cannot open shared object file: No such file or directory&lt;br /&gt;
In that case make sure the library path where the Code::Blocks libraries where installed into is &amp;quot;known&amp;quot; to the system. For example: On Ubuntu using a default build process on a clean system will install the Code::Blocks executables to /use/local/bin and the libraries to /usr/local/lib. The latter is usually not known to a &amp;quot;clean&amp;quot; Ubuntu system. To add it to the search path for libraries do the following (as root / using sudo respectively):&lt;br /&gt;
Add the following line to the file /etc/ld.so.conf:&lt;br /&gt;
 /usr/local/lib&lt;br /&gt;
...and run:&lt;br /&gt;
 ldconfig&lt;br /&gt;
That's it - Code::Blocks should now work just fine as all libraries are being found.&lt;/div&gt;</summary>
		<author><name>Spacemonkey</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=Installing_Code::Blocks_from_source_on_Linux&amp;diff=6175</id>
		<title>Installing Code::Blocks from source on Linux</title>
		<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php?title=Installing_Code::Blocks_from_source_on_Linux&amp;diff=6175"/>
		<updated>2009-11-19T12:48:54Z</updated>

		<summary type="html">&lt;p&gt;Spacemonkey: /* Prerequisites */&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;
These are instructions on how to build Code::Blocks under Linux. These instructions should work for all Linux distros, as we'll be installing from sources.&lt;br /&gt;
&lt;br /&gt;
===Prerequisites===&lt;br /&gt;
&lt;br /&gt;
In order to successfully compile Code::Blocks, the [http://en.wikipedia.org/wiki/WxWidgets wxWidgets] User Interface library &amp;lt;u&amp;gt;must be installed&amp;lt;/u&amp;gt;. For most Linux users, this is maybe the only dependency not already installed. wxWidget can be used directly on top of the X server, in this case the variant of the wxWidget library is called wxX11. However this library [http://wiki.wxwidgets.org/WxWidgets_Compared_To_Other_Toolkits#Why_You_Shouldn.27t_Use_wxWidgets &amp;quot;is sub-par compared to other toolkits and unstable&amp;quot;]. Hence Code::Blocks uses wxGTK, the version of wxWidget based on GTK+. The exact requirement is libwxGTK-2.8.0 or later (2.8.3 is not recommanded because of some troubles). This creates an additional dependency on GTK+, consider the following:&lt;br /&gt;
&lt;br /&gt;
A possible implementation which does not exist: &lt;br /&gt;
&lt;br /&gt;
''Code::Blocks  -&amp;gt;  xwWidget (libwxX11)  -&amp;gt;  X''&lt;br /&gt;
&lt;br /&gt;
Current Code::Blocks implementation: &lt;br /&gt;
&lt;br /&gt;
''Code::Blocks  -&amp;gt;  '''xwWidget (&amp;gt; libwxGTK2.8)'''  -&amp;gt;  '''GTK+ (&amp;gt; libgtk-x11-2.0)'''  -&amp;gt;  X''&lt;br /&gt;
&lt;br /&gt;
This document helps you to install libwxGTK if necessary but does not cover the installation of GTK+. GTK+ is probably installed on your Linux anyway, so don't worry ;)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
''Note:'' All the instructions below, assume an existing directory named &amp;lt;tt&amp;gt;~/devel&amp;lt;/tt&amp;gt;. If you 'll be using a different one, adjust the path to match.&lt;br /&gt;
As a first step create this directory:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;mkdir ~/devel&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===wxGTK installation===&lt;br /&gt;
&lt;br /&gt;
====Getting wxGTK====&lt;br /&gt;
&lt;br /&gt;
Visit the [http://www.wxwidgets.org wxWidgets web site]. Click the &amp;quot;Download&amp;quot; button at the top of the page. Under wxWidgets 2.8.7 downloads, select wxGTK. Save the file in &amp;lt;tt&amp;gt;~/devel&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
====Uncompressing the wxGTK sources====&lt;br /&gt;
&lt;br /&gt;
After the download finishes, switch to &amp;lt;tt&amp;gt;~/devel&amp;lt;/tt&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;cd ~/devel&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, untar the wxGTK sources:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;tar zxf wxGTK-2.8.7.tar.gz&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Switch to the wxGTK directory&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;cd wxGTK-2.8.7&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====wxWidgets build====&lt;br /&gt;
&lt;br /&gt;
Here we will create a seperate build directory instead of building from the src directory, so that we can easily rebuild with different options (unicode / ansi, monolithic / many libs, etc).&lt;br /&gt;
&lt;br /&gt;
The documentation says the default is for gtk2 to use unicode and wx &amp;gt; 2.5 to build as a monolithic library.  This doesn't appear to be the case, so these flags are passed to configure.&lt;br /&gt;
&lt;br /&gt;
 mkdir build_gtk2_shared_monolithic_unicode&lt;br /&gt;
 cd build_gtk2_shared_monolithic_unicode&lt;br /&gt;
 ../configure --prefix=/opt/wx/2.8 \&lt;br /&gt;
        --enable-xrc \&lt;br /&gt;
        --enable-monolithic \&lt;br /&gt;
        --enable-unicode&lt;br /&gt;
 make&lt;br /&gt;
 su&lt;br /&gt;
 make install&lt;br /&gt;
 exit&lt;br /&gt;
&lt;br /&gt;
Add /opt/wx/2.8/bin to the PATH (if you're shell is bash then edit /etc/profile or ~/.bash_profile)&lt;br /&gt;
(On Suse 10.1 edit /etc/profile.local, it will only be available after a new login).  an example PATH&lt;br /&gt;
 export PATH=/usr/bin:/opt/wx/2.8/bin:$PATH&lt;br /&gt;
&lt;br /&gt;
'''Note:''' On Ubuntu Hoary it was necessary to check &amp;quot;Run command as login shell&amp;quot; &lt;br /&gt;
in the gnome-terminal profile-settings, otherwise the PATH changes are not available in a gnome-terminal window.&lt;br /&gt;
&lt;br /&gt;
add /opt/wx/2.8/lib to /etc/ld.so.conf (nano /etc/ld.so.conf)&lt;br /&gt;
then run:&lt;br /&gt;
 ldconfig&lt;br /&gt;
 source /etc/profile&lt;br /&gt;
&lt;br /&gt;
That's it.  Now the linker will look in /opt/wx/2.8/lib for wx libraries and you will have a monolithic shared library unicode build.&lt;br /&gt;
&lt;br /&gt;
To check that things are working, type:&lt;br /&gt;
 wx-config --prefix&lt;br /&gt;
which should give you /opt/wx/2.8&lt;br /&gt;
 wx-config --libs&lt;br /&gt;
which should have at least&lt;br /&gt;
 -L/opt/wx/2.8/lib -lwx_gtk2-2.8&lt;br /&gt;
but can contain other flags as well.&lt;br /&gt;
 which wx-config&lt;br /&gt;
should return /opt/wx/2.8/bin/wx-config&lt;br /&gt;
&lt;br /&gt;
===Code::Blocks installation===&lt;br /&gt;
&lt;br /&gt;
====Downloading Code::Blocks====&lt;br /&gt;
&lt;br /&gt;
You can get Code::Blocks source code in one way:&lt;br /&gt;
* Get the latest sources from the SVN repository.&lt;br /&gt;
This method is described below.&lt;br /&gt;
&lt;br /&gt;
=====Getting the latest sources from SVN=====&lt;br /&gt;
'''IMPORTANT NOTICE: The Sourceforge CVS is no longer used although it still exists'''&lt;br /&gt;
&lt;br /&gt;
Enter your development directory:&lt;br /&gt;
&amp;lt;pre&amp;gt;cd ~/devel&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then checkout the source using one of [https://www.codeblocks.org/downloads/7 these] methods.&lt;br /&gt;
&lt;br /&gt;
This will create the directory &amp;lt;tt&amp;gt;trunk&amp;lt;/tt&amp;gt;.&lt;br /&gt;
Change to the source code directory, by issuing the following command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;cd trunk&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Building Code::Blocks SVN====&lt;br /&gt;
If you are a Gentoo user, please see [[Compiling_Code::Blocks_in_Gentoo]].&lt;br /&gt;
&lt;br /&gt;
Before beginning, it is often a good idea to check you have recent versions of autoconf and automake - repositories versions are not always recent enough. (if you do not have automake, then you will get &amp;quot;cannot find aclocal&amp;quot; error).&lt;br /&gt;
&lt;br /&gt;
If you're compiling the svn trunk versions of CodeBlocks (or future versions) then the unix build has switched to autotools.  So first build wxWidgets as described above and then build CodeBlocks as follows:&lt;br /&gt;
&lt;br /&gt;
 ./bootstrap&lt;br /&gt;
&lt;br /&gt;
This sets up the configure script and its dependencies.  It only needs to be run once (after downloading the source from svn).  '''If you get errors like:'''&lt;br /&gt;
 aclocal:configure.in:61: warning: macro `AM_OPTIONS_WXCONFIG' not found in library&lt;br /&gt;
Then aclocal is having trouble finding the wxWidgets .m4 files.  You can do one of two things:&lt;br /&gt;
To just get bootstrap to find the path this time do:&lt;br /&gt;
&amp;lt;!-- *********** Bad syntax... removed 2006-08-28 by BentFX ****************************&lt;br /&gt;
 export ACLOCAL_FLAGS=&amp;quot;--acdir=`wx-config --prefix`/share/aclocal&amp;quot;&lt;br /&gt;
&lt;br /&gt;
: Note: The above command resulted in missing macros when running ./bootstrap for me. Setting an additional search path instead of overwriting like above worked for me. In case of missing macros try &lt;br /&gt;
***********************************************************************************--&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;export ACLOCAL_FLAGS=&amp;quot;-I `wx-config --prefix`/share/aclocal&amp;quot;&amp;lt;/pre&amp;gt; &amp;lt;!--[[User:Jabber|Jabber]] 06:24, 2 August 2006 (EDT)--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To change the aclocal search path more permanently do:&lt;br /&gt;
 echo `wx-config --prefix`/share/aclocal &amp;gt;&amp;gt; /usr/share/aclocal/dirlist&lt;br /&gt;
Then aclocal will also search somewhere like /opt/wx/2.6/share/aclocal&lt;br /&gt;
&lt;br /&gt;
'''Note for Ubuntu users:''' The above is not the correct way to fix the AM_* errors. Rather, you only need to install the package named &amp;quot;wx-common&amp;quot; (Universe repository).&lt;br /&gt;
&lt;br /&gt;
If you get something like&lt;br /&gt;
 The usual way to define `LIBTOOL' is to add `AC_PROG_LIBTOOL'&lt;br /&gt;
&lt;br /&gt;
it can be solved by something like: (adapt path, use `wx-config --prefix` is necessary)&lt;br /&gt;
&lt;br /&gt;
 ACLOCAL_FLAGS=&amp;quot;-I /usr/share/aclocal&amp;quot; ./bootstrap&lt;br /&gt;
&lt;br /&gt;
(*Note// '''If you run ./bootstrap and get errors like''':&lt;br /&gt;
 : bad interpreter: File not found&lt;br /&gt;
then there exists a problem with DOS line-endings. i had this error after i tried to build a  codeblocks from sources which were checked out with cvs on a windows machine. After i checked out a fresh copy of codeblocks from cvs under Ubuntu linux (see above topic: Downloading the latest source package fom SVN), all errors were gone. &lt;br /&gt;
//tiwag 051008*)&amp;lt;br&amp;gt;&lt;br /&gt;
Or, instead of downloading from SVN, you might consider using the little command line tool dos2unix, which normally comes with most distributions. //lizzarddude060103&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
If configure aborts with some unspecific error message(&amp;quot;.infig.status: error: cannot find input file: Makefile&amp;quot;), you might consider also running&lt;br /&gt;
 dos2unix bootstrap acinclude.m4 codeblocks.pc.in configure.in Makefile.am&lt;br /&gt;
before running bootstrap&lt;br /&gt;
&lt;br /&gt;
Once you've run the bootstrap script, installing is as simple as:&lt;br /&gt;
 ./configure&lt;br /&gt;
 make&lt;br /&gt;
 make install&lt;br /&gt;
&lt;br /&gt;
If you have multiple versions of wxWidgets installed or kept them inplace, you can use&lt;br /&gt;
./configure --with-wx-config=/path/to/wx-config&lt;br /&gt;
&lt;br /&gt;
To uninstall you can later run:&lt;br /&gt;
 make uninstall&lt;br /&gt;
&lt;br /&gt;
If you want to recompile everything, first run:&lt;br /&gt;
 make clean&lt;br /&gt;
 make distclean&lt;br /&gt;
 make clean-bin&lt;br /&gt;
 make clean-zipfiles&lt;br /&gt;
and then follow the above sequence for installing.&lt;br /&gt;
&lt;br /&gt;
By default, CodeBlocks will install to /usr/local.  If you want it in its own tree (so you can have multiple versions of CodeBlocks, each in its own subdirectory of /opt) replace the above ./configure command with:&lt;br /&gt;
 ./configure --prefix=/opt/codeblocks-svn&lt;br /&gt;
or similar.  Then you can later install a different build like:&lt;br /&gt;
 ./configure --prefix=/opt/codeblocks2-svn&lt;br /&gt;
followed by 'make &amp;amp;&amp;amp; make install' as usual.&lt;br /&gt;
&lt;br /&gt;
By default, CodeBlocks will not compile the contributed plugins from SVN.  If you want to compile / install them too, replace the above ./configure command with:&lt;br /&gt;
 ./configure --with-contrib-plugins=all&lt;br /&gt;
followed by 'make &amp;amp;&amp;amp; make install' as usual.&lt;br /&gt;
&lt;br /&gt;
To see a list of other options available for configuring the build of CodeBlocks do:&lt;br /&gt;
 ./configure --help&lt;br /&gt;
&lt;br /&gt;
To compile under gentoo, use&lt;br /&gt;
 ./configure --with-wx-config=wx-config-2.8&lt;br /&gt;
&lt;br /&gt;
====Resolving issues with Code::Blocks SVN====&lt;br /&gt;
&lt;br /&gt;
When running Code::Blocks after the installation it might happen, that the system complains:&lt;br /&gt;
 codeblocks: error while loading shared libraries: libcodeblocks.so.0: cannot open shared object file: No such file or directory&lt;br /&gt;
In that case make sure the library path where the Code::Blocks libraries where installed into is &amp;quot;known&amp;quot; to the system. For example: On Ubuntu using a default build process on a clean system will install the Code::Blocks executables to /use/local/bin and the libraries to /usr/local/lib. The latter is usually not known to a &amp;quot;clean&amp;quot; Ubuntu system. To add it to the search path for libraries do the following (as root / using sudo respectively):&lt;br /&gt;
Add the following line to the file /etc/ld.so.conf:&lt;br /&gt;
 /usr/local/lib&lt;br /&gt;
...and run:&lt;br /&gt;
 ldconfig&lt;br /&gt;
That's it - Code::Blocks should now work just fine as all libraries are being found.&lt;/div&gt;</summary>
		<author><name>Spacemonkey</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=Installing_Code::Blocks_from_source_on_Linux&amp;diff=6174</id>
		<title>Installing Code::Blocks from source on Linux</title>
		<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php?title=Installing_Code::Blocks_from_source_on_Linux&amp;diff=6174"/>
		<updated>2009-11-19T12:47:59Z</updated>

		<summary type="html">&lt;p&gt;Spacemonkey: /* Prerequisites */&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;
These are instructions on how to build Code::Blocks under Linux. These instructions should work for all Linux distros, as we'll be installing from sources.&lt;br /&gt;
&lt;br /&gt;
===Prerequisites===&lt;br /&gt;
&lt;br /&gt;
In order to successfully compile Code::Blocks, the [http://en.wikipedia.org/wiki/WxWidgets wxWidgets] User Interface library &amp;lt;u&amp;gt;must be installed&amp;lt;/u&amp;gt;. For most Linux users, this is maybe the only dependency which is not already installed. wxWidget can be used directly on top of the X server, in this case the variant of the wxWidget library is called wxX11. However this library [http://wiki.wxwidgets.org/WxWidgets_Compared_To_Other_Toolkits#Why_You_Shouldn.27t_Use_wxWidgets &amp;quot;is sub-par compared to other toolkits and unstable&amp;quot;]. Hence Code::Blocks uses wxGTK, the version of wxWidget based on GTK+. The exact requirement is libwxGTK-2.8.0 or later (2.8.3 is not recommanded because of some troubles). This creates an additional dependency on GTK+, consider the following:&lt;br /&gt;
&lt;br /&gt;
A possible implementation which does not exist: &lt;br /&gt;
&lt;br /&gt;
''Code::Blocks  -&amp;gt;  xwWidget (libwxX11)  -&amp;gt;  X''&lt;br /&gt;
&lt;br /&gt;
Current Code::Blocks implementation: &lt;br /&gt;
&lt;br /&gt;
''Code::Blocks  -&amp;gt;  '''xwWidget (&amp;gt; libwxGTK2.8)'''  -&amp;gt;  '''GTK+ (&amp;gt; libgtk-x11-2.0)'''  -&amp;gt;  X''&lt;br /&gt;
&lt;br /&gt;
This document helps you to install libwxGTK if necessary but does not cover the installation of GTK+. GTK+ is probably installed on your Linux anyway, so don't worry ;)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
''Note:'' All the instructions below, assume an existing directory named &amp;lt;tt&amp;gt;~/devel&amp;lt;/tt&amp;gt;. If you 'll be using a different one, adjust the path to match.&lt;br /&gt;
As a first step create this directory:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;mkdir ~/devel&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===wxGTK installation===&lt;br /&gt;
&lt;br /&gt;
====Getting wxGTK====&lt;br /&gt;
&lt;br /&gt;
Visit the [http://www.wxwidgets.org wxWidgets web site]. Click the &amp;quot;Download&amp;quot; button at the top of the page. Under wxWidgets 2.8.7 downloads, select wxGTK. Save the file in &amp;lt;tt&amp;gt;~/devel&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
====Uncompressing the wxGTK sources====&lt;br /&gt;
&lt;br /&gt;
After the download finishes, switch to &amp;lt;tt&amp;gt;~/devel&amp;lt;/tt&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;cd ~/devel&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, untar the wxGTK sources:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;tar zxf wxGTK-2.8.7.tar.gz&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Switch to the wxGTK directory&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;cd wxGTK-2.8.7&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====wxWidgets build====&lt;br /&gt;
&lt;br /&gt;
Here we will create a seperate build directory instead of building from the src directory, so that we can easily rebuild with different options (unicode / ansi, monolithic / many libs, etc).&lt;br /&gt;
&lt;br /&gt;
The documentation says the default is for gtk2 to use unicode and wx &amp;gt; 2.5 to build as a monolithic library.  This doesn't appear to be the case, so these flags are passed to configure.&lt;br /&gt;
&lt;br /&gt;
 mkdir build_gtk2_shared_monolithic_unicode&lt;br /&gt;
 cd build_gtk2_shared_monolithic_unicode&lt;br /&gt;
 ../configure --prefix=/opt/wx/2.8 \&lt;br /&gt;
        --enable-xrc \&lt;br /&gt;
        --enable-monolithic \&lt;br /&gt;
        --enable-unicode&lt;br /&gt;
 make&lt;br /&gt;
 su&lt;br /&gt;
 make install&lt;br /&gt;
 exit&lt;br /&gt;
&lt;br /&gt;
Add /opt/wx/2.8/bin to the PATH (if you're shell is bash then edit /etc/profile or ~/.bash_profile)&lt;br /&gt;
(On Suse 10.1 edit /etc/profile.local, it will only be available after a new login).  an example PATH&lt;br /&gt;
 export PATH=/usr/bin:/opt/wx/2.8/bin:$PATH&lt;br /&gt;
&lt;br /&gt;
'''Note:''' On Ubuntu Hoary it was necessary to check &amp;quot;Run command as login shell&amp;quot; &lt;br /&gt;
in the gnome-terminal profile-settings, otherwise the PATH changes are not available in a gnome-terminal window.&lt;br /&gt;
&lt;br /&gt;
add /opt/wx/2.8/lib to /etc/ld.so.conf (nano /etc/ld.so.conf)&lt;br /&gt;
then run:&lt;br /&gt;
 ldconfig&lt;br /&gt;
 source /etc/profile&lt;br /&gt;
&lt;br /&gt;
That's it.  Now the linker will look in /opt/wx/2.8/lib for wx libraries and you will have a monolithic shared library unicode build.&lt;br /&gt;
&lt;br /&gt;
To check that things are working, type:&lt;br /&gt;
 wx-config --prefix&lt;br /&gt;
which should give you /opt/wx/2.8&lt;br /&gt;
 wx-config --libs&lt;br /&gt;
which should have at least&lt;br /&gt;
 -L/opt/wx/2.8/lib -lwx_gtk2-2.8&lt;br /&gt;
but can contain other flags as well.&lt;br /&gt;
 which wx-config&lt;br /&gt;
should return /opt/wx/2.8/bin/wx-config&lt;br /&gt;
&lt;br /&gt;
===Code::Blocks installation===&lt;br /&gt;
&lt;br /&gt;
====Downloading Code::Blocks====&lt;br /&gt;
&lt;br /&gt;
You can get Code::Blocks source code in one way:&lt;br /&gt;
* Get the latest sources from the SVN repository.&lt;br /&gt;
This method is described below.&lt;br /&gt;
&lt;br /&gt;
=====Getting the latest sources from SVN=====&lt;br /&gt;
'''IMPORTANT NOTICE: The Sourceforge CVS is no longer used although it still exists'''&lt;br /&gt;
&lt;br /&gt;
Enter your development directory:&lt;br /&gt;
&amp;lt;pre&amp;gt;cd ~/devel&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then checkout the source using one of [https://www.codeblocks.org/downloads/7 these] methods.&lt;br /&gt;
&lt;br /&gt;
This will create the directory &amp;lt;tt&amp;gt;trunk&amp;lt;/tt&amp;gt;.&lt;br /&gt;
Change to the source code directory, by issuing the following command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;cd trunk&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Building Code::Blocks SVN====&lt;br /&gt;
If you are a Gentoo user, please see [[Compiling_Code::Blocks_in_Gentoo]].&lt;br /&gt;
&lt;br /&gt;
Before beginning, it is often a good idea to check you have recent versions of autoconf and automake - repositories versions are not always recent enough. (if you do not have automake, then you will get &amp;quot;cannot find aclocal&amp;quot; error).&lt;br /&gt;
&lt;br /&gt;
If you're compiling the svn trunk versions of CodeBlocks (or future versions) then the unix build has switched to autotools.  So first build wxWidgets as described above and then build CodeBlocks as follows:&lt;br /&gt;
&lt;br /&gt;
 ./bootstrap&lt;br /&gt;
&lt;br /&gt;
This sets up the configure script and its dependencies.  It only needs to be run once (after downloading the source from svn).  '''If you get errors like:'''&lt;br /&gt;
 aclocal:configure.in:61: warning: macro `AM_OPTIONS_WXCONFIG' not found in library&lt;br /&gt;
Then aclocal is having trouble finding the wxWidgets .m4 files.  You can do one of two things:&lt;br /&gt;
To just get bootstrap to find the path this time do:&lt;br /&gt;
&amp;lt;!-- *********** Bad syntax... removed 2006-08-28 by BentFX ****************************&lt;br /&gt;
 export ACLOCAL_FLAGS=&amp;quot;--acdir=`wx-config --prefix`/share/aclocal&amp;quot;&lt;br /&gt;
&lt;br /&gt;
: Note: The above command resulted in missing macros when running ./bootstrap for me. Setting an additional search path instead of overwriting like above worked for me. In case of missing macros try &lt;br /&gt;
***********************************************************************************--&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;export ACLOCAL_FLAGS=&amp;quot;-I `wx-config --prefix`/share/aclocal&amp;quot;&amp;lt;/pre&amp;gt; &amp;lt;!--[[User:Jabber|Jabber]] 06:24, 2 August 2006 (EDT)--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To change the aclocal search path more permanently do:&lt;br /&gt;
 echo `wx-config --prefix`/share/aclocal &amp;gt;&amp;gt; /usr/share/aclocal/dirlist&lt;br /&gt;
Then aclocal will also search somewhere like /opt/wx/2.6/share/aclocal&lt;br /&gt;
&lt;br /&gt;
'''Note for Ubuntu users:''' The above is not the correct way to fix the AM_* errors. Rather, you only need to install the package named &amp;quot;wx-common&amp;quot; (Universe repository).&lt;br /&gt;
&lt;br /&gt;
If you get something like&lt;br /&gt;
 The usual way to define `LIBTOOL' is to add `AC_PROG_LIBTOOL'&lt;br /&gt;
&lt;br /&gt;
it can be solved by something like: (adapt path, use `wx-config --prefix` is necessary)&lt;br /&gt;
&lt;br /&gt;
 ACLOCAL_FLAGS=&amp;quot;-I /usr/share/aclocal&amp;quot; ./bootstrap&lt;br /&gt;
&lt;br /&gt;
(*Note// '''If you run ./bootstrap and get errors like''':&lt;br /&gt;
 : bad interpreter: File not found&lt;br /&gt;
then there exists a problem with DOS line-endings. i had this error after i tried to build a  codeblocks from sources which were checked out with cvs on a windows machine. After i checked out a fresh copy of codeblocks from cvs under Ubuntu linux (see above topic: Downloading the latest source package fom SVN), all errors were gone. &lt;br /&gt;
//tiwag 051008*)&amp;lt;br&amp;gt;&lt;br /&gt;
Or, instead of downloading from SVN, you might consider using the little command line tool dos2unix, which normally comes with most distributions. //lizzarddude060103&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
If configure aborts with some unspecific error message(&amp;quot;.infig.status: error: cannot find input file: Makefile&amp;quot;), you might consider also running&lt;br /&gt;
 dos2unix bootstrap acinclude.m4 codeblocks.pc.in configure.in Makefile.am&lt;br /&gt;
before running bootstrap&lt;br /&gt;
&lt;br /&gt;
Once you've run the bootstrap script, installing is as simple as:&lt;br /&gt;
 ./configure&lt;br /&gt;
 make&lt;br /&gt;
 make install&lt;br /&gt;
&lt;br /&gt;
If you have multiple versions of wxWidgets installed or kept them inplace, you can use&lt;br /&gt;
./configure --with-wx-config=/path/to/wx-config&lt;br /&gt;
&lt;br /&gt;
To uninstall you can later run:&lt;br /&gt;
 make uninstall&lt;br /&gt;
&lt;br /&gt;
If you want to recompile everything, first run:&lt;br /&gt;
 make clean&lt;br /&gt;
 make distclean&lt;br /&gt;
 make clean-bin&lt;br /&gt;
 make clean-zipfiles&lt;br /&gt;
and then follow the above sequence for installing.&lt;br /&gt;
&lt;br /&gt;
By default, CodeBlocks will install to /usr/local.  If you want it in its own tree (so you can have multiple versions of CodeBlocks, each in its own subdirectory of /opt) replace the above ./configure command with:&lt;br /&gt;
 ./configure --prefix=/opt/codeblocks-svn&lt;br /&gt;
or similar.  Then you can later install a different build like:&lt;br /&gt;
 ./configure --prefix=/opt/codeblocks2-svn&lt;br /&gt;
followed by 'make &amp;amp;&amp;amp; make install' as usual.&lt;br /&gt;
&lt;br /&gt;
By default, CodeBlocks will not compile the contributed plugins from SVN.  If you want to compile / install them too, replace the above ./configure command with:&lt;br /&gt;
 ./configure --with-contrib-plugins=all&lt;br /&gt;
followed by 'make &amp;amp;&amp;amp; make install' as usual.&lt;br /&gt;
&lt;br /&gt;
To see a list of other options available for configuring the build of CodeBlocks do:&lt;br /&gt;
 ./configure --help&lt;br /&gt;
&lt;br /&gt;
To compile under gentoo, use&lt;br /&gt;
 ./configure --with-wx-config=wx-config-2.8&lt;br /&gt;
&lt;br /&gt;
====Resolving issues with Code::Blocks SVN====&lt;br /&gt;
&lt;br /&gt;
When running Code::Blocks after the installation it might happen, that the system complains:&lt;br /&gt;
 codeblocks: error while loading shared libraries: libcodeblocks.so.0: cannot open shared object file: No such file or directory&lt;br /&gt;
In that case make sure the library path where the Code::Blocks libraries where installed into is &amp;quot;known&amp;quot; to the system. For example: On Ubuntu using a default build process on a clean system will install the Code::Blocks executables to /use/local/bin and the libraries to /usr/local/lib. The latter is usually not known to a &amp;quot;clean&amp;quot; Ubuntu system. To add it to the search path for libraries do the following (as root / using sudo respectively):&lt;br /&gt;
Add the following line to the file /etc/ld.so.conf:&lt;br /&gt;
 /usr/local/lib&lt;br /&gt;
...and run:&lt;br /&gt;
 ldconfig&lt;br /&gt;
That's it - Code::Blocks should now work just fine as all libraries are being found.&lt;/div&gt;</summary>
		<author><name>Spacemonkey</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=Installing_Code::Blocks_from_source_on_Linux&amp;diff=6173</id>
		<title>Installing Code::Blocks from source on Linux</title>
		<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php?title=Installing_Code::Blocks_from_source_on_Linux&amp;diff=6173"/>
		<updated>2009-11-19T12:39:42Z</updated>

		<summary type="html">&lt;p&gt;Spacemonkey: /* Prerequisites */&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;
These are instructions on how to build Code::Blocks under Linux. These instructions should work for all Linux distros, as we'll be installing from sources.&lt;br /&gt;
&lt;br /&gt;
===Prerequisites===&lt;br /&gt;
&lt;br /&gt;
In order to successfully compile Code::Blocks, the [http://en.wikipedia.org/wiki/WxWidgets wxWidgets] User Interface library &amp;lt;u&amp;gt;must be installed&amp;lt;/u&amp;gt;. For most Linux users, this is maybe the only dependency which is not already installed. wxWidget can be used directly on top of the X server, in this case the variant of the wxWidget library is called wxX11. However this library [http://wiki.wxwidgets.org/WxWidgets_Compared_To_Other_Toolkits#Why_You_Shouldn.27t_Use_wxWidgets &amp;quot;is sub-par compared to other toolkits and unstable&amp;quot;]. Hence Code::Blocks uses wxGTK, the version of wxWidget based on GTK+. The exact requirement is &amp;lt;u&amp;gt;libwxGTK-2.8.0 or later&amp;lt;/u&amp;gt; (2.8.3 not recommanded because of some possible troubles). This creates an additional dependency on GTK, consider the following:&lt;br /&gt;
&lt;br /&gt;
Current Code::Blocks implementation: ''Code::Blocks  -&amp;gt;  '''xwWidget (libwxGTK2.8)'''  -&amp;gt;  '''GTK+ (libgtk-x11-2.0)'''  -&amp;gt;  X''&lt;br /&gt;
&lt;br /&gt;
Another possible implementation which does not exist: ''Code::Blocks  -&amp;gt;  xwWidget (libwxX11)  -&amp;gt;  X''&lt;br /&gt;
&lt;br /&gt;
This document helps you to install libwxGTK if necessary but does not cover the installation of GTK+. GTK+ is probably installed on your Linux anyway, so don't worry ;)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
All the instructions below, assume an existing directory named &amp;lt;tt&amp;gt;~/devel&amp;lt;/tt&amp;gt;. If you 'll be using a different one, adjust the path to match.&lt;br /&gt;
As a first step create this directory:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;mkdir ~/devel&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===wxGTK installation===&lt;br /&gt;
&lt;br /&gt;
====Getting wxGTK====&lt;br /&gt;
&lt;br /&gt;
Visit the [http://www.wxwidgets.org wxWidgets web site]. Click the &amp;quot;Download&amp;quot; button at the top of the page. Under wxWidgets 2.8.7 downloads, select wxGTK. Save the file in &amp;lt;tt&amp;gt;~/devel&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
====Uncompressing the wxGTK sources====&lt;br /&gt;
&lt;br /&gt;
After the download finishes, switch to &amp;lt;tt&amp;gt;~/devel&amp;lt;/tt&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;cd ~/devel&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, untar the wxGTK sources:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;tar zxf wxGTK-2.8.7.tar.gz&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Switch to the wxGTK directory&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;cd wxGTK-2.8.7&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====wxWidgets build====&lt;br /&gt;
&lt;br /&gt;
Here we will create a seperate build directory instead of building from the src directory, so that we can easily rebuild with different options (unicode / ansi, monolithic / many libs, etc).&lt;br /&gt;
&lt;br /&gt;
The documentation says the default is for gtk2 to use unicode and wx &amp;gt; 2.5 to build as a monolithic library.  This doesn't appear to be the case, so these flags are passed to configure.&lt;br /&gt;
&lt;br /&gt;
 mkdir build_gtk2_shared_monolithic_unicode&lt;br /&gt;
 cd build_gtk2_shared_monolithic_unicode&lt;br /&gt;
 ../configure --prefix=/opt/wx/2.8 \&lt;br /&gt;
        --enable-xrc \&lt;br /&gt;
        --enable-monolithic \&lt;br /&gt;
        --enable-unicode&lt;br /&gt;
 make&lt;br /&gt;
 su&lt;br /&gt;
 make install&lt;br /&gt;
 exit&lt;br /&gt;
&lt;br /&gt;
Add /opt/wx/2.8/bin to the PATH (if you're shell is bash then edit /etc/profile or ~/.bash_profile)&lt;br /&gt;
(On Suse 10.1 edit /etc/profile.local, it will only be available after a new login).  an example PATH&lt;br /&gt;
 export PATH=/usr/bin:/opt/wx/2.8/bin:$PATH&lt;br /&gt;
&lt;br /&gt;
'''Note:''' On Ubuntu Hoary it was necessary to check &amp;quot;Run command as login shell&amp;quot; &lt;br /&gt;
in the gnome-terminal profile-settings, otherwise the PATH changes are not available in a gnome-terminal window.&lt;br /&gt;
&lt;br /&gt;
add /opt/wx/2.8/lib to /etc/ld.so.conf (nano /etc/ld.so.conf)&lt;br /&gt;
then run:&lt;br /&gt;
 ldconfig&lt;br /&gt;
 source /etc/profile&lt;br /&gt;
&lt;br /&gt;
That's it.  Now the linker will look in /opt/wx/2.8/lib for wx libraries and you will have a monolithic shared library unicode build.&lt;br /&gt;
&lt;br /&gt;
To check that things are working, type:&lt;br /&gt;
 wx-config --prefix&lt;br /&gt;
which should give you /opt/wx/2.8&lt;br /&gt;
 wx-config --libs&lt;br /&gt;
which should have at least&lt;br /&gt;
 -L/opt/wx/2.8/lib -lwx_gtk2-2.8&lt;br /&gt;
but can contain other flags as well.&lt;br /&gt;
 which wx-config&lt;br /&gt;
should return /opt/wx/2.8/bin/wx-config&lt;br /&gt;
&lt;br /&gt;
===Code::Blocks installation===&lt;br /&gt;
&lt;br /&gt;
====Downloading Code::Blocks====&lt;br /&gt;
&lt;br /&gt;
You can get Code::Blocks source code in one way:&lt;br /&gt;
* Get the latest sources from the SVN repository.&lt;br /&gt;
This method is described below.&lt;br /&gt;
&lt;br /&gt;
=====Getting the latest sources from SVN=====&lt;br /&gt;
'''IMPORTANT NOTICE: The Sourceforge CVS is no longer used although it still exists'''&lt;br /&gt;
&lt;br /&gt;
Enter your development directory:&lt;br /&gt;
&amp;lt;pre&amp;gt;cd ~/devel&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then checkout the source using one of [https://www.codeblocks.org/downloads/7 these] methods.&lt;br /&gt;
&lt;br /&gt;
This will create the directory &amp;lt;tt&amp;gt;trunk&amp;lt;/tt&amp;gt;.&lt;br /&gt;
Change to the source code directory, by issuing the following command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;cd trunk&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Building Code::Blocks SVN====&lt;br /&gt;
If you are a Gentoo user, please see [[Compiling_Code::Blocks_in_Gentoo]].&lt;br /&gt;
&lt;br /&gt;
Before beginning, it is often a good idea to check you have recent versions of autoconf and automake - repositories versions are not always recent enough. (if you do not have automake, then you will get &amp;quot;cannot find aclocal&amp;quot; error).&lt;br /&gt;
&lt;br /&gt;
If you're compiling the svn trunk versions of CodeBlocks (or future versions) then the unix build has switched to autotools.  So first build wxWidgets as described above and then build CodeBlocks as follows:&lt;br /&gt;
&lt;br /&gt;
 ./bootstrap&lt;br /&gt;
&lt;br /&gt;
This sets up the configure script and its dependencies.  It only needs to be run once (after downloading the source from svn).  '''If you get errors like:'''&lt;br /&gt;
 aclocal:configure.in:61: warning: macro `AM_OPTIONS_WXCONFIG' not found in library&lt;br /&gt;
Then aclocal is having trouble finding the wxWidgets .m4 files.  You can do one of two things:&lt;br /&gt;
To just get bootstrap to find the path this time do:&lt;br /&gt;
&amp;lt;!-- *********** Bad syntax... removed 2006-08-28 by BentFX ****************************&lt;br /&gt;
 export ACLOCAL_FLAGS=&amp;quot;--acdir=`wx-config --prefix`/share/aclocal&amp;quot;&lt;br /&gt;
&lt;br /&gt;
: Note: The above command resulted in missing macros when running ./bootstrap for me. Setting an additional search path instead of overwriting like above worked for me. In case of missing macros try &lt;br /&gt;
***********************************************************************************--&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;export ACLOCAL_FLAGS=&amp;quot;-I `wx-config --prefix`/share/aclocal&amp;quot;&amp;lt;/pre&amp;gt; &amp;lt;!--[[User:Jabber|Jabber]] 06:24, 2 August 2006 (EDT)--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To change the aclocal search path more permanently do:&lt;br /&gt;
 echo `wx-config --prefix`/share/aclocal &amp;gt;&amp;gt; /usr/share/aclocal/dirlist&lt;br /&gt;
Then aclocal will also search somewhere like /opt/wx/2.6/share/aclocal&lt;br /&gt;
&lt;br /&gt;
'''Note for Ubuntu users:''' The above is not the correct way to fix the AM_* errors. Rather, you only need to install the package named &amp;quot;wx-common&amp;quot; (Universe repository).&lt;br /&gt;
&lt;br /&gt;
If you get something like&lt;br /&gt;
 The usual way to define `LIBTOOL' is to add `AC_PROG_LIBTOOL'&lt;br /&gt;
&lt;br /&gt;
it can be solved by something like: (adapt path, use `wx-config --prefix` is necessary)&lt;br /&gt;
&lt;br /&gt;
 ACLOCAL_FLAGS=&amp;quot;-I /usr/share/aclocal&amp;quot; ./bootstrap&lt;br /&gt;
&lt;br /&gt;
(*Note// '''If you run ./bootstrap and get errors like''':&lt;br /&gt;
 : bad interpreter: File not found&lt;br /&gt;
then there exists a problem with DOS line-endings. i had this error after i tried to build a  codeblocks from sources which were checked out with cvs on a windows machine. After i checked out a fresh copy of codeblocks from cvs under Ubuntu linux (see above topic: Downloading the latest source package fom SVN), all errors were gone. &lt;br /&gt;
//tiwag 051008*)&amp;lt;br&amp;gt;&lt;br /&gt;
Or, instead of downloading from SVN, you might consider using the little command line tool dos2unix, which normally comes with most distributions. //lizzarddude060103&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
If configure aborts with some unspecific error message(&amp;quot;.infig.status: error: cannot find input file: Makefile&amp;quot;), you might consider also running&lt;br /&gt;
 dos2unix bootstrap acinclude.m4 codeblocks.pc.in configure.in Makefile.am&lt;br /&gt;
before running bootstrap&lt;br /&gt;
&lt;br /&gt;
Once you've run the bootstrap script, installing is as simple as:&lt;br /&gt;
 ./configure&lt;br /&gt;
 make&lt;br /&gt;
 make install&lt;br /&gt;
&lt;br /&gt;
If you have multiple versions of wxWidgets installed or kept them inplace, you can use&lt;br /&gt;
./configure --with-wx-config=/path/to/wx-config&lt;br /&gt;
&lt;br /&gt;
To uninstall you can later run:&lt;br /&gt;
 make uninstall&lt;br /&gt;
&lt;br /&gt;
If you want to recompile everything, first run:&lt;br /&gt;
 make clean&lt;br /&gt;
 make distclean&lt;br /&gt;
 make clean-bin&lt;br /&gt;
 make clean-zipfiles&lt;br /&gt;
and then follow the above sequence for installing.&lt;br /&gt;
&lt;br /&gt;
By default, CodeBlocks will install to /usr/local.  If you want it in its own tree (so you can have multiple versions of CodeBlocks, each in its own subdirectory of /opt) replace the above ./configure command with:&lt;br /&gt;
 ./configure --prefix=/opt/codeblocks-svn&lt;br /&gt;
or similar.  Then you can later install a different build like:&lt;br /&gt;
 ./configure --prefix=/opt/codeblocks2-svn&lt;br /&gt;
followed by 'make &amp;amp;&amp;amp; make install' as usual.&lt;br /&gt;
&lt;br /&gt;
By default, CodeBlocks will not compile the contributed plugins from SVN.  If you want to compile / install them too, replace the above ./configure command with:&lt;br /&gt;
 ./configure --with-contrib-plugins=all&lt;br /&gt;
followed by 'make &amp;amp;&amp;amp; make install' as usual.&lt;br /&gt;
&lt;br /&gt;
To see a list of other options available for configuring the build of CodeBlocks do:&lt;br /&gt;
 ./configure --help&lt;br /&gt;
&lt;br /&gt;
To compile under gentoo, use&lt;br /&gt;
 ./configure --with-wx-config=wx-config-2.8&lt;br /&gt;
&lt;br /&gt;
====Resolving issues with Code::Blocks SVN====&lt;br /&gt;
&lt;br /&gt;
When running Code::Blocks after the installation it might happen, that the system complains:&lt;br /&gt;
 codeblocks: error while loading shared libraries: libcodeblocks.so.0: cannot open shared object file: No such file or directory&lt;br /&gt;
In that case make sure the library path where the Code::Blocks libraries where installed into is &amp;quot;known&amp;quot; to the system. For example: On Ubuntu using a default build process on a clean system will install the Code::Blocks executables to /use/local/bin and the libraries to /usr/local/lib. The latter is usually not known to a &amp;quot;clean&amp;quot; Ubuntu system. To add it to the search path for libraries do the following (as root / using sudo respectively):&lt;br /&gt;
Add the following line to the file /etc/ld.so.conf:&lt;br /&gt;
 /usr/local/lib&lt;br /&gt;
...and run:&lt;br /&gt;
 ldconfig&lt;br /&gt;
That's it - Code::Blocks should now work just fine as all libraries are being found.&lt;/div&gt;</summary>
		<author><name>Spacemonkey</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=Installing_Code::Blocks_from_source_on_Linux&amp;diff=6172</id>
		<title>Installing Code::Blocks from source on Linux</title>
		<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php?title=Installing_Code::Blocks_from_source_on_Linux&amp;diff=6172"/>
		<updated>2009-11-19T12:38:34Z</updated>

		<summary type="html">&lt;p&gt;Spacemonkey: /* Prerequisites */&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;
These are instructions on how to build Code::Blocks under Linux. These instructions should work for all Linux distros, as we'll be installing from sources.&lt;br /&gt;
&lt;br /&gt;
===Prerequisites===&lt;br /&gt;
&lt;br /&gt;
In order to successfully compile Code::Blocks, the [http://en.wikipedia.org/wiki/WxWidgets wxWidgets] cross-platform User Interface library &amp;lt;u&amp;gt;must be installed&amp;lt;/u&amp;gt;. For most Linux users, this is probably the only dependency which is not already installed. wxWidget can be used directly on top of the X server, in this case the variant of the wxWidget library is called wxX11. However this library [http://wiki.wxwidgets.org/WxWidgets_Compared_To_Other_Toolkits#Why_You_Shouldn.27t_Use_wxWidgets &amp;quot;is sub-par compared to other toolkits and unstable&amp;quot;]. Hence Code::Blocks uses wxGTK, the version of wxWidget based on GTK+. The exact requirement is &amp;lt;u&amp;gt;libwxGTK-2.8.0 or later&amp;lt;/u&amp;gt; (2.8.3 not recommanded because of some possible troubles). This creates an additional dependency on GTK, consider the following:&lt;br /&gt;
&lt;br /&gt;
Current Code::Blocks implementation: ''Code::Blocks  -&amp;gt;  '''xwWidget (libwxGTK2.8)'''  -&amp;gt;  '''GTK+ (libgtk-x11-2.0)'''  -&amp;gt;  X''&lt;br /&gt;
&lt;br /&gt;
Another possible implementation which does not exist: ''Code::Blocks  -&amp;gt;  xwWidget (libwxX11)  -&amp;gt;  X''&lt;br /&gt;
&lt;br /&gt;
This document helps you to install libwxGTK if necessary but does not cover the installation of GTK+. GTK+ is probably installed on your Linux anyway, so don't worry ;)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
All the instructions below, assume an existing directory named &amp;lt;tt&amp;gt;~/devel&amp;lt;/tt&amp;gt;. If you 'll be using a different one, adjust the path to match.&lt;br /&gt;
As a first step create this directory:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;mkdir ~/devel&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===wxGTK installation===&lt;br /&gt;
&lt;br /&gt;
====Getting wxGTK====&lt;br /&gt;
&lt;br /&gt;
Visit the [http://www.wxwidgets.org wxWidgets web site]. Click the &amp;quot;Download&amp;quot; button at the top of the page. Under wxWidgets 2.8.7 downloads, select wxGTK. Save the file in &amp;lt;tt&amp;gt;~/devel&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
====Uncompressing the wxGTK sources====&lt;br /&gt;
&lt;br /&gt;
After the download finishes, switch to &amp;lt;tt&amp;gt;~/devel&amp;lt;/tt&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;cd ~/devel&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, untar the wxGTK sources:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;tar zxf wxGTK-2.8.7.tar.gz&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Switch to the wxGTK directory&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;cd wxGTK-2.8.7&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====wxWidgets build====&lt;br /&gt;
&lt;br /&gt;
Here we will create a seperate build directory instead of building from the src directory, so that we can easily rebuild with different options (unicode / ansi, monolithic / many libs, etc).&lt;br /&gt;
&lt;br /&gt;
The documentation says the default is for gtk2 to use unicode and wx &amp;gt; 2.5 to build as a monolithic library.  This doesn't appear to be the case, so these flags are passed to configure.&lt;br /&gt;
&lt;br /&gt;
 mkdir build_gtk2_shared_monolithic_unicode&lt;br /&gt;
 cd build_gtk2_shared_monolithic_unicode&lt;br /&gt;
 ../configure --prefix=/opt/wx/2.8 \&lt;br /&gt;
        --enable-xrc \&lt;br /&gt;
        --enable-monolithic \&lt;br /&gt;
        --enable-unicode&lt;br /&gt;
 make&lt;br /&gt;
 su&lt;br /&gt;
 make install&lt;br /&gt;
 exit&lt;br /&gt;
&lt;br /&gt;
Add /opt/wx/2.8/bin to the PATH (if you're shell is bash then edit /etc/profile or ~/.bash_profile)&lt;br /&gt;
(On Suse 10.1 edit /etc/profile.local, it will only be available after a new login).  an example PATH&lt;br /&gt;
 export PATH=/usr/bin:/opt/wx/2.8/bin:$PATH&lt;br /&gt;
&lt;br /&gt;
'''Note:''' On Ubuntu Hoary it was necessary to check &amp;quot;Run command as login shell&amp;quot; &lt;br /&gt;
in the gnome-terminal profile-settings, otherwise the PATH changes are not available in a gnome-terminal window.&lt;br /&gt;
&lt;br /&gt;
add /opt/wx/2.8/lib to /etc/ld.so.conf (nano /etc/ld.so.conf)&lt;br /&gt;
then run:&lt;br /&gt;
 ldconfig&lt;br /&gt;
 source /etc/profile&lt;br /&gt;
&lt;br /&gt;
That's it.  Now the linker will look in /opt/wx/2.8/lib for wx libraries and you will have a monolithic shared library unicode build.&lt;br /&gt;
&lt;br /&gt;
To check that things are working, type:&lt;br /&gt;
 wx-config --prefix&lt;br /&gt;
which should give you /opt/wx/2.8&lt;br /&gt;
 wx-config --libs&lt;br /&gt;
which should have at least&lt;br /&gt;
 -L/opt/wx/2.8/lib -lwx_gtk2-2.8&lt;br /&gt;
but can contain other flags as well.&lt;br /&gt;
 which wx-config&lt;br /&gt;
should return /opt/wx/2.8/bin/wx-config&lt;br /&gt;
&lt;br /&gt;
===Code::Blocks installation===&lt;br /&gt;
&lt;br /&gt;
====Downloading Code::Blocks====&lt;br /&gt;
&lt;br /&gt;
You can get Code::Blocks source code in one way:&lt;br /&gt;
* Get the latest sources from the SVN repository.&lt;br /&gt;
This method is described below.&lt;br /&gt;
&lt;br /&gt;
=====Getting the latest sources from SVN=====&lt;br /&gt;
'''IMPORTANT NOTICE: The Sourceforge CVS is no longer used although it still exists'''&lt;br /&gt;
&lt;br /&gt;
Enter your development directory:&lt;br /&gt;
&amp;lt;pre&amp;gt;cd ~/devel&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then checkout the source using one of [https://www.codeblocks.org/downloads/7 these] methods.&lt;br /&gt;
&lt;br /&gt;
This will create the directory &amp;lt;tt&amp;gt;trunk&amp;lt;/tt&amp;gt;.&lt;br /&gt;
Change to the source code directory, by issuing the following command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;cd trunk&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Building Code::Blocks SVN====&lt;br /&gt;
If you are a Gentoo user, please see [[Compiling_Code::Blocks_in_Gentoo]].&lt;br /&gt;
&lt;br /&gt;
Before beginning, it is often a good idea to check you have recent versions of autoconf and automake - repositories versions are not always recent enough. (if you do not have automake, then you will get &amp;quot;cannot find aclocal&amp;quot; error).&lt;br /&gt;
&lt;br /&gt;
If you're compiling the svn trunk versions of CodeBlocks (or future versions) then the unix build has switched to autotools.  So first build wxWidgets as described above and then build CodeBlocks as follows:&lt;br /&gt;
&lt;br /&gt;
 ./bootstrap&lt;br /&gt;
&lt;br /&gt;
This sets up the configure script and its dependencies.  It only needs to be run once (after downloading the source from svn).  '''If you get errors like:'''&lt;br /&gt;
 aclocal:configure.in:61: warning: macro `AM_OPTIONS_WXCONFIG' not found in library&lt;br /&gt;
Then aclocal is having trouble finding the wxWidgets .m4 files.  You can do one of two things:&lt;br /&gt;
To just get bootstrap to find the path this time do:&lt;br /&gt;
&amp;lt;!-- *********** Bad syntax... removed 2006-08-28 by BentFX ****************************&lt;br /&gt;
 export ACLOCAL_FLAGS=&amp;quot;--acdir=`wx-config --prefix`/share/aclocal&amp;quot;&lt;br /&gt;
&lt;br /&gt;
: Note: The above command resulted in missing macros when running ./bootstrap for me. Setting an additional search path instead of overwriting like above worked for me. In case of missing macros try &lt;br /&gt;
***********************************************************************************--&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;export ACLOCAL_FLAGS=&amp;quot;-I `wx-config --prefix`/share/aclocal&amp;quot;&amp;lt;/pre&amp;gt; &amp;lt;!--[[User:Jabber|Jabber]] 06:24, 2 August 2006 (EDT)--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To change the aclocal search path more permanently do:&lt;br /&gt;
 echo `wx-config --prefix`/share/aclocal &amp;gt;&amp;gt; /usr/share/aclocal/dirlist&lt;br /&gt;
Then aclocal will also search somewhere like /opt/wx/2.6/share/aclocal&lt;br /&gt;
&lt;br /&gt;
'''Note for Ubuntu users:''' The above is not the correct way to fix the AM_* errors. Rather, you only need to install the package named &amp;quot;wx-common&amp;quot; (Universe repository).&lt;br /&gt;
&lt;br /&gt;
If you get something like&lt;br /&gt;
 The usual way to define `LIBTOOL' is to add `AC_PROG_LIBTOOL'&lt;br /&gt;
&lt;br /&gt;
it can be solved by something like: (adapt path, use `wx-config --prefix` is necessary)&lt;br /&gt;
&lt;br /&gt;
 ACLOCAL_FLAGS=&amp;quot;-I /usr/share/aclocal&amp;quot; ./bootstrap&lt;br /&gt;
&lt;br /&gt;
(*Note// '''If you run ./bootstrap and get errors like''':&lt;br /&gt;
 : bad interpreter: File not found&lt;br /&gt;
then there exists a problem with DOS line-endings. i had this error after i tried to build a  codeblocks from sources which were checked out with cvs on a windows machine. After i checked out a fresh copy of codeblocks from cvs under Ubuntu linux (see above topic: Downloading the latest source package fom SVN), all errors were gone. &lt;br /&gt;
//tiwag 051008*)&amp;lt;br&amp;gt;&lt;br /&gt;
Or, instead of downloading from SVN, you might consider using the little command line tool dos2unix, which normally comes with most distributions. //lizzarddude060103&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
If configure aborts with some unspecific error message(&amp;quot;.infig.status: error: cannot find input file: Makefile&amp;quot;), you might consider also running&lt;br /&gt;
 dos2unix bootstrap acinclude.m4 codeblocks.pc.in configure.in Makefile.am&lt;br /&gt;
before running bootstrap&lt;br /&gt;
&lt;br /&gt;
Once you've run the bootstrap script, installing is as simple as:&lt;br /&gt;
 ./configure&lt;br /&gt;
 make&lt;br /&gt;
 make install&lt;br /&gt;
&lt;br /&gt;
If you have multiple versions of wxWidgets installed or kept them inplace, you can use&lt;br /&gt;
./configure --with-wx-config=/path/to/wx-config&lt;br /&gt;
&lt;br /&gt;
To uninstall you can later run:&lt;br /&gt;
 make uninstall&lt;br /&gt;
&lt;br /&gt;
If you want to recompile everything, first run:&lt;br /&gt;
 make clean&lt;br /&gt;
 make distclean&lt;br /&gt;
 make clean-bin&lt;br /&gt;
 make clean-zipfiles&lt;br /&gt;
and then follow the above sequence for installing.&lt;br /&gt;
&lt;br /&gt;
By default, CodeBlocks will install to /usr/local.  If you want it in its own tree (so you can have multiple versions of CodeBlocks, each in its own subdirectory of /opt) replace the above ./configure command with:&lt;br /&gt;
 ./configure --prefix=/opt/codeblocks-svn&lt;br /&gt;
or similar.  Then you can later install a different build like:&lt;br /&gt;
 ./configure --prefix=/opt/codeblocks2-svn&lt;br /&gt;
followed by 'make &amp;amp;&amp;amp; make install' as usual.&lt;br /&gt;
&lt;br /&gt;
By default, CodeBlocks will not compile the contributed plugins from SVN.  If you want to compile / install them too, replace the above ./configure command with:&lt;br /&gt;
 ./configure --with-contrib-plugins=all&lt;br /&gt;
followed by 'make &amp;amp;&amp;amp; make install' as usual.&lt;br /&gt;
&lt;br /&gt;
To see a list of other options available for configuring the build of CodeBlocks do:&lt;br /&gt;
 ./configure --help&lt;br /&gt;
&lt;br /&gt;
To compile under gentoo, use&lt;br /&gt;
 ./configure --with-wx-config=wx-config-2.8&lt;br /&gt;
&lt;br /&gt;
====Resolving issues with Code::Blocks SVN====&lt;br /&gt;
&lt;br /&gt;
When running Code::Blocks after the installation it might happen, that the system complains:&lt;br /&gt;
 codeblocks: error while loading shared libraries: libcodeblocks.so.0: cannot open shared object file: No such file or directory&lt;br /&gt;
In that case make sure the library path where the Code::Blocks libraries where installed into is &amp;quot;known&amp;quot; to the system. For example: On Ubuntu using a default build process on a clean system will install the Code::Blocks executables to /use/local/bin and the libraries to /usr/local/lib. The latter is usually not known to a &amp;quot;clean&amp;quot; Ubuntu system. To add it to the search path for libraries do the following (as root / using sudo respectively):&lt;br /&gt;
Add the following line to the file /etc/ld.so.conf:&lt;br /&gt;
 /usr/local/lib&lt;br /&gt;
...and run:&lt;br /&gt;
 ldconfig&lt;br /&gt;
That's it - Code::Blocks should now work just fine as all libraries are being found.&lt;/div&gt;</summary>
		<author><name>Spacemonkey</name></author>
	</entry>
</feed>