Developer forums (C::B DEVELOPMENT STRICTLY!) > Development

Building C::B on Mac OSX High Sierra

<< < (2/3) > >>

uenz:
After reading several threads, because of the outdated info in the wiki, i decided to post here one possible way of building the codeblocks app bundle.
This worked for OS x 10.13 with Xcodex
Download wxWidgetes 3.1.1 und unpack it. Open a terminal in the folder and type the following.

--- Code: ---mkdir mac-build
cd mac-build
./configure  --with-osx_cocoa --with-macosx-version-min=10.11 --enable-debug
nice make
--- End code ---


--- 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

--- End quote ---

--- Code: ---make
sudo make install

--- End code ---

Make a folder for codeblocks source.

--- Code: ---mkdir codeblocks
cd codeblocks

--- End code ---
Get codeblocks source.

--- Code: ---svn checkout http://svn.code.sf.net/p/codeblocks/code/trunk
--- End code ---
Go to the scr folder an apply the patch from previous post.

--- Code: ---patch -p0 < squirrelOsXdiff.txt
--- End code ---
To be able to compile i installed automake via homebrew.

--- Code: ---brew install automake
--- End code ---
In trunk folder issue the folowing commands.

--- Code: ---./bootstrap
./configure --with-platform=macosx

--- End code ---

--- Quote ---*************************************************
* 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
--- End quote ---

--- Code: ---make
sudo make install

--- End code ---
And to create the App bundle.

--- Code: ---sudo ./bundle.sh
--- End code ---
Thats it...

stahta01:
FYI: I am working on a better patch than squirrelOsXdiff.txt that was posted in this thread.
But, I can not test it on MacOS.

Tim S.

stahta01:
Edit: Attached patch https://sourceforge.net/p/codeblocks/tickets/697/

Edit2: Tested on Windows using wxWidgets 3.0 32 bit.

Tim S.

juanfal:
Is is there a patch could we apply to codeblocks-17.12 to compile and build Code:Blocks on Mac??

juanfal:

--- Quote from: stahta01 on May 21, 2018, 01:50:52 am ---FYI: I am working on a better patch than squirrelOsXdiff.txt that was posted in this thread.
But, I can not test it on MacOS.

Tim S.

--- End quote ---

We could.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version