I was able to reproduce those errors. However, instead of completely deleting
Makefile.in,
Makefile.am, and
aclocal.m4, I just updated their time-stamps (as suggested here
http://stackoverflow.com/a/33279062/1675668) using
touch with the following command:
touch aclocal.m4 configure Makefile.am Makefile.in
Hunspell is a dependency so I just installed it using HomeBrew. For wxWidgets, I did not use the one through HomeBrew, but instead built it myself on 10.12 Sierra (wxWidgets-3.0.3).
Error #1 (use of overloaded operator '==' is ambiguous)Trying to build using
make reports 4 warnings, 1 error when attempting to compile
$(CB_ROOT)/src/plugins/debuggergdb/debuggergdb.cpp. The specific error:
In file included from debuggergdb.cpp:10:
In file included from ../../../src/include/sdk.h:17:
In file included from ../../../src/include/sdk_precomp.h:13:
In file included from ../../../src/include/sdk_common.h:43:
../../../src/include/prep.h:33:75: error: use of overloaded operator '==' is ambiguous (with operand types 'const std::__1::shared_ptr<GDBWatch>' and 'int')
template<typename T> bool equals(T const& rhs) const { return rhs == 0; }
~~~ ^ ~
This error has actually been encountered before on this forum:
../../../../src/include/prep.h:33:75: error: use of overloaded operator '==' is ambiguous (with operand types 'const std::__1::shared_ptr<GDBWatch>' and 'int')
template<typename T> bool equals(T const& rhs) const { return rhs == 0; }
~~~ ^ ~
The suggestion was to add
CXXFLAGS="-stdlib=libc++". I had previously used this solution to build wxWidgets (since I did not use HomeBrew) and I instead used
CXXFLAGS="-stdlib=libc++ -std=c++" LDFLAGS="-stdlib=libc++" so I used the latter for configuring the build of Code::Blocks. My configure command looked like:
./configure --with-contrib-plugins=all CXXFLAGS="-stdlib=libc++ -std=c++11" LDFLAGS="-stdlib=libc++"
Error #2 ('fam.h' file not found)Attempting to
make again results in another error:
In file included from directorymonitor.cpp:3:
In file included from ./se_globals.h:10:
In file included from ../../../../src/include/sdk.h:17:
In file included from ../../../../src/include/sdk_precomp.h:13:
In file included from ../../../../src/include/sdk_common.h:150:
In file included from ../../../../src/include/filemanager.h:13:
../../../../src/include/backgroundthread.h:143:13: warning: 'this' pointer cannot be null in well-defined C++ code; pointer may be assumed to always convert to true [-Wundefined-bool-conversion]
if (this && IsRunning())
^~~~ ~~
directorymonitor.cpp:27:10: fatal error: 'fam.h' file not found
#include <fam.h> //USES EITHER GAMIN OR FAM (IDENTICAL FILE MONITORING APIS)
^
3 warnings and 1 error generated.
This issue had also been encountered previously and was solved by ommiting a couple plugins:
Ok, so I managed to move forward in the compile process by leaving out a couple of plugins...
-FileManager,-NassiShneiderman
So the configure command turned into:
./configure --with-contrib-plugins=all,-FileManager,-NassiShneiderman CXXFLAGS="-stdlib=libc++ -std=c++11" LDFLAGS="-stdlib=libc++"
Success! (Partially)Running
make one last time after the above
configure ran without a hitch. The last step was to run
make install to move the binary into
/usr/local/bin.
Missing Plugins (and maybe other components)Unfortunately, the plugins do not work. Running
codeblocks in the shell to open up the IDE reveals that it gets stuck when initializing plugins; opening up the plugin manager reveals no plugins loaded.
So although the interface is up and running, some components are missing
Maybe I missed something in the build configuration?