Hi all,
I want to share my experience with compiling C::B on a Mac with the latest OSX El Capitan, please use it with care as I am not an expert in coding/building apps and most of the time I do not know what I am doing actually!!!
As a general start you should build and install automake (
http://ftp.gnu.org/gnu/automake/), autoconf (
http://ftp.gnu.org/gnu/autoconf) and libtool (
http://ftpmirror.gnu.org/libtool/).
I downloaded the latest development version of wxWidgets from GitHub (
https://github.com/wxWidgets/wxWidgets) and configured it with the following options:
CC=clang CXX=clang++ CXXFLAGS='-v -std=c++11 -stdlib=libc++' CCFLAGS='-v -stdlib=libc++' LDFLAGS='-stdlib=libc++' [PATH_TO_THE_configure_SCRIPT] --prefix=$HOME/local --with-macosx-sdk=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk --with-macosx-version-min=10.11 --enable-debug --enable-monolithic --with-osx_cocoa --enable-compat28
Then I downloaded the C:B svn:
svn checkout svn://svn.code.sf.net/p/codeblocks/code/trunk
and configured it:
CC=clang CXX=clang++ CXXFLAGS='-v -std=c++11 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk -mmacosx-version-min=10.11 -stdlib=libc++' LDFLAGS='-dylib' [PATH_TO_THE_configure_SCRIPT] --prefix=$HOME/local --enable-debug --enable-fortran --with-wx-config=[PATH_TO_YOUR_wxconfig] --with-platform=macosx
as you can see I do not build contrib plugins as the only one I am using so far is fortranproject (
http://cbfortran.sourceforge.net/index.html)
in order for it to build correctly I had to apply the following changes (sorry if I do not use the git-diff patch format, but as I said I am not good in those things ;-) ):
in src/sdk/configmanager.cpp:
@@ -1510,12 +1510,12 @@
// It seems we can not longer rely on wxStandardPathsBase::Get().GetPluginsDir(),
// because its behaviour has changed on some systems (at least Fedora 14 64-bit).
// So we create the pathname manually
- ConfigManager::plugin_path_global = ((const wxStandardPaths&)wxStandardPaths::Get()).GetInstallPrefix() + _T("/lib/codeblocks/plugins");
+ ConfigManager::plugin_path_global = ((const wxStandardPaths&)wxStandardPaths::Get()).GetPluginsDir() + _T("/lib/codeblocks/plugins");
// first assume, we use standard-paths
if (!wxDirExists(ConfigManager::plugin_path_global) && wxIsPlatform64Bit())
{
// if standard-path does not exist and we are on 64-bit system, use lib64 instead
- ConfigManager::plugin_path_global = ((const wxStandardPaths&)wxStandardPaths::Get()).GetInstallPrefix() + _T("/lib64/codeblocks/plugins");
+ ConfigManager::plugin_path_global = ((const wxStandardPaths&)wxStandardPaths::Get()).GetPluginsDir() + _T("/lib64/codeblocks/plugins");
}
}
}
in src/sdk/debuggermanager.cpp:
@@ -486,11 +486,7 @@
#else
uint64_t result;
// different sizes of long/long long on 64bit/32bit need different conversions
-#ifdef __LP64__
- if (address.ToULong(&result, 16))
-#else
if (address.ToULongLong(&result, 16))
-#endif // __LP64__
return result;
else
return 0;
Finally, every attempt to do a Search (for files or text or whatever) makes the program crash miserably. The following patch solves the issue:
http://forums.codeblocks.org/index.php/topic,20312.msg138351.html#msg138351Hope this can help.