Skip to content

How to Build CodeBlocks in MacOSx

xukev edited this page Jan 18, 2020 · 1 revision

How to building the codeblocks app bundle.

This worked for OS x 10.13 with Xcodex
Download wxWidgets 3.1.x and unpack it. Open a terminal in the folder and type the following.

mkdir mac-build
cd mac-build
./configure —with-osx_cocoa —with-macosx-version-min=10.11 —enable-debug
nice make

Quote
`Configured wxWidgets 3.1.1 for `x86_64-apple-darwin17.5.0’`

`Which GUI toolkit should wxWidgets use? osx_cocoa` `Should wxWidgets be compiled into single library? no` `Should wxWidgets be linked as a shared library? yes` `Should wxWidgets support Unicode? yes (using wchar_t)` `What level of wxWidgets compatibility should be enabled?` `wxWidgets 2.8 no` `wxWidgets 3.0 yes` `Which libraries should wxWidgets use?` `STL no` `jpeg sys` `png sys` `regex builtin` `tiff sys` `zlib sys` `expat sys` `libmspack no` `sdl no`

`make`
`sudo make install`

Make a folder for codeblocks source.
Code: [Select]
`mkdir codeblocks`
`cd codeblocks`
Get codeblocks source.
Code: [Select]
`svn checkout http://svn.code.sf.net/p/codeblocks/code/trunk`

To be able to compile installed automake via homebrew.
Code: [Select]
`brew install automake`
`In trunk folder issue the folowing commands.`
`Code: [Select]`
`./bootstrap`
`./configure —with-platform=macosx`

Output


  • Code::Blocks source tree has been configured. *
    *************************************************

`You can now build Code::Blocks by issuing ‘make’.`
`When the build is complete, become root and install`
`it by issuing ‘make install’.`

`CFLAGS: -O2 -ffast-math -fPIC -std=c90` `CXXFLAGS: -O2 -ffast-math -Winvalid-pch -fPIC -fexceptions` `CPPFLAGS: -DCB_AUTOCONF -DCB_PRECOMP -DPIC -I$(top_srcdir)/src/include/tinyxml -DTIXML_USE_STL=YES` `LDFLAGS: ` `CXX: g++ -std=c++11` `CC: gcc`

Then compile codeblocks:

`make`
`sudo make install`

And to create the App bundle.

`sudo ./bundle.sh`

You should get app bundle in your source code folder.

Clone this wiki locally