Hi all,
I have been able to build successfully C::B 13.12 on Mac OSX 10.11 El Capitan
http://forums.next.codeblocks.org/index.php/topic,20862.msg142429.html#msg142429
but I am struggling to build the latest svn on High Sierra. In this thread I would like to have
the chance to share my experience with other Mac users that love this IDE as much as I do
and possibly to end up with a working build.
So far I am stuck at the step of compiling squirrel, in fact it is a known issue that
has been solved by renaming type to sqtype, see here: https://github.com/albertodemichelis/squirrel/issues/98
As I am by no means a C++ programmer I am not able to apply the needed patches and fix the
related issues in other C::B files. Is there anyone willing to help out with that?
The other topic for OSX depicted how to solve it.
You need to add an include at the top of one of squirrel files...
Hi,
thanks for your quick reply!
Where is the other topic for OSX you are mentioning?
Quote from: oBFusCATed on April 10, 2018, 04:20:26 PM
The other topic for OSX depicted how to solve it.
You need to add an include at the top of one of squirrel files...
http://forums.next.codeblocks.org/index.php/topic,21625.msg147187.html#msg147187
Hi,
here a patch file to prevent the compile issues with squirrel on MacOS.
After patching squirrel i was able to compile without errors.
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.
mkdir mac-build
cd mac-build
./configure --with-osx_cocoa --with-macosx-version-min=10.11 --enable-debug
nice makeQuote
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.
mkdir codeblocks
cd codeblocks
Get codeblocks source.
svn checkout http://svn.code.sf.net/p/codeblocks/code/trunkGo to the scr folder an apply the patch from previous post.
patch -p0 < squirrelOsXdiff.txtTo be able to compile i installed automake via homebrew.
brew install automakeIn trunk folder issue the folowing commands.
./bootstrap
./configure --with-platform=macosx
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
make
sudo make install
And to create the App bundle.
sudo ./bundle.shThats it...
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.
Edit: Attached patch https://sourceforge.net/p/codeblocks/tickets/697/ (https://sourceforge.net/p/codeblocks/tickets/697/)
Edit2: Tested on Windows using wxWidgets 3.0 32 bit.
Tim S.
Is is there a patch could we apply to codeblocks-17.12 to compile and build Code:Blocks on Mac??
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.
We could.
I don't understand what's the use of copying the computer /usr/local/bin complete directory with personal executables and scripts into the final OSX CodeBlocks.app/Contents
It does it in ./bundle.sh
PREFIX_DIR="/usr/local"
..
EXECUTABLES=`echo ${PREFIX_DIR}/bin/* `
..
for file in ${EXECUTABLES}
do
echo $file
cp $file "${APPDIR}/Contents/MacOS" # was this is crazy
copy_deps "${APPDIR}/Contents/MacOS/$(basename $file)"
done
Have you passed --prefix=something-non-default to ./configure?
I've not seen anything unexpected in the bundle, but I guess I don't have anything in /usr/local.
Yes, this is the expected behaviour. If you install in the default prefix almost everything from /usr/local might end in the bundle. The proper way is to use non-default prefix (--prefix parameter of configure).