<?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=MergeMac</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=MergeMac"/>
	<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php/Special:Contributions/MergeMac"/>
	<updated>2026-05-23T17:03:10Z</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_Solaris&amp;diff=6490</id>
		<title>Installing Code::Blocks from source on Solaris</title>
		<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php?title=Installing_Code::Blocks_from_source_on_Solaris&amp;diff=6490"/>
		<updated>2010-11-30T12:57:38Z</updated>

		<summary type="html">&lt;p&gt;MergeMac: /* CodeBlocks */&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;
&lt;br /&gt;
for Solaris 10 x86 and gcc&lt;br /&gt;
&lt;br /&gt;
'''Note:'''&lt;br /&gt;
* for this tutorial, I've used a clean and new fresh installation of Solaris 10 6/6 with all package (but without any other software)&lt;br /&gt;
* If a command begin with a $, it 's  the normal user otherwise with #, it's root&lt;br /&gt;
* this tutorial is not for a production server&lt;br /&gt;
* feel free to contact me ( murlock at free.fr ) for any problems&lt;br /&gt;
* you can find a french version [[http://solaris-fr.org/home/docs/build/codeblocks|here]]&lt;br /&gt;
&lt;br /&gt;
'''Update 1 dec 2006''' change --disable-compat24 to --enable-compat24, and remove change to bootstrap&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====wxWidgets====&lt;br /&gt;
* Modifying PATH to incldue ar &amp;amp; create target directories for wxWidgets &amp;amp; CodeBlocks&lt;br /&gt;
 $ export PATH=$PATH:/usr/ccs/bin&lt;br /&gt;
 $ su&lt;br /&gt;
 # mkdir /usr/local&lt;br /&gt;
 # mkdir /usr/local/test_cb&lt;br /&gt;
 # chmod 777 /usr/local/test_cb&lt;br /&gt;
 # exit&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Download the 2.8.8 version ([[http://prdownloads.sourceforge.net/wxwindows/wxWidgets-2.8.8.tar.gz wxALL]]) of [[http://www.wxwidgets.org wxWidgets]]&lt;br /&gt;
* Uncompress in a directory (for exemple ~/prog/wxwidgets ) with&lt;br /&gt;
&lt;br /&gt;
 $ gunzip wxWidgets.tar.gz &amp;amp;&amp;amp; tar xvf wxWidgets.tar&lt;br /&gt;
&lt;br /&gt;
* Configure, compile &amp;amp; install of wxWidgets (in debug mode)&lt;br /&gt;
&lt;br /&gt;
 $ ./configure --with-gtk --enable-config --enable-protocols --enable-ftp --enable-http --enable-fileproto --enable-arcstream --enable-cmdline --enable-datetime --enable-ffile --enable-file --enable-filesystem --enable-fontmap --enable-fs_inet --enable-fs_zip --enable-log --enable-stdpaths --enable-stopwatch --enable-streams --enable-sysoptions --enable-textbuf --enable-textfile --enable-timer --enable-unicode --enable-html --enable-htmlhelp --enable-xrc --enable-constraints --enable-printarch --enable-mdi --enable-mdidoc --enable-loggui --enable-logwin --enable-logdialog --enable-protocol --enable-protocol-http --enable-protocol-ftp --enable-protocol-file --enable-threads --enable-docview --enable-help --enable-palette --enable-image --enable-gif --enable-pcx --enable-iff --enable-coldlg --enable-filedlg --enable-finddlg --enable-fontdlg --enable-dirdlg --enable-msgdlg --enable-numberdlg --enable-splash --enable-textdlg --enable-tipdlg --enable-progressdlg --enable-wizarddlg --enable-menus --enable-miniframe --enable-tooltips --enable-splines --enable-mousewheel --enable-validators --enable-busyinfo --enable-joystick --enable-dragimage --enable-palette --enable-image --enable-gif --enable-pcx --enable-iff --enable-pnm --enable-xpm --enable-clipboard --enable-dnd --enable-controls   --enable-button        --enable-bmpbutton     --enable-calendar      --enable-caret         --enable-checkbox      --enable-checklst      --enable-choice --enable-choicebook --enable-combobox   --enable-datepick   --enable-display    --enable-gauge      --enable-grid       --enable-imaglist   --enable-listbook   --enable-listbox    --enable-listctrl   --enable-notebook   --enable-radiobox   --enable-radiobtn   --enable-sash       --enable-scrollbar  --enable-slider     --enable-spinbtn    --enable-spinctrl   --enable-splitter   --enable-statbmp    --enable-statbox    --enable-statline   --enable-stattext   --enable-statusbar  --enable-tabdialog  --enable-textctrl   --enable-togglebtn  --enable-toolbar    --enable-tbarnative --enable-tbarsmpl  --enable-treectrl  --enable-tipwindow --enable-popupwin  --enable-commondlg --enable-choicedlg  --enable-debug --prefix=/usr/local/test_cb/ &lt;br /&gt;
 $ gmake &amp;amp;&amp;amp; gmake install&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====prerequis====&lt;br /&gt;
* Before playing with CodeBlocks, you have to install four softwares :&lt;br /&gt;
** from the Companion DVD Software of Sun (cf [[http://www.sun.com/software/solaris/freeware/ to download them]]), &lt;br /&gt;
** you need to install theses packages : SFWaconf, SFWamake, SFWltool (and pkgadd -d ) from Blastwave, Subversion (cf [[http://www.blastwave.org/howto.html the how to]]) with&lt;br /&gt;
&lt;br /&gt;
 $ pkg-get -i subversion&lt;br /&gt;
&lt;br /&gt;
* You have to check if &amp;quot;&amp;quot;/usr/sfw/lib/libstdc++.la&amp;quot;&amp;quot; is empty or not... If it's empty, you have to install the sun patch 123648-01 or following [[http://www.asyd.net/home/docs/solaris/pkgsrc?DokuWiki=aceea11459b983bb6ee3fc1fe59b1806#libstdc_.la correction sur &amp;quot;&amp;quot;libstdc++.la&amp;quot;&amp;quot;]]&lt;br /&gt;
&lt;br /&gt;
====CodeBlocks====&lt;br /&gt;
* Go to a directory (for exemple ~/prog/codeblocks)&lt;br /&gt;
* Modify your PATH (for including automake, autoconf, libtool &amp;amp; wxWidgets) and M4 for wxWidgets&lt;br /&gt;
&lt;br /&gt;
 $ export PATH=$PATH:/opt/sfw/bin:/usr/local/test_cb/bin/&lt;br /&gt;
 $ export ACLOCAL_FLAGS=&amp;quot;-I `wx-config --prefix`/share/aclocal&amp;quot;&lt;br /&gt;
&lt;br /&gt;
* Download the SVN version of CodeBlocks :&lt;br /&gt;
 $ /opt/csw/bin/svn checkout svn://svn.berlios.de/codeblocks/trunk&lt;br /&gt;
 $ cd trunk&lt;br /&gt;
&lt;br /&gt;
'''UPDATE''': you don't have to do below anymore with svn (1 dec 2006)&lt;br /&gt;
* You have to remove thoses two lines from bootstrap :&lt;br /&gt;
&lt;br /&gt;
 export WANT_AUTOMAKE='1.7'&lt;br /&gt;
 export WANT_AUTOCONF='2.5'&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* You have to correct Makefile with this [[http://www.algonet.se/~afb/wx/codeblocks-wxauigtk.patch patch]] :&lt;br /&gt;
in src/src/wxAUI/Makefile.am, add the following line&lt;br /&gt;
&lt;br /&gt;
 libwxaui_la_LDFLAGS = `pkg-config --libs gtk+-2.0`&lt;br /&gt;
&lt;br /&gt;
before&lt;br /&gt;
&lt;br /&gt;
 libwxaui_la_SOURCES = manager.cpp&lt;br /&gt;
&lt;br /&gt;
and in src/src/Makefile.am, please modify this line :&lt;br /&gt;
&lt;br /&gt;
 codeblocks_LDFLAGS =&lt;br /&gt;
&lt;br /&gt;
to have that :&lt;br /&gt;
&lt;br /&gt;
 codeblocks_LDFLAGS = `pkg-config --libs gtk+-2.0`&lt;br /&gt;
&lt;br /&gt;
* Configuring CodeBlocks :&lt;br /&gt;
&lt;br /&gt;
 $ ./configure --prefix=/usr/local/test_cb/  --enable-debug&lt;br /&gt;
 $ gmake &amp;amp;&amp;amp; gmake install&lt;br /&gt;
&lt;br /&gt;
Try a [http://www.registry-repair-tools.net registry repair tool] too.&lt;/div&gt;</summary>
		<author><name>MergeMac</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=Installing_Code::Blocks_nightly_build_on_Mac_OS_X&amp;diff=6442</id>
		<title>Installing Code::Blocks nightly build on Mac OS X</title>
		<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php?title=Installing_Code::Blocks_nightly_build_on_Mac_OS_X&amp;diff=6442"/>
		<updated>2010-10-26T15:39:07Z</updated>

		<summary type="html">&lt;p&gt;MergeMac: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Installing Code::Blocks]]&lt;br /&gt;
[[Category:Installing Code::Blocks nightly build]]&lt;br /&gt;
This article describes how to install a nightly build of Code::Blocks.&lt;br /&gt;
&lt;br /&gt;
:''NOTE'': The nightly builds for Mac OS X are not official (just yet)&lt;br /&gt;
&lt;br /&gt;
The packages are currently done infrequently, and not really &amp;quot;nightly&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=== Install steps ===&lt;br /&gt;
&lt;br /&gt;
# Download the Developer Tools from [http://developer.apple.com/tools/ Apple], if not installed with Mac OS X.&lt;br /&gt;
#* For Mac OS X 10.4, you need to install Xcode Tools version 2.4 or later&lt;br /&gt;
# Download the latest Mac binary ZIP package of Code::Blocks, from [http://developer.berlios.de/project/showfiles.php?group_id=5358 BerliOS].&lt;br /&gt;
#* For Mac OS X 10.4 up to 10.6 (PowerPC or Intel), download the &amp;quot;Universal&amp;quot;&lt;br /&gt;
# Now unpack the zip file package, and put CodeBlocks.app where you like it.&lt;br /&gt;
#* The suggested location is /Developer/Applications or ~/Applications.&lt;br /&gt;
#* wxWidgets (2.8.x, dylib) is included inside the application bundle.&lt;br /&gt;
&lt;br /&gt;
=== MacPorts ===&lt;br /&gt;
&lt;br /&gt;
If you prefer, you can install Code::Blocks / wxWidgets using [http://www.macports.org MacPorts] instead:&lt;br /&gt;
[[Installing_Code::Blocks_from_source_on_Mac_OS_X#Install_with_MacPorts]].&lt;br /&gt;
&lt;br /&gt;
There are no binary packages for MacPorts just yet, so it compiles from the source.&lt;br /&gt;
&lt;br /&gt;
=== Known Issues ===&lt;br /&gt;
&lt;br /&gt;
First of all, see the issues that apply to all builds of Code::Blocks:&lt;br /&gt;
&lt;br /&gt;
* /index.php?board=20.0 (release notes)&lt;br /&gt;
* http://developer.berlios.de/bugs/?group_id=5358 (reported bugs)&lt;br /&gt;
&lt;br /&gt;
There are also some bugs that only apply to the Mac OS X version:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;s&amp;gt;Open in console doesn't work with Terminal.app, only wxGTK/X11/xterm&amp;lt;/s&amp;gt;&lt;br /&gt;
* &amp;lt;s&amp;gt;Splash window is not centered on the display&amp;lt;/s&amp;gt;&lt;br /&gt;
* Occasional &amp;quot;can't flush file descriptor 12&amp;quot;&lt;br /&gt;
* Batch building (from the terminal) crashes&lt;br /&gt;
&lt;br /&gt;
Not really bugs, but some things that might require extra setup:&lt;br /&gt;
* There is no direct support for adding frameworks, use -framework&lt;br /&gt;
* The default package does not have developer files for wxWidgets&lt;br /&gt;
* Not all wizards have Mac tweaks to the generated code/projects&lt;br /&gt;
* Not all of the included contributed plugins work on Mac just yet&lt;br /&gt;
&lt;br /&gt;
[http://www.mac-how.net how to recover deleted files on mac]&lt;/div&gt;</summary>
		<author><name>MergeMac</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=Installing_Code::Blocks_from_source_on_Mac_OS_X&amp;diff=6415</id>
		<title>Installing Code::Blocks from source on Mac OS X</title>
		<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php?title=Installing_Code::Blocks_from_source_on_Mac_OS_X&amp;diff=6415"/>
		<updated>2010-08-29T06:43:01Z</updated>

		<summary type="html">&lt;p&gt;MergeMac: /* Install Developer Tools */&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 Apple Mac OS X.&lt;br /&gt;
They have been tested under Mac OS X version 10.4 (PowerPC and Intel),&lt;br /&gt;
and should work similarly on the newer Mac OS X 10.5 and 10.6 as well.&lt;br /&gt;
&lt;br /&gt;
We will be building everything from scratch using the source code, and&lt;br /&gt;
not use any available package managers like&lt;br /&gt;
[http://www.macports.org MacPorts],&lt;br /&gt;
[http://fink.sourceforge.net/ Fink],&lt;br /&gt;
[http://gentoo-wiki.com/Gentoo_MacOS Gentoo] or&lt;br /&gt;
[http://rpm4darwin.sourceforge.net RPM].&lt;br /&gt;
Packaging can be done later, once it has reached a more stable release.&lt;br /&gt;
&lt;br /&gt;
Update: building for MacPorts can be found at the end of the document.&lt;br /&gt;
&lt;br /&gt;
== Install Developer Tools ==&lt;br /&gt;
&lt;br /&gt;
If they didn't come bundled with Mac OS X, get the Xcode Tools (or Developer Tools for older Mac OS X) from http://developer.apple.com/tools/ or from your install disk.&lt;br /&gt;
&lt;br /&gt;
This will install Apple versions of:&lt;br /&gt;
&lt;br /&gt;
* http://www.gnu.org/software/gcc/ (GNU Compilers)&lt;br /&gt;
* http://www.gnu.org/software/gdb/ (GNU Debugger)&lt;br /&gt;
* http://www.gnu.org/software/make/ (GNU Make)&lt;br /&gt;
&lt;br /&gt;
Apple regularly pulls all older links in order to promote newer Mac OS X, but all the&lt;br /&gt;
old developer tools can be downloaded from ADC at http://connect.apple.com/&lt;br /&gt;
&lt;br /&gt;
You need a (free) developer registration with Apple first, in order to log in there.&lt;br /&gt;
For Mac OS X 10.4, you want (at least) Xcode 2.2, since earlier versions were buggy.&lt;br /&gt;
&lt;br /&gt;
[http://www.mac-how.net Mac How]&lt;br /&gt;
&lt;br /&gt;
== Check Autotools versions ==&lt;br /&gt;
&lt;br /&gt;
Depending on your OS version, you might need to download and compile new versions of these:&lt;br /&gt;
&lt;br /&gt;
* http://www.gnu.org/software/autoconf/ (GNU Autoconf)&lt;br /&gt;
* http://www.gnu.org/software/automake/ (GNU Automake)&lt;br /&gt;
* http://www.gnu.org/software/libtool/ (GNU Libtool)&lt;br /&gt;
&lt;br /&gt;
Check what you have, with &amp;lt;tt&amp;gt;--version&amp;lt;/tt&amp;gt; (note that GNU libtool is called &amp;quot;glibtool&amp;quot; on Mac OS X)&lt;br /&gt;
&lt;br /&gt;
Currently Code::Blocks requires versions:&lt;br /&gt;
* autoconf 2.50+&lt;br /&gt;
* automake 1.7+ (1.9+ needed in order to build the dist tarball)&lt;br /&gt;
* libtool 1.4+ (1.5.8+ highly recommended to get some bug fixes)&lt;br /&gt;
&lt;br /&gt;
=== Automake example ===&lt;br /&gt;
&lt;br /&gt;
For Mac OS X 10.4, you will only need an upgraded (local) installation of automake 1.9.x.&lt;br /&gt;
&lt;br /&gt;
You can download &amp;quot;[ftp://ftp.gnu.org/gnu/automake/automake-1.9.6.tar.gz automake-1.9.6.tar.gz]&amp;quot; and configure and install it with something like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
./configure --prefix=/usr/local --program-suffix=-1.9&lt;br /&gt;
make&lt;br /&gt;
sudo make install&lt;br /&gt;
sudo cp -pi /usr/share/aclocal/libtool.m4 /usr/local/share/aclocal-1.9/&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Since it's now known as &amp;quot;automake-1.9&amp;quot;, it won't interfere with the regular &amp;quot;automake&amp;quot;&lt;br /&gt;
&lt;br /&gt;
If you would rather have the new version to be called when calling &amp;quot;automake&amp;quot;, let it install into /usr/local and put /usr/local/bin before /usr/bin in your PATH.&lt;br /&gt;
&lt;br /&gt;
=== Libtool example ===&lt;br /&gt;
Download [http://www.gnu.org/software/libtool/ libtool] source. The following instructions will overwrite your current version of libtool with the one you just downloaded.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd /libtool-*/&lt;br /&gt;
./configure --prefix=/usr --program-prefix=g&lt;br /&gt;
make&lt;br /&gt;
sudo make install&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that this will replace the system version of glibtool, which might have some compatibility issues with building other software.&lt;br /&gt;
&lt;br /&gt;
== FYI: Universal Binaries ==&lt;br /&gt;
&lt;br /&gt;
If you are building for Mac OS X 10.4 or later, you might want to build &amp;quot;[http://www.apple.com/universal/ Universal Binaries ]&amp;quot;&lt;br /&gt;
These are binaries that contain code for both PowerPC (&amp;quot;ppc&amp;quot; arch) and Intel (&amp;quot;i386&amp;quot; arch)&lt;br /&gt;
&lt;br /&gt;
The basic flags that needs to be added are:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CFLAGS += &amp;quot;-isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc&amp;quot;&lt;br /&gt;
&lt;br /&gt;
CXXFLAGS += &amp;quot;-isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
(You only need the sysroot parameter on PowerPC Macintosh, not on a Intel Macintosh)&lt;br /&gt;
The &amp;quot;-arch i386 -arch ppc&amp;quot; is what tells the compiler to build a &amp;quot;universal&amp;quot; (or &amp;quot;fat&amp;quot;) binary.&lt;br /&gt;
&lt;br /&gt;
Usually it's easiest to build one version for &amp;quot;powerpc-apple-darwin8&amp;quot;,&lt;br /&gt;
and one version for &amp;quot;i686-apple-darwin8&amp;quot;, and then merge them with &amp;quot;[http://developer.apple.com/documentation/Darwin/Reference/ManPages/man1/lipo.1.html lipo]&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
./configure --host=powerpc-apple-darwin8 --target=powerpc-apple-darwin8&lt;br /&gt;
&lt;br /&gt;
./configure --host=i686-apple-darwin8 --target=i686-apple-darwin8&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Some caveats:&lt;br /&gt;
* pre-compiled headers might fail with a &amp;quot;no main&amp;quot; error. If they do, add a -c to only compile them&lt;br /&gt;
* when cross-compiling, tools like auto_revision might fail to build. copy these from a native build&lt;br /&gt;
* the Tiger compilers might crash from time to time, but that is only to be expected (it seems)...&lt;br /&gt;
&lt;br /&gt;
See [http://developer.apple.com/technotes/tn2005/tn2137.html Technical Note TN2137]: Building Universal &lt;br /&gt;
Binaries from &amp;quot;configure&amp;quot;-based Open Source Projects&lt;br /&gt;
&lt;br /&gt;
== FYI: Compilers ==&lt;br /&gt;
&lt;br /&gt;
When building for older versions of the SDK, you want to make sure to use the same compiler.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CC = gcc-4.0&lt;br /&gt;
&lt;br /&gt;
CXX = g++-4.0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Mac OS X 10.6 has GCC 4.2 as the default compiler, which won't work for the Mac OS X 10.4 SDK.&lt;br /&gt;
&lt;br /&gt;
== FYI: ANSI or UNICODE ==&lt;br /&gt;
&lt;br /&gt;
For the moment we are using &amp;quot;ANSI&amp;quot; (--disable-unicode, default) for Mac OS X 10.3 and earlier,&lt;br /&gt;
and &amp;quot;UNICODE&amp;quot; (--enable-unicode, optional) for Mac OS X 10.4 and later. &lt;br /&gt;
&lt;br /&gt;
See http://www.wxwidgets.org/manuals/stable/wx_unicode.html#unicodeandansi&lt;br /&gt;
&lt;br /&gt;
== FYI: 32-bit or 64-bit ==&lt;br /&gt;
&lt;br /&gt;
Code::Blocks currently uses wxMac (wxOSX/Carbon), which is 32-bit only. So it's not possible to build for &amp;quot;x86_64&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
When Code::Blocks (and requirements) has been updated to use wxOSX/Cocoa, then a 64-bit version might be built too.&lt;br /&gt;
&lt;br /&gt;
== Build wxWidgets ==&lt;br /&gt;
&lt;br /&gt;
=== Download the source code ===&lt;br /&gt;
&lt;br /&gt;
Download the tarball for the wxMac release:&lt;br /&gt;
&lt;br /&gt;
http://wxwidgets.org/downloads/&lt;br /&gt;
&lt;br /&gt;
=== Apply necessary patches ===&lt;br /&gt;
&lt;br /&gt;
Don't forget to apply any released patches!&lt;br /&gt;
&lt;br /&gt;
http://wxwidgets.org/downloads/patch.htm&lt;br /&gt;
&lt;br /&gt;
=== Configure and (GNU) Make ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mkdir mac-build&lt;br /&gt;
cd mac-build&lt;br /&gt;
../configure --enable-shared --enable-monolithic --enable-unicode --with-mac --with-opengl \&lt;br /&gt;
            --with-png=builtin --with-jpeg=builtin --with-tiff=builtin --with-expat=builtin&lt;br /&gt;
nice make&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
note: the easiest way to build a Universal Binary with wxWidgets is&lt;br /&gt;
the new flag: --enable-universal_binary (you need wxWidgets 2.6.4+)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
--enable-universal_binary --with-macosx-sdk=/Developer/SDKs/MacOSX10.4u.sdk --with-macosx-version-min=10.4&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Install into Destination ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo make install&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Bundle library for Mac ==&lt;br /&gt;
&lt;br /&gt;
To avoid having the Code::Blocks user having to compile or install wxWidgets themselves,&lt;br /&gt;
we can bundle it with our application so that it is contained in the application bundle.&lt;br /&gt;
This could also be done by statically linking wxWidgets, but with dynamic linking we can&lt;br /&gt;
share the wxWidgets library between all applications using wxWidgets (not just Code::Blocks)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Way One: Library (dynamic) ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/usr/local/include/wx-2.8/wx/wx.h&lt;br /&gt;
/usr/local/lib/libwx_macu-2.8.dylib -&amp;gt; libwx_macu-2.8.0.dylib&lt;br /&gt;
/usr/local/lib/libwx_macu-2.8.0.dylib -&amp;gt; libwx_macu-2.8.0.6.0.dylib&lt;br /&gt;
/usr/local/lib/libwx_macu-2.8.0.6.0.dylib&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To bundle our shared library with the application, we include it in &amp;quot;MacOS&amp;quot; and change the path:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
install_name_tool -id @executable_path/libwx_macu-2.8.0.dylib&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
@executable_path will be replaced with e.g. /Developer/Applications/CodeBlocks.app/Contents/MacOS&lt;br /&gt;
&lt;br /&gt;
=== Way Two: Framework (bundle) ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/Library/Frameworks/wx.framework/Headers -&amp;gt; Versions/Current/Headers&lt;br /&gt;
/Library/Frameworks/wx.framework/wx -&amp;gt; Versions/Current/wx&lt;br /&gt;
/Library/Frameworks/wx.framework/Versions/Current -&amp;gt; 2.8&lt;br /&gt;
/Library/Frameworks/wx.framework/Versions/2.8/Headers/wx.h&lt;br /&gt;
/Library/Frameworks/wx.framework/Versions/2.8/wx  -&amp;gt; libwx_macu-2.8.0.dylib&lt;br /&gt;
/Library/Frameworks/wx.framework/Versions/2.8/libwx_macu-2.8.0.dylib  -&amp;gt; libwx_macu-2.8.0.6.0.dylib&lt;br /&gt;
/Library/Frameworks/wx.framework/Versions/2.8/libwx_macu-2.8.0.6.0.dylib&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To bundle our framework with the application, we include it in &amp;quot;Frameworks&amp;quot; and change the path:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
install_name_tool -id @executable_path/../Frameworks/wx.framework/Versions/2.8/libwx_macu-2.8.0.dylib&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This way it will first look in the framework path (-F), and then in for the shared library path (-L) as usual.&lt;br /&gt;
&lt;br /&gt;
== Install Subversion client ==&lt;br /&gt;
&lt;br /&gt;
On Mac OS X 10.4, you need to install the Subversion (svn) program:&lt;br /&gt;
&lt;br /&gt;
http://subversion.tigris.org/&lt;br /&gt;
&lt;br /&gt;
Note: you need SVN for the Code::Blocks revision scripts to work!&lt;br /&gt;
&lt;br /&gt;
== Build CodeBlocks from SVN ==&lt;br /&gt;
&lt;br /&gt;
=== Download the source code ===&lt;br /&gt;
&lt;br /&gt;
https://www.codeblocks.org/source_code.shtml&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
svn checkout svn://svn.berlios.de/codeblocks/trunk&lt;br /&gt;
cd trunk&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Apply necessary patches ===&lt;br /&gt;
&lt;br /&gt;
For a list of all available patches, see:&lt;br /&gt;
&lt;br /&gt;
http://developer.berlios.de/patch/?group_id=5358&lt;br /&gt;
&lt;br /&gt;
You might need to convert line endings from DOS to Unix first.&lt;br /&gt;
&lt;br /&gt;
=== Bootstrap with Autotools ===&lt;br /&gt;
&lt;br /&gt;
You need to use the newer version of automake (see above), for the &amp;quot;bootstrap&amp;quot;. (OS X 10.5 users may have recent enough autotools so they may not need to install them)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# if you installed newer autotools under names with suffixes.&lt;br /&gt;
export AUTOMAKE=automake-1.9&lt;br /&gt;
export ACLOCAL=aclocal-1.9&lt;br /&gt;
&lt;br /&gt;
# do bootstrap. you may need to adapt /usr/share/aclocal&lt;br /&gt;
# to whatever other location you may use&lt;br /&gt;
# (for instance, in my case, /usr/local/share/aclocal)&lt;br /&gt;
ACLOCAL_FLAGS=&amp;quot;-I /usr/share/aclocal&amp;quot; ./bootstrap&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Mono Fix ===&lt;br /&gt;
&lt;br /&gt;
If you have the Mono.framework installed, then it probably set up a symlink like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/usr/bin/pkg-config -&amp;gt; /Library/Frameworks/Mono.framework/Commands/pkg-config&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Unless you have a &amp;quot;proper&amp;quot; [http://pkgconfig.freedesktop.org/ pkg-config] installation the Code::Blocks configure will fail, so move this symbolic link aside.&lt;br /&gt;
&lt;br /&gt;
=== Configure ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
./configure --with-contrib-plugins=all&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note: the easiest way to build a Universal Binary for Code::Blocks is to build once for PowerPC (-arch ppc) and once for Intel (-arch i386), and then merge them (with lipo) afterwards.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mkdir ppc-build&lt;br /&gt;
cd ppc-build&lt;br /&gt;
../configure --host=powerpc-apple-darwin8 --target=powerpc-apple-darwin8 --with-contrib-plugins=all&lt;br /&gt;
cd ..&lt;br /&gt;
&lt;br /&gt;
mkdir x86-build&lt;br /&gt;
cd x86-build&lt;br /&gt;
../configure --host=i686-apple-darwin8 --target=i686-apple-darwin8 --with-contrib-plugins=all&lt;br /&gt;
cd ..&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note: You need to patch the location of the pre-compiled headers, or it will generate them in the same place for both arch.&lt;br /&gt;
&lt;br /&gt;
=== Tiger Fix ===&lt;br /&gt;
&lt;br /&gt;
There is a bug in the glibtool of Mac OS X 10.4, that fails to link C++ libs:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ld: multiple definitions of symbol ___umoddi3&lt;br /&gt;
/usr/lib/gcc/powerpc-apple-darwin8/4.0.1/libgcc.a(_umoddi3.o) private external definition of ___umoddi3 in section (__TEXT,__text)&lt;br /&gt;
/usr/lib/gcc/powerpc-apple-darwin8/4.0.1/../../../libgcc_s.10.4.dylib(_umoddi3_s.o) definition of ___umoddi3&lt;br /&gt;
&lt;br /&gt;
ld: multiple definitions of symbol ___umoddi3&lt;br /&gt;
/usr/lib/gcc/i686-apple-darwin8/4.0.1/libgcc.a(_umoddi3.o) private external definition of ___umoddi3 in section (__TEXT,__text)&lt;br /&gt;
/usr/lib/gcc/i686-apple-darwin8/4.0.1/../../../libgcc_s.10.4.dylib(_umoddi3_s.o) definition of ___umoddi3&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To work around this, you need to edit the generated &amp;quot;libtool&amp;quot; script manually:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
177c177&lt;br /&gt;
&amp;lt; whole_archive_flag_spec=&amp;quot;-all_load \$convenience&amp;quot;&lt;br /&gt;
---&lt;br /&gt;
&amp;gt; whole_archive_flag_spec=&amp;quot;&amp;quot;&lt;br /&gt;
6921c6921&lt;br /&gt;
&amp;lt; whole_archive_flag_spec=&amp;quot;-all_load \$convenience&amp;quot;&lt;br /&gt;
---&lt;br /&gt;
&amp;gt; whole_archive_flag_spec=&amp;quot;&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This bug has been fixed in GNU libtool 1.5.8 and later.&lt;br /&gt;
&lt;br /&gt;
=== (GNU) Make ===&lt;br /&gt;
&lt;br /&gt;
&amp;quot;nice&amp;quot; isn't strictly needed, it just makes the compile run at a lower process priority&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
nice make&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the Universal Binary build:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd ppc-build&lt;br /&gt;
nice make&lt;br /&gt;
cd ..&lt;br /&gt;
&lt;br /&gt;
cd x86-build&lt;br /&gt;
nice make&lt;br /&gt;
cd ..&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Install into Destination ===&lt;br /&gt;
&lt;br /&gt;
&amp;quot;sudo&amp;quot; asks you for an admin password, in order to get install permissions&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo make install&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the Universal Binary build:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd ppc-build&lt;br /&gt;
make install DESTDIR=/tmp/ppc&lt;br /&gt;
cd ..&lt;br /&gt;
&lt;br /&gt;
cd x86-build&lt;br /&gt;
make install DESTDIR=/tmp/x86&lt;br /&gt;
cd ..&lt;br /&gt;
&lt;br /&gt;
lipomerge /tmp/ppc /tmp/x86 /tmp/fat&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where &amp;quot;lipomerge&amp;quot; is a custom shell script:&lt;br /&gt;
&lt;br /&gt;
* http://www.algonet.se/~afb/wx/lipomerge&lt;br /&gt;
&lt;br /&gt;
== Bundle application for Mac ==&lt;br /&gt;
&lt;br /&gt;
After building codeblocks in the regular Unix way, you need to bundle it with the icons&lt;br /&gt;
and various other info that it needs to make a regular stand-alone Macintosh application.&lt;br /&gt;
&lt;br /&gt;
There are two ways of accomplishing this, old Mac OS-style resource or NeXT-style bundle.&lt;br /&gt;
The old resources are handy while developing, while bundles are more suitable for release.&lt;br /&gt;
&lt;br /&gt;
Note: You '''need''' to use either of these methods, or your application will launch&lt;br /&gt;
in the background behind all other windows and will be unable to receive any events!&lt;br /&gt;
&lt;br /&gt;
=== Way One: Mac OS (resource) ===&lt;br /&gt;
&lt;br /&gt;
http://developer.apple.com/documentation/Carbon/Reference/Resource_Manager/&lt;br /&gt;
&lt;br /&gt;
Handy while developing, as you don't need to create a whole bundle.&lt;br /&gt;
&lt;br /&gt;
First we install the program to the PREFIX directory of your choice:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$PREFIX/bin&lt;br /&gt;
$PREFIX/lib&lt;br /&gt;
$PREFIX/share/codeblocks&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note: on the Intel Macintoshes, the icon comes up as &amp;quot;broken&amp;quot;&lt;br /&gt;
(apparently it assumes that all apps with resforks are Classic)&lt;br /&gt;
&lt;br /&gt;
Start the application with a small prefix shell wrapper like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:$PREFIX/lib&lt;br /&gt;
export DYLD_LIBRARY_PATH&lt;br /&gt;
&lt;br /&gt;
$PREFIX/bin/codeblocks --prefix=$PREFIX&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You don't need the &amp;quot;DYLD_LIBRARY_PATH&amp;quot; stuff,&lt;br /&gt;
if you are installing to a system directory.&lt;br /&gt;
&lt;br /&gt;
==== Common PREFIX Settings ====&lt;br /&gt;
&lt;br /&gt;
Local: &amp;lt;tt&amp;gt;PREFIX=/usr/local&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
System: &amp;lt;tt&amp;gt;PREFIX=/usr&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
MacPorts: &amp;lt;tt&amp;gt;PREFIX=/opt/local&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Fink: &amp;lt;tt&amp;gt;PREFIX=/sw&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Way Two: NeXT (bundle) ===&lt;br /&gt;
&lt;br /&gt;
http://developer.apple.com/documentation/CoreFoundation/Conceptual/CFBundles/&lt;br /&gt;
&lt;br /&gt;
This does not involve resources, and is more relocatable.&lt;br /&gt;
&lt;br /&gt;
Files needed:&lt;br /&gt;
* codeblocks.plist (generated, rename to &amp;quot;Info.plist&amp;quot;)&lt;br /&gt;
* codeblocks.sh (shell wrapper, rename to &amp;quot;CodeBlocks&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
&lt;br /&gt;
DIR=&amp;quot;`dirname \&amp;quot;$0\&amp;quot;`/..&amp;quot;&lt;br /&gt;
&lt;br /&gt;
BIN=&amp;quot;$DIR/bin&amp;quot;&lt;br /&gt;
LIB=&amp;quot;$DIR/lib&amp;quot;&lt;br /&gt;
&lt;br /&gt;
DYLD_LIBRARY_PATH=&amp;quot;$DYLD_LIBRARY_PATH:$LIB&amp;quot;&lt;br /&gt;
export DYLD_LIBRARY_PATH&lt;br /&gt;
&lt;br /&gt;
exec &amp;quot;$BIN/codeblocks&amp;quot; --prefix=&amp;quot;$DIR&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* app.icns (icons are available in src/src/resources/icons)&lt;br /&gt;
&lt;br /&gt;
The MacOS program will just be a shell wrapper that calls &amp;quot;bin/codeblocks&amp;quot;, like above.&lt;br /&gt;
Traditionally the bundle would include Frameworks and Resources, but we'll just avoid those&lt;br /&gt;
here and use the regular &amp;quot;lib&amp;quot; and &amp;quot;share/codeblocks&amp;quot; instead (just as with a regular install). &lt;br /&gt;
These temporary directories are listed in italic below, they're not really used in bundles...&lt;br /&gt;
&lt;br /&gt;
Setup a hierarchy like this, and copy the files from the regular build/install and the above file list to it:&lt;br /&gt;
&lt;br /&gt;
  CodeBlocks.app&lt;br /&gt;
  CodeBlocks.app/Contents/&lt;br /&gt;
  CodeBlocks.app/Contents/Info.plist&lt;br /&gt;
  CodeBlocks.app/Contents/MacOS/&lt;br /&gt;
  CodeBlocks.app/Contents/MacOS/CodeBlocks&lt;br /&gt;
  CodeBlocks.app/Contents/Resources/&lt;br /&gt;
  CodeBlocks.app/Contents/Resources/app.icns&lt;br /&gt;
  ''CodeBlocks.app/Contents/bin/''&lt;br /&gt;
  ''CodeBlocks.app/Contents/lib/''&lt;br /&gt;
  ''CodeBlocks.app/Contents/share/codeblocks/''&lt;br /&gt;
&lt;br /&gt;
The CodeBlocks application can now be moved with the Finder, and started up like a regular Mac application. (the nightly build includes a more advanced Info.plist and more icons - for also mapping all the files that the application can open, like source code and header files and such)&lt;br /&gt;
&lt;br /&gt;
==== Proper Application Bundling ====&lt;br /&gt;
&lt;br /&gt;
To avoid the shell wrapper, the binary can now be moved from &amp;quot;bin/codeblocks&amp;quot; to &amp;quot;MacOS/CodeBlocks&amp;quot;. Helper files are moved from &amp;quot;share/codeblocks&amp;quot; to &amp;quot;Resources&amp;quot;. The dynamic libraries are moved from &amp;quot;lib&amp;quot; to &amp;quot;MacOS&amp;quot;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mv bin/codeblocks MacOS/CodeBlocks&lt;br /&gt;
rmdir bin&lt;br /&gt;
mv lib/* MacOS/&lt;br /&gt;
rmdir lib&lt;br /&gt;
mv share Resources/&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To avoid having to use a DYLD_LIBRARY_PATH, we rename the shared libraries (with the install_name_tool program) from e.g. /usr/local/lib/ to @executable_path/:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
install_name_tool -change /usr/local/lib/libcodeblocks.0.dylib \&lt;br /&gt;
                          @executable_path/libcodeblocks.0.dylib MacOS/CodeBlocks&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The libraries can have their names changed using the -id parameter:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
install_name_tool -id @executable_path/libcodeblocks.0.dylib MacOS/libcodeblocks.0.dylib&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You also need to change all of the loadable bundles for the plugins:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
for so in Resources/plugins/*.so&lt;br /&gt;
do install_name_tool -change /usr/local/lib/libcodeblocks.0.dylib \&lt;br /&gt;
                             @executable_path/libcodeblocks.0.dylib $so&lt;br /&gt;
done&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can check the result, what libraries/frameworks it links to, with:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
otool -L CodeBlocks&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Optionally you can then repeat the process, for the wx library too...&lt;br /&gt;
&lt;br /&gt;
Here is a full script to do the job... It assumes to be executed at the same directory level as the CodeBlockSVN.app directory that will receive all the stuff... maybe enhanced but it is a first try that do work when packaging an OS X SVN build.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
cp /usr/local/bin/codeblocks ./CodeBlocksSVN.app/Contents/MacOS/CodeBlocks&lt;br /&gt;
cp /usr/local/bin/cb_share_config ./CodeBlocksSVN.app/Contents/MacOS&lt;br /&gt;
cp /usr/local/bin/cb_console_runner ./CodeBlocksSVN.app/Contents/MacOS&lt;br /&gt;
cp /usr/local/bin/codesnippets ./CodeBlocksSVN.app/Contents/MacOS&lt;br /&gt;
cp /usr/local/lib/libwxsmithlib.0.dylib ./CodeBlocksSVN.app/Contents/MacOS&lt;br /&gt;
cp /usr/local/lib/libwx_macu-2.8.0.dylib ./CodeBlocksSVN.app/Contents/MacOS&lt;br /&gt;
cp /usr/local/lib/libcodeblocks.0.dylib ./CodeBlocksSVN.app/Contents/MacOS&lt;br /&gt;
&lt;br /&gt;
install_name_tool -id @executable_path/libcodeblocks.0.dylib ./CodeBlocksSVN.app/Contents/MacOS/libcodeblocks.0.dylib&lt;br /&gt;
install_name_tool -id @executable_path/libwx_macu-2.8.0.dylib ./CodeBlocksSVN.app/Contents/MacOS/libwx_macu-2.8.0.dylib&lt;br /&gt;
install_name_tool -id @executable_path/libwxsmithlib.0.dylib ./CodeBlocksSVN.app/Contents/MacOS/libwxsmithlib.0.dylib&lt;br /&gt;
&lt;br /&gt;
install_name_tool -change /usr/local/lib/libcodeblocks.0.dylib @executable_path/libcodeblocks.0.dylib ./CodeBlocksSVN.app/Contents/MacOS/CodeBlocks&lt;br /&gt;
install_name_tool -change /usr/local/lib/libwx_macu-2.8.0.dylib @executable_path/libwx_macu-2.8.0.dylib ./CodeBlocksSVN.app/Contents/MacOS/CodeBlocks&lt;br /&gt;
install_name_tool -change /usr/local/lib/libwxsmithlib.0.dylib @executable_path/libwxsmithlib.0.dylib ./CodeBlocksSVN.app/Contents/MacOS/CodeBlocks&lt;br /&gt;
&lt;br /&gt;
install_name_tool -change /usr/local/lib/libcodeblocks.0.dylib @executable_path/libcodeblocks.0.dylib ./CodeBlocksSVN.app/Contents/MacOS/codesnippets&lt;br /&gt;
install_name_tool -change /usr/local/lib/libwx_macu-2.8.0.dylib @executable_path/libwx_macu-2.8.0.dylib ./CodeBlocksSVN.app/Contents/MacOS/codesnippets&lt;br /&gt;
install_name_tool -change /usr/local/lib/libwxsmithlib.0.dylib @executable_path/libwxsmithlib.0.dylib ./CodeBlocksSVN.app/Contents/MacOS/codesnippets&lt;br /&gt;
&lt;br /&gt;
install_name_tool -change /usr/local/lib/libcodeblocks.0.dylib @executable_path/libcodeblocks.0.dylib ./CodeBlocksSVN.app/Contents/MacOS/cb_share_config&lt;br /&gt;
install_name_tool -change /usr/local/lib/libwx_macu-2.8.0.dylib @executable_path/libwx_macu-2.8.0.dylib ./CodeBlocksSVN.app/Contents/MacOS/cb_share_config&lt;br /&gt;
install_name_tool -change /usr/local/lib/libwxsmithlib.0.dylib @executable_path/libwxsmithlib.0.dylib ./CodeBlocksSVN.app/Contents/MacOS/cb_share_config&lt;br /&gt;
&lt;br /&gt;
install_name_tool -change /usr/local/lib/libcodeblocks.0.dylib @executable_path/libcodeblocks.0.dylib ./CodeBlocksSVN.app/Contents/MacOS/cb_console_runner&lt;br /&gt;
install_name_tool -change /usr/local/lib/libwx_macu-2.8.0.dylib @executable_path/libwx_macu-2.8.0.dylib ./CodeBlocksSVN.app/Contents/MacOS/cb_console_runner&lt;br /&gt;
install_name_tool -change /usr/local/lib/libwxsmithlib.0.dylib @executable_path/libwxsmithlib.0.dylib ./CodeBlocksSVN.app/Contents/MacOS/cb_console_runner&lt;br /&gt;
&lt;br /&gt;
install_name_tool -change /usr/local/lib/libwx_macu-2.8.0.dylib @executable_path/libwx_macu-2.8.0.dylib ./CodeBlocksSVN.app/Contents/MacOS/libcodeblocks.0.dylib&lt;br /&gt;
install_name_tool -change /usr/local/lib/libwxsmithlib.0.dylib @executable_path/libwxsmithlib.0.dylib ./CodeBlocksSVN.app/Contents/MacOS/libcodeblocks.0.dylib&lt;br /&gt;
&lt;br /&gt;
install_name_tool -change /usr/local/lib/libcodeblocks.0.dylib @executable_path/libcodeblocks.0.dylib ./CodeBlocksSVN.app/Contents/MacOS/libwxsmithlib.0.dylib&lt;br /&gt;
install_name_tool -change /usr/local/lib/libwx_macu-2.8.0.dylib @executable_path/libwx_macu-2.8.0.dylib ./CodeBlocksSVN.app/Contents/MacOS/libwxsmithlib.0.dylib&lt;br /&gt;
&lt;br /&gt;
cp -R /usr/local/share/codeblocks/ ./CodeBlocksSVN.app/Contents/Resources/share/codeblocks&lt;br /&gt;
&lt;br /&gt;
for dotso in ./CodeBlocksSVN.app/Contents/Resources/share/codeblocks/plugins/*.so&lt;br /&gt;
do&lt;br /&gt;
#echo $dotso&lt;br /&gt;
#	install_name_tool -id $dotso ./libcodeblocks.0.dylib CodeBlocks&lt;br /&gt;
	install_name_tool -change /usr/local/lib/libcodeblocks.0.dylib @executable_path/libcodeblocks.0.dylib $dotso&lt;br /&gt;
	install_name_tool -change /usr/local/lib/libwx_macu-2.8.0.dylib @executable_path/libwx_macu-2.8.0.dylib $dotso&lt;br /&gt;
	install_name_tool -change /usr/local/lib/libwxsmithlib.0.dylib @executable_path/libwxsmithlib.0.dylib $dotso&lt;br /&gt;
done&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== FYI: Darwin vs. Mac OS X ==&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Darwin is the UNIX technology-based foundation of Mac OS X.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
* http://developer.apple.com/referencelibrary/Darwin/&lt;br /&gt;
&lt;br /&gt;
* http://en.wikipedia.org/wiki/Darwin_(operating_system)&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Pure Darwin&amp;quot; here refers to the Open Source version of the OS:&lt;br /&gt;
&lt;br /&gt;
* http://www.opensource.apple.com/darwinsource/images/&lt;br /&gt;
&lt;br /&gt;
* http://puredarwin.org/ or http://gnu-darwin.sourceforge.net/&lt;br /&gt;
&lt;br /&gt;
(that is: Darwin using X11 instead of Aqua for the user interface)&lt;br /&gt;
&lt;br /&gt;
== Install with MacPorts ==&lt;br /&gt;
&lt;br /&gt;
=== Install wxWidgets ===&lt;br /&gt;
&lt;br /&gt;
You will need the wxWidgets library, install as port with:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo port install wxWidgets&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you want the X11/GTK version on Mac OS X, instead use:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo port install wxgtk&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Install Code::Blocks ===&lt;br /&gt;
&lt;br /&gt;
After that is installed, you can install Code::Blocks with:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo port install codeblocks-devel +aqua&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you want the X11/GTK version on Mac OS X, instead use:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo port install codeblocks-devel +x11&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will download the SVN trunk, and any dependencies:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
---&amp;gt;  Fetching codeblocks-devel&lt;br /&gt;
---&amp;gt;  Verifying checksum(s) for codeblocks-devel&lt;br /&gt;
---&amp;gt;  Extracting codeblocks-devel&lt;br /&gt;
---&amp;gt;  Configuring codeblocks-devel&lt;br /&gt;
---&amp;gt;  Building codeblocks-devel with target all&lt;br /&gt;
---&amp;gt;  Staging codeblocks-devel into destroot&lt;br /&gt;
---&amp;gt;  Packaging tgz archive for codeblocks-devel 1.0_0+aqua+macosx&lt;br /&gt;
---&amp;gt;  Installing codeblocks-devel 1.0_0+aqua+macosx&lt;br /&gt;
---&amp;gt;  Activating codeblocks-devel 1.0_0+aqua+macosx&lt;br /&gt;
---&amp;gt;  Cleaning codeblocks-devel&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note: to upgrade from SVN, you need to uninstall first:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo port uninstall codeblocks-devel&lt;br /&gt;
sudo port clean codeblocks-devel&lt;br /&gt;
sudo port install codeblocks-devel&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is both because all SVN versions are numbered &amp;quot;0&amp;quot;,&lt;br /&gt;
but also due to a bug in the Code::Blocks build scripts.&lt;br /&gt;
&lt;br /&gt;
=== Running &amp;lt;tt&amp;gt;+aqua&amp;lt;/tt&amp;gt; (wxMac) version ===&lt;br /&gt;
&lt;br /&gt;
After the build completes, you can start the program by:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
open /Applications/MacPorts/CodeBlocks.app&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that the wxMac application bundle in &amp;quot;MacPorts&amp;quot;&lt;br /&gt;
is just a wrapper, with symbolic links to /opt/local...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/opt/local/bin/codeblocks&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Running &amp;lt;tt&amp;gt;+x11&amp;lt;/tt&amp;gt; (wxGTK) version ===&lt;br /&gt;
&lt;br /&gt;
The non-bundled wxGTK version is instead started with:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/opt/local/bin/codeblocks&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When running X11/wxGTK programs in Mac OS X, you can use&lt;br /&gt;
&amp;quot;open-x11&amp;quot; to first start up X11.app and set up $DISPLAY:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
open-x11 /opt/local/bin/codeblocks&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>MergeMac</name></author>
	</entry>
	<entry>
		<id>https://wiki.codeblocks.org/index.php?title=Installing_Code::Blocks_from_source_on_Mac_OS_X&amp;diff=6410</id>
		<title>Installing Code::Blocks from source on Mac OS X</title>
		<link rel="alternate" type="text/html" href="https://wiki.codeblocks.org/index.php?title=Installing_Code::Blocks_from_source_on_Mac_OS_X&amp;diff=6410"/>
		<updated>2010-08-18T10:52:56Z</updated>

		<summary type="html">&lt;p&gt;MergeMac: /* Install Developer Tools */&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 Apple Mac OS X.&lt;br /&gt;
They have been tested under Mac OS X version 10.4 (PowerPC and Intel),&lt;br /&gt;
and should work similarly on the newer Mac OS X 10.5 and 10.6 as well.&lt;br /&gt;
&lt;br /&gt;
We will be building everything from scratch using the source code, and&lt;br /&gt;
not use any available package managers like&lt;br /&gt;
[http://www.macports.org MacPorts],&lt;br /&gt;
[http://fink.sourceforge.net/ Fink],&lt;br /&gt;
[http://gentoo-wiki.com/Gentoo_MacOS Gentoo] or&lt;br /&gt;
[http://rpm4darwin.sourceforge.net RPM].&lt;br /&gt;
Packaging can be done later, once it has reached a more stable release.&lt;br /&gt;
&lt;br /&gt;
Update: building for MacPorts can be found at the end of the document.&lt;br /&gt;
&lt;br /&gt;
== Install Developer Tools ==&lt;br /&gt;
&lt;br /&gt;
If they didn't come bundled with Mac OS X, get the Xcode Tools (or Developer Tools for older Mac OS X) from http://developer.apple.com/tools/ or from your install disk.&lt;br /&gt;
&lt;br /&gt;
This will install Apple versions of:&lt;br /&gt;
&lt;br /&gt;
* http://www.gnu.org/software/gcc/ (GNU Compilers)&lt;br /&gt;
* http://www.gnu.org/software/gdb/ (GNU Debugger)&lt;br /&gt;
* http://www.gnu.org/software/make/ (GNU Make)&lt;br /&gt;
&lt;br /&gt;
Apple regularly pulls all older links in order to promote newer Mac OS X, but all the&lt;br /&gt;
old developer tools can be downloaded from ADC at http://connect.apple.com/&lt;br /&gt;
&lt;br /&gt;
You need a (free) developer registration with Apple first, in order to log in there.&lt;br /&gt;
For Mac OS X 10.4, you want (at least) Xcode 2.2, since earlier versions were buggy.&lt;br /&gt;
&lt;br /&gt;
[http://www.mac-how.net More Info]&lt;br /&gt;
&lt;br /&gt;
== Check Autotools versions ==&lt;br /&gt;
&lt;br /&gt;
Depending on your OS version, you might need to download and compile new versions of these:&lt;br /&gt;
&lt;br /&gt;
* http://www.gnu.org/software/autoconf/ (GNU Autoconf)&lt;br /&gt;
* http://www.gnu.org/software/automake/ (GNU Automake)&lt;br /&gt;
* http://www.gnu.org/software/libtool/ (GNU Libtool)&lt;br /&gt;
&lt;br /&gt;
Check what you have, with &amp;lt;tt&amp;gt;--version&amp;lt;/tt&amp;gt; (note that GNU libtool is called &amp;quot;glibtool&amp;quot; on Mac OS X)&lt;br /&gt;
&lt;br /&gt;
Currently Code::Blocks requires versions:&lt;br /&gt;
* autoconf 2.50+&lt;br /&gt;
* automake 1.7+ (1.9+ needed in order to build the dist tarball)&lt;br /&gt;
* libtool 1.4+ (1.5.8+ highly recommended to get some bug fixes)&lt;br /&gt;
&lt;br /&gt;
=== Automake example ===&lt;br /&gt;
&lt;br /&gt;
For Mac OS X 10.4, you will only need an upgraded (local) installation of automake 1.9.x.&lt;br /&gt;
&lt;br /&gt;
You can download &amp;quot;[ftp://ftp.gnu.org/gnu/automake/automake-1.9.6.tar.gz automake-1.9.6.tar.gz]&amp;quot; and configure and install it with something like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
./configure --prefix=/usr/local --program-suffix=-1.9&lt;br /&gt;
make&lt;br /&gt;
sudo make install&lt;br /&gt;
sudo cp -pi /usr/share/aclocal/libtool.m4 /usr/local/share/aclocal-1.9/&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Since it's now known as &amp;quot;automake-1.9&amp;quot;, it won't interfere with the regular &amp;quot;automake&amp;quot;&lt;br /&gt;
&lt;br /&gt;
If you would rather have the new version to be called when calling &amp;quot;automake&amp;quot;, let it install into /usr/local and put /usr/local/bin before /usr/bin in your PATH.&lt;br /&gt;
&lt;br /&gt;
=== Libtool example ===&lt;br /&gt;
Download [http://www.gnu.org/software/libtool/ libtool] source. The following instructions will overwrite your current version of libtool with the one you just downloaded.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd /libtool-*/&lt;br /&gt;
./configure --prefix=/usr --program-prefix=g&lt;br /&gt;
make&lt;br /&gt;
sudo make install&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that this will replace the system version of glibtool, which might have some compatibility issues with building other software.&lt;br /&gt;
&lt;br /&gt;
== FYI: Universal Binaries ==&lt;br /&gt;
&lt;br /&gt;
If you are building for Mac OS X 10.4 or later, you might want to build &amp;quot;[http://www.apple.com/universal/ Universal Binaries ]&amp;quot;&lt;br /&gt;
These are binaries that contain code for both PowerPC (&amp;quot;ppc&amp;quot; arch) and Intel (&amp;quot;i386&amp;quot; arch)&lt;br /&gt;
&lt;br /&gt;
The basic flags that needs to be added are:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CFLAGS += &amp;quot;-isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc&amp;quot;&lt;br /&gt;
&lt;br /&gt;
CXXFLAGS += &amp;quot;-isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
(You only need the sysroot parameter on PowerPC Macintosh, not on a Intel Macintosh)&lt;br /&gt;
The &amp;quot;-arch i386 -arch ppc&amp;quot; is what tells the compiler to build a &amp;quot;universal&amp;quot; (or &amp;quot;fat&amp;quot;) binary.&lt;br /&gt;
&lt;br /&gt;
Usually it's easiest to build one version for &amp;quot;powerpc-apple-darwin8&amp;quot;,&lt;br /&gt;
and one version for &amp;quot;i686-apple-darwin8&amp;quot;, and then merge them with &amp;quot;[http://developer.apple.com/documentation/Darwin/Reference/ManPages/man1/lipo.1.html lipo]&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
./configure --host=powerpc-apple-darwin8 --target=powerpc-apple-darwin8&lt;br /&gt;
&lt;br /&gt;
./configure --host=i686-apple-darwin8 --target=i686-apple-darwin8&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Some caveats:&lt;br /&gt;
* pre-compiled headers might fail with a &amp;quot;no main&amp;quot; error. If they do, add a -c to only compile them&lt;br /&gt;
* when cross-compiling, tools like auto_revision might fail to build. copy these from a native build&lt;br /&gt;
* the Tiger compilers might crash from time to time, but that is only to be expected (it seems)...&lt;br /&gt;
&lt;br /&gt;
See [http://developer.apple.com/technotes/tn2005/tn2137.html Technical Note TN2137]: Building Universal &lt;br /&gt;
Binaries from &amp;quot;configure&amp;quot;-based Open Source Projects&lt;br /&gt;
&lt;br /&gt;
== FYI: Compilers ==&lt;br /&gt;
&lt;br /&gt;
When building for older versions of the SDK, you want to make sure to use the same compiler.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CC = gcc-4.0&lt;br /&gt;
&lt;br /&gt;
CXX = g++-4.0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Mac OS X 10.6 has GCC 4.2 as the default compiler, which won't work for the Mac OS X 10.4 SDK.&lt;br /&gt;
&lt;br /&gt;
== FYI: ANSI or UNICODE ==&lt;br /&gt;
&lt;br /&gt;
For the moment we are using &amp;quot;ANSI&amp;quot; (--disable-unicode, default) for Mac OS X 10.3 and earlier,&lt;br /&gt;
and &amp;quot;UNICODE&amp;quot; (--enable-unicode, optional) for Mac OS X 10.4 and later. &lt;br /&gt;
&lt;br /&gt;
See http://www.wxwidgets.org/manuals/stable/wx_unicode.html#unicodeandansi&lt;br /&gt;
&lt;br /&gt;
== FYI: 32-bit or 64-bit ==&lt;br /&gt;
&lt;br /&gt;
Code::Blocks currently uses wxMac (wxOSX/Carbon), which is 32-bit only. So it's not possible to build for &amp;quot;x86_64&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
When Code::Blocks (and requirements) has been updated to use wxOSX/Cocoa, then a 64-bit version might be built too.&lt;br /&gt;
&lt;br /&gt;
== Build wxWidgets ==&lt;br /&gt;
&lt;br /&gt;
=== Download the source code ===&lt;br /&gt;
&lt;br /&gt;
Download the tarball for the wxMac release:&lt;br /&gt;
&lt;br /&gt;
http://wxwidgets.org/downloads/&lt;br /&gt;
&lt;br /&gt;
=== Apply necessary patches ===&lt;br /&gt;
&lt;br /&gt;
Don't forget to apply any released patches!&lt;br /&gt;
&lt;br /&gt;
http://wxwidgets.org/downloads/patch.htm&lt;br /&gt;
&lt;br /&gt;
=== Configure and (GNU) Make ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mkdir mac-build&lt;br /&gt;
cd mac-build&lt;br /&gt;
../configure --enable-shared --enable-monolithic --enable-unicode --with-mac --with-opengl \&lt;br /&gt;
            --with-png=builtin --with-jpeg=builtin --with-tiff=builtin --with-expat=builtin&lt;br /&gt;
nice make&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
note: the easiest way to build a Universal Binary with wxWidgets is&lt;br /&gt;
the new flag: --enable-universal_binary (you need wxWidgets 2.6.4+)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
--enable-universal_binary --with-macosx-sdk=/Developer/SDKs/MacOSX10.4u.sdk --with-macosx-version-min=10.4&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Install into Destination ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo make install&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Bundle library for Mac ==&lt;br /&gt;
&lt;br /&gt;
To avoid having the Code::Blocks user having to compile or install wxWidgets themselves,&lt;br /&gt;
we can bundle it with our application so that it is contained in the application bundle.&lt;br /&gt;
This could also be done by statically linking wxWidgets, but with dynamic linking we can&lt;br /&gt;
share the wxWidgets library between all applications using wxWidgets (not just Code::Blocks)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Way One: Library (dynamic) ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/usr/local/include/wx-2.8/wx/wx.h&lt;br /&gt;
/usr/local/lib/libwx_macu-2.8.dylib -&amp;gt; libwx_macu-2.8.0.dylib&lt;br /&gt;
/usr/local/lib/libwx_macu-2.8.0.dylib -&amp;gt; libwx_macu-2.8.0.6.0.dylib&lt;br /&gt;
/usr/local/lib/libwx_macu-2.8.0.6.0.dylib&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To bundle our shared library with the application, we include it in &amp;quot;MacOS&amp;quot; and change the path:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
install_name_tool -id @executable_path/libwx_macu-2.8.0.dylib&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
@executable_path will be replaced with e.g. /Developer/Applications/CodeBlocks.app/Contents/MacOS&lt;br /&gt;
&lt;br /&gt;
=== Way Two: Framework (bundle) ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/Library/Frameworks/wx.framework/Headers -&amp;gt; Versions/Current/Headers&lt;br /&gt;
/Library/Frameworks/wx.framework/wx -&amp;gt; Versions/Current/wx&lt;br /&gt;
/Library/Frameworks/wx.framework/Versions/Current -&amp;gt; 2.8&lt;br /&gt;
/Library/Frameworks/wx.framework/Versions/2.8/Headers/wx.h&lt;br /&gt;
/Library/Frameworks/wx.framework/Versions/2.8/wx  -&amp;gt; libwx_macu-2.8.0.dylib&lt;br /&gt;
/Library/Frameworks/wx.framework/Versions/2.8/libwx_macu-2.8.0.dylib  -&amp;gt; libwx_macu-2.8.0.6.0.dylib&lt;br /&gt;
/Library/Frameworks/wx.framework/Versions/2.8/libwx_macu-2.8.0.6.0.dylib&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To bundle our framework with the application, we include it in &amp;quot;Frameworks&amp;quot; and change the path:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
install_name_tool -id @executable_path/../Frameworks/wx.framework/Versions/2.8/libwx_macu-2.8.0.dylib&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This way it will first look in the framework path (-F), and then in for the shared library path (-L) as usual.&lt;br /&gt;
&lt;br /&gt;
== Install Subversion client ==&lt;br /&gt;
&lt;br /&gt;
On Mac OS X 10.4, you need to install the Subversion (svn) program:&lt;br /&gt;
&lt;br /&gt;
http://subversion.tigris.org/&lt;br /&gt;
&lt;br /&gt;
Note: you need SVN for the Code::Blocks revision scripts to work!&lt;br /&gt;
&lt;br /&gt;
== Build CodeBlocks from SVN ==&lt;br /&gt;
&lt;br /&gt;
=== Download the source code ===&lt;br /&gt;
&lt;br /&gt;
https://www.codeblocks.org/source_code.shtml&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
svn checkout svn://svn.berlios.de/codeblocks/trunk&lt;br /&gt;
cd trunk&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Apply necessary patches ===&lt;br /&gt;
&lt;br /&gt;
For a list of all available patches, see:&lt;br /&gt;
&lt;br /&gt;
http://developer.berlios.de/patch/?group_id=5358&lt;br /&gt;
&lt;br /&gt;
You might need to convert line endings from DOS to Unix first.&lt;br /&gt;
&lt;br /&gt;
=== Bootstrap with Autotools ===&lt;br /&gt;
&lt;br /&gt;
You need to use the newer version of automake (see above), for the &amp;quot;bootstrap&amp;quot;. (OS X 10.5 users may have recent enough autotools so they may not need to install them)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# if you installed newer autotools under names with suffixes.&lt;br /&gt;
export AUTOMAKE=automake-1.9&lt;br /&gt;
export ACLOCAL=aclocal-1.9&lt;br /&gt;
&lt;br /&gt;
# do bootstrap. you may need to adapt /usr/share/aclocal&lt;br /&gt;
# to whatever other location you may use&lt;br /&gt;
# (for instance, in my case, /usr/local/share/aclocal)&lt;br /&gt;
ACLOCAL_FLAGS=&amp;quot;-I /usr/share/aclocal&amp;quot; ./bootstrap&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Mono Fix ===&lt;br /&gt;
&lt;br /&gt;
If you have the Mono.framework installed, then it probably set up a symlink like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/usr/bin/pkg-config -&amp;gt; /Library/Frameworks/Mono.framework/Commands/pkg-config&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Unless you have a &amp;quot;proper&amp;quot; [http://pkgconfig.freedesktop.org/ pkg-config] installation the Code::Blocks configure will fail, so move this symbolic link aside.&lt;br /&gt;
&lt;br /&gt;
=== Configure ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
./configure --with-contrib-plugins=all&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note: the easiest way to build a Universal Binary for Code::Blocks is to build once for PowerPC (-arch ppc) and once for Intel (-arch i386), and then merge them (with lipo) afterwards.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mkdir ppc-build&lt;br /&gt;
cd ppc-build&lt;br /&gt;
../configure --host=powerpc-apple-darwin8 --target=powerpc-apple-darwin8 --with-contrib-plugins=all&lt;br /&gt;
cd ..&lt;br /&gt;
&lt;br /&gt;
mkdir x86-build&lt;br /&gt;
cd x86-build&lt;br /&gt;
../configure --host=i686-apple-darwin8 --target=i686-apple-darwin8 --with-contrib-plugins=all&lt;br /&gt;
cd ..&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note: You need to patch the location of the pre-compiled headers, or it will generate them in the same place for both arch.&lt;br /&gt;
&lt;br /&gt;
=== Tiger Fix ===&lt;br /&gt;
&lt;br /&gt;
There is a bug in the glibtool of Mac OS X 10.4, that fails to link C++ libs:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ld: multiple definitions of symbol ___umoddi3&lt;br /&gt;
/usr/lib/gcc/powerpc-apple-darwin8/4.0.1/libgcc.a(_umoddi3.o) private external definition of ___umoddi3 in section (__TEXT,__text)&lt;br /&gt;
/usr/lib/gcc/powerpc-apple-darwin8/4.0.1/../../../libgcc_s.10.4.dylib(_umoddi3_s.o) definition of ___umoddi3&lt;br /&gt;
&lt;br /&gt;
ld: multiple definitions of symbol ___umoddi3&lt;br /&gt;
/usr/lib/gcc/i686-apple-darwin8/4.0.1/libgcc.a(_umoddi3.o) private external definition of ___umoddi3 in section (__TEXT,__text)&lt;br /&gt;
/usr/lib/gcc/i686-apple-darwin8/4.0.1/../../../libgcc_s.10.4.dylib(_umoddi3_s.o) definition of ___umoddi3&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To work around this, you need to edit the generated &amp;quot;libtool&amp;quot; script manually:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
177c177&lt;br /&gt;
&amp;lt; whole_archive_flag_spec=&amp;quot;-all_load \$convenience&amp;quot;&lt;br /&gt;
---&lt;br /&gt;
&amp;gt; whole_archive_flag_spec=&amp;quot;&amp;quot;&lt;br /&gt;
6921c6921&lt;br /&gt;
&amp;lt; whole_archive_flag_spec=&amp;quot;-all_load \$convenience&amp;quot;&lt;br /&gt;
---&lt;br /&gt;
&amp;gt; whole_archive_flag_spec=&amp;quot;&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This bug has been fixed in GNU libtool 1.5.8 and later.&lt;br /&gt;
&lt;br /&gt;
=== (GNU) Make ===&lt;br /&gt;
&lt;br /&gt;
&amp;quot;nice&amp;quot; isn't strictly needed, it just makes the compile run at a lower process priority&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
nice make&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the Universal Binary build:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd ppc-build&lt;br /&gt;
nice make&lt;br /&gt;
cd ..&lt;br /&gt;
&lt;br /&gt;
cd x86-build&lt;br /&gt;
nice make&lt;br /&gt;
cd ..&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Install into Destination ===&lt;br /&gt;
&lt;br /&gt;
&amp;quot;sudo&amp;quot; asks you for an admin password, in order to get install permissions&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo make install&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For the Universal Binary build:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd ppc-build&lt;br /&gt;
make install DESTDIR=/tmp/ppc&lt;br /&gt;
cd ..&lt;br /&gt;
&lt;br /&gt;
cd x86-build&lt;br /&gt;
make install DESTDIR=/tmp/x86&lt;br /&gt;
cd ..&lt;br /&gt;
&lt;br /&gt;
lipomerge /tmp/ppc /tmp/x86 /tmp/fat&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where &amp;quot;lipomerge&amp;quot; is a custom shell script:&lt;br /&gt;
&lt;br /&gt;
* http://www.algonet.se/~afb/wx/lipomerge&lt;br /&gt;
&lt;br /&gt;
== Bundle application for Mac ==&lt;br /&gt;
&lt;br /&gt;
After building codeblocks in the regular Unix way, you need to bundle it with the icons&lt;br /&gt;
and various other info that it needs to make a regular stand-alone Macintosh application.&lt;br /&gt;
&lt;br /&gt;
There are two ways of accomplishing this, old Mac OS-style resource or NeXT-style bundle.&lt;br /&gt;
The old resources are handy while developing, while bundles are more suitable for release.&lt;br /&gt;
&lt;br /&gt;
Note: You '''need''' to use either of these methods, or your application will launch&lt;br /&gt;
in the background behind all other windows and will be unable to receive any events!&lt;br /&gt;
&lt;br /&gt;
=== Way One: Mac OS (resource) ===&lt;br /&gt;
&lt;br /&gt;
http://developer.apple.com/documentation/Carbon/Reference/Resource_Manager/&lt;br /&gt;
&lt;br /&gt;
Handy while developing, as you don't need to create a whole bundle.&lt;br /&gt;
&lt;br /&gt;
First we install the program to the PREFIX directory of your choice:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$PREFIX/bin&lt;br /&gt;
$PREFIX/lib&lt;br /&gt;
$PREFIX/share/codeblocks&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note: on the Intel Macintoshes, the icon comes up as &amp;quot;broken&amp;quot;&lt;br /&gt;
(apparently it assumes that all apps with resforks are Classic)&lt;br /&gt;
&lt;br /&gt;
Start the application with a small prefix shell wrapper like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:$PREFIX/lib&lt;br /&gt;
export DYLD_LIBRARY_PATH&lt;br /&gt;
&lt;br /&gt;
$PREFIX/bin/codeblocks --prefix=$PREFIX&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You don't need the &amp;quot;DYLD_LIBRARY_PATH&amp;quot; stuff,&lt;br /&gt;
if you are installing to a system directory.&lt;br /&gt;
&lt;br /&gt;
==== Common PREFIX Settings ====&lt;br /&gt;
&lt;br /&gt;
Local: &amp;lt;tt&amp;gt;PREFIX=/usr/local&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
System: &amp;lt;tt&amp;gt;PREFIX=/usr&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
MacPorts: &amp;lt;tt&amp;gt;PREFIX=/opt/local&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Fink: &amp;lt;tt&amp;gt;PREFIX=/sw&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Way Two: NeXT (bundle) ===&lt;br /&gt;
&lt;br /&gt;
http://developer.apple.com/documentation/CoreFoundation/Conceptual/CFBundles/&lt;br /&gt;
&lt;br /&gt;
This does not involve resources, and is more relocatable.&lt;br /&gt;
&lt;br /&gt;
Files needed:&lt;br /&gt;
* codeblocks.plist (generated, rename to &amp;quot;Info.plist&amp;quot;)&lt;br /&gt;
* codeblocks.sh (shell wrapper, rename to &amp;quot;CodeBlocks&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
&lt;br /&gt;
DIR=&amp;quot;`dirname \&amp;quot;$0\&amp;quot;`/..&amp;quot;&lt;br /&gt;
&lt;br /&gt;
BIN=&amp;quot;$DIR/bin&amp;quot;&lt;br /&gt;
LIB=&amp;quot;$DIR/lib&amp;quot;&lt;br /&gt;
&lt;br /&gt;
DYLD_LIBRARY_PATH=&amp;quot;$DYLD_LIBRARY_PATH:$LIB&amp;quot;&lt;br /&gt;
export DYLD_LIBRARY_PATH&lt;br /&gt;
&lt;br /&gt;
exec &amp;quot;$BIN/codeblocks&amp;quot; --prefix=&amp;quot;$DIR&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* app.icns (icons are available in src/src/resources/icons)&lt;br /&gt;
&lt;br /&gt;
The MacOS program will just be a shell wrapper that calls &amp;quot;bin/codeblocks&amp;quot;, like above.&lt;br /&gt;
Traditionally the bundle would include Frameworks and Resources, but we'll just avoid those&lt;br /&gt;
here and use the regular &amp;quot;lib&amp;quot; and &amp;quot;share/codeblocks&amp;quot; instead (just as with a regular install). &lt;br /&gt;
These temporary directories are listed in italic below, they're not really used in bundles...&lt;br /&gt;
&lt;br /&gt;
Setup a hierarchy like this, and copy the files from the regular build/install and the above file list to it:&lt;br /&gt;
&lt;br /&gt;
  CodeBlocks.app&lt;br /&gt;
  CodeBlocks.app/Contents/&lt;br /&gt;
  CodeBlocks.app/Contents/Info.plist&lt;br /&gt;
  CodeBlocks.app/Contents/MacOS/&lt;br /&gt;
  CodeBlocks.app/Contents/MacOS/CodeBlocks&lt;br /&gt;
  CodeBlocks.app/Contents/Resources/&lt;br /&gt;
  CodeBlocks.app/Contents/Resources/app.icns&lt;br /&gt;
  ''CodeBlocks.app/Contents/bin/''&lt;br /&gt;
  ''CodeBlocks.app/Contents/lib/''&lt;br /&gt;
  ''CodeBlocks.app/Contents/share/codeblocks/''&lt;br /&gt;
&lt;br /&gt;
The CodeBlocks application can now be moved with the Finder, and started up like a regular Mac application. (the nightly build includes a more advanced Info.plist and more icons - for also mapping all the files that the application can open, like source code and header files and such)&lt;br /&gt;
&lt;br /&gt;
==== Proper Application Bundling ====&lt;br /&gt;
&lt;br /&gt;
To avoid the shell wrapper, the binary can now be moved from &amp;quot;bin/codeblocks&amp;quot; to &amp;quot;MacOS/CodeBlocks&amp;quot;. Helper files are moved from &amp;quot;share/codeblocks&amp;quot; to &amp;quot;Resources&amp;quot;. The dynamic libraries are moved from &amp;quot;lib&amp;quot; to &amp;quot;MacOS&amp;quot;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mv bin/codeblocks MacOS/CodeBlocks&lt;br /&gt;
rmdir bin&lt;br /&gt;
mv lib/* MacOS/&lt;br /&gt;
rmdir lib&lt;br /&gt;
mv share Resources/&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To avoid having to use a DYLD_LIBRARY_PATH, we rename the shared libraries (with the install_name_tool program) from e.g. /usr/local/lib/ to @executable_path/:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
install_name_tool -change /usr/local/lib/libcodeblocks.0.dylib \&lt;br /&gt;
                          @executable_path/libcodeblocks.0.dylib MacOS/CodeBlocks&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The libraries can have their names changed using the -id parameter:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
install_name_tool -id @executable_path/libcodeblocks.0.dylib MacOS/libcodeblocks.0.dylib&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You also need to change all of the loadable bundles for the plugins:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
for so in Resources/plugins/*.so&lt;br /&gt;
do install_name_tool -change /usr/local/lib/libcodeblocks.0.dylib \&lt;br /&gt;
                             @executable_path/libcodeblocks.0.dylib $so&lt;br /&gt;
done&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can check the result, what libraries/frameworks it links to, with:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
otool -L CodeBlocks&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Optionally you can then repeat the process, for the wx library too...&lt;br /&gt;
&lt;br /&gt;
Here is a full script to do the job... It assumes to be executed at the same directory level as the CodeBlockSVN.app directory that will receive all the stuff... maybe enhanced but it is a first try that do work when packaging an OS X SVN build.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
cp /usr/local/bin/codeblocks ./CodeBlocksSVN.app/Contents/MacOS/CodeBlocks&lt;br /&gt;
cp /usr/local/bin/cb_share_config ./CodeBlocksSVN.app/Contents/MacOS&lt;br /&gt;
cp /usr/local/bin/cb_console_runner ./CodeBlocksSVN.app/Contents/MacOS&lt;br /&gt;
cp /usr/local/bin/codesnippets ./CodeBlocksSVN.app/Contents/MacOS&lt;br /&gt;
cp /usr/local/lib/libwxsmithlib.0.dylib ./CodeBlocksSVN.app/Contents/MacOS&lt;br /&gt;
cp /usr/local/lib/libwx_macu-2.8.0.dylib ./CodeBlocksSVN.app/Contents/MacOS&lt;br /&gt;
cp /usr/local/lib/libcodeblocks.0.dylib ./CodeBlocksSVN.app/Contents/MacOS&lt;br /&gt;
&lt;br /&gt;
install_name_tool -id @executable_path/libcodeblocks.0.dylib ./CodeBlocksSVN.app/Contents/MacOS/libcodeblocks.0.dylib&lt;br /&gt;
install_name_tool -id @executable_path/libwx_macu-2.8.0.dylib ./CodeBlocksSVN.app/Contents/MacOS/libwx_macu-2.8.0.dylib&lt;br /&gt;
install_name_tool -id @executable_path/libwxsmithlib.0.dylib ./CodeBlocksSVN.app/Contents/MacOS/libwxsmithlib.0.dylib&lt;br /&gt;
&lt;br /&gt;
install_name_tool -change /usr/local/lib/libcodeblocks.0.dylib @executable_path/libcodeblocks.0.dylib ./CodeBlocksSVN.app/Contents/MacOS/CodeBlocks&lt;br /&gt;
install_name_tool -change /usr/local/lib/libwx_macu-2.8.0.dylib @executable_path/libwx_macu-2.8.0.dylib ./CodeBlocksSVN.app/Contents/MacOS/CodeBlocks&lt;br /&gt;
install_name_tool -change /usr/local/lib/libwxsmithlib.0.dylib @executable_path/libwxsmithlib.0.dylib ./CodeBlocksSVN.app/Contents/MacOS/CodeBlocks&lt;br /&gt;
&lt;br /&gt;
install_name_tool -change /usr/local/lib/libcodeblocks.0.dylib @executable_path/libcodeblocks.0.dylib ./CodeBlocksSVN.app/Contents/MacOS/codesnippets&lt;br /&gt;
install_name_tool -change /usr/local/lib/libwx_macu-2.8.0.dylib @executable_path/libwx_macu-2.8.0.dylib ./CodeBlocksSVN.app/Contents/MacOS/codesnippets&lt;br /&gt;
install_name_tool -change /usr/local/lib/libwxsmithlib.0.dylib @executable_path/libwxsmithlib.0.dylib ./CodeBlocksSVN.app/Contents/MacOS/codesnippets&lt;br /&gt;
&lt;br /&gt;
install_name_tool -change /usr/local/lib/libcodeblocks.0.dylib @executable_path/libcodeblocks.0.dylib ./CodeBlocksSVN.app/Contents/MacOS/cb_share_config&lt;br /&gt;
install_name_tool -change /usr/local/lib/libwx_macu-2.8.0.dylib @executable_path/libwx_macu-2.8.0.dylib ./CodeBlocksSVN.app/Contents/MacOS/cb_share_config&lt;br /&gt;
install_name_tool -change /usr/local/lib/libwxsmithlib.0.dylib @executable_path/libwxsmithlib.0.dylib ./CodeBlocksSVN.app/Contents/MacOS/cb_share_config&lt;br /&gt;
&lt;br /&gt;
install_name_tool -change /usr/local/lib/libcodeblocks.0.dylib @executable_path/libcodeblocks.0.dylib ./CodeBlocksSVN.app/Contents/MacOS/cb_console_runner&lt;br /&gt;
install_name_tool -change /usr/local/lib/libwx_macu-2.8.0.dylib @executable_path/libwx_macu-2.8.0.dylib ./CodeBlocksSVN.app/Contents/MacOS/cb_console_runner&lt;br /&gt;
install_name_tool -change /usr/local/lib/libwxsmithlib.0.dylib @executable_path/libwxsmithlib.0.dylib ./CodeBlocksSVN.app/Contents/MacOS/cb_console_runner&lt;br /&gt;
&lt;br /&gt;
install_name_tool -change /usr/local/lib/libwx_macu-2.8.0.dylib @executable_path/libwx_macu-2.8.0.dylib ./CodeBlocksSVN.app/Contents/MacOS/libcodeblocks.0.dylib&lt;br /&gt;
install_name_tool -change /usr/local/lib/libwxsmithlib.0.dylib @executable_path/libwxsmithlib.0.dylib ./CodeBlocksSVN.app/Contents/MacOS/libcodeblocks.0.dylib&lt;br /&gt;
&lt;br /&gt;
install_name_tool -change /usr/local/lib/libcodeblocks.0.dylib @executable_path/libcodeblocks.0.dylib ./CodeBlocksSVN.app/Contents/MacOS/libwxsmithlib.0.dylib&lt;br /&gt;
install_name_tool -change /usr/local/lib/libwx_macu-2.8.0.dylib @executable_path/libwx_macu-2.8.0.dylib ./CodeBlocksSVN.app/Contents/MacOS/libwxsmithlib.0.dylib&lt;br /&gt;
&lt;br /&gt;
cp -R /usr/local/share/codeblocks/ ./CodeBlocksSVN.app/Contents/Resources/share/codeblocks&lt;br /&gt;
&lt;br /&gt;
for dotso in ./CodeBlocksSVN.app/Contents/Resources/share/codeblocks/plugins/*.so&lt;br /&gt;
do&lt;br /&gt;
#echo $dotso&lt;br /&gt;
#	install_name_tool -id $dotso ./libcodeblocks.0.dylib CodeBlocks&lt;br /&gt;
	install_name_tool -change /usr/local/lib/libcodeblocks.0.dylib @executable_path/libcodeblocks.0.dylib $dotso&lt;br /&gt;
	install_name_tool -change /usr/local/lib/libwx_macu-2.8.0.dylib @executable_path/libwx_macu-2.8.0.dylib $dotso&lt;br /&gt;
	install_name_tool -change /usr/local/lib/libwxsmithlib.0.dylib @executable_path/libwxsmithlib.0.dylib $dotso&lt;br /&gt;
done&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== FYI: Darwin vs. Mac OS X ==&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Darwin is the UNIX technology-based foundation of Mac OS X.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
* http://developer.apple.com/referencelibrary/Darwin/&lt;br /&gt;
&lt;br /&gt;
* http://en.wikipedia.org/wiki/Darwin_(operating_system)&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Pure Darwin&amp;quot; here refers to the Open Source version of the OS:&lt;br /&gt;
&lt;br /&gt;
* http://www.opensource.apple.com/darwinsource/images/&lt;br /&gt;
&lt;br /&gt;
* http://puredarwin.org/ or http://gnu-darwin.sourceforge.net/&lt;br /&gt;
&lt;br /&gt;
(that is: Darwin using X11 instead of Aqua for the user interface)&lt;br /&gt;
&lt;br /&gt;
== Install with MacPorts ==&lt;br /&gt;
&lt;br /&gt;
=== Install wxWidgets ===&lt;br /&gt;
&lt;br /&gt;
You will need the wxWidgets library, install as port with:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo port install wxWidgets&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you want the X11/GTK version on Mac OS X, instead use:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo port install wxgtk&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Install Code::Blocks ===&lt;br /&gt;
&lt;br /&gt;
After that is installed, you can install Code::Blocks with:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo port install codeblocks-devel +aqua&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you want the X11/GTK version on Mac OS X, instead use:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo port install codeblocks-devel +x11&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will download the SVN trunk, and any dependencies:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
---&amp;gt;  Fetching codeblocks-devel&lt;br /&gt;
---&amp;gt;  Verifying checksum(s) for codeblocks-devel&lt;br /&gt;
---&amp;gt;  Extracting codeblocks-devel&lt;br /&gt;
---&amp;gt;  Configuring codeblocks-devel&lt;br /&gt;
---&amp;gt;  Building codeblocks-devel with target all&lt;br /&gt;
---&amp;gt;  Staging codeblocks-devel into destroot&lt;br /&gt;
---&amp;gt;  Packaging tgz archive for codeblocks-devel 1.0_0+aqua+macosx&lt;br /&gt;
---&amp;gt;  Installing codeblocks-devel 1.0_0+aqua+macosx&lt;br /&gt;
---&amp;gt;  Activating codeblocks-devel 1.0_0+aqua+macosx&lt;br /&gt;
---&amp;gt;  Cleaning codeblocks-devel&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note: to upgrade from SVN, you need to uninstall first:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo port uninstall codeblocks-devel&lt;br /&gt;
sudo port clean codeblocks-devel&lt;br /&gt;
sudo port install codeblocks-devel&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is both because all SVN versions are numbered &amp;quot;0&amp;quot;,&lt;br /&gt;
but also due to a bug in the Code::Blocks build scripts.&lt;br /&gt;
&lt;br /&gt;
=== Running &amp;lt;tt&amp;gt;+aqua&amp;lt;/tt&amp;gt; (wxMac) version ===&lt;br /&gt;
&lt;br /&gt;
After the build completes, you can start the program by:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
open /Applications/MacPorts/CodeBlocks.app&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that the wxMac application bundle in &amp;quot;MacPorts&amp;quot;&lt;br /&gt;
is just a wrapper, with symbolic links to /opt/local...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/opt/local/bin/codeblocks&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Running &amp;lt;tt&amp;gt;+x11&amp;lt;/tt&amp;gt; (wxGTK) version ===&lt;br /&gt;
&lt;br /&gt;
The non-bundled wxGTK version is instead started with:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/opt/local/bin/codeblocks&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When running X11/wxGTK programs in Mac OS X, you can use&lt;br /&gt;
&amp;quot;open-x11&amp;quot; to first start up X11.app and set up $DISPLAY:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
open-x11 /opt/local/bin/codeblocks&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>MergeMac</name></author>
	</entry>
</feed>