User forums > Help
Installing Code::Blocks from source on Linux
stahta01:
--- Quote from: stahta01 on March 20, 2025, 10:21:26 pm ---
--- Quote from: Miguel Gimenez on March 20, 2025, 07:27:19 pm ---Is there a HAVE_CXX17?
EDIT: I do not use autotools, if someone can post a patch for configure.ac or Makefile.am including checking for C++17 it would be safer.
--- End quote ---
Then you would have to keep editing the configure.ac each time a new version is released; so now HAVE_CXX17, HAVE_CXX20, and HAVE_CXX23.
Tim S.
--- End quote ---
Likely best to wait till a person who is more of an expert can do the change.
Tim S.
Miguel Gimenez:
Reverted commit 13635.
Krice:
Yeah, I don't actually know how that worked, because doesn't it also need the library file? Maybe just building wx from source fixed everything. I guess I could try it again by using angle brackets and rebuilding Code::Blocks, but I'm not in the mood right now. Anyway, when you are using angle brackets you should somehow make sure it's using headers in the project (and not in lib or elsewhere in path), because why would you otherwise have them in a project directory? And even then it feels wrong, because two styles of using #include are there for a reason.
Miguel Gimenez:
This code in configure.ac:88 should work:
--- Code: ---if test "$HAVE_ASTYLE" = "yes" -a "$HAVE_CXX11" != "1" -a "$HAVE_CXX14" != "1" ; then
AC_CHECK_TYPE([astyle::ASPeekStream], , [HAVE_ASTYLE=no], [#include "astyle.h"])
else
HAVE_ASTYLE=no
fi
--- End code ---
Looking for HAVE_CXX11 usage examples I have seen comparations with "1", "yes" and "TRUE", GNU uses "1".
christo:
@Miguel Gimenez
I tested the change and it did not work.
Looks like a simple solution is just to move AX_CXX_COMPILE_STDCXX before checking astyle, then it will discard installed astyle if not supported. Please see configure logs with latest astyle below.
--- Code: ---checking astyle.h usability... no
checking astyle.h presence... yes
configure: WARNING: astyle.h: present but cannot be compiled
configure: WARNING: astyle.h: check for missing prerequisite headers?
configure: WARNING: astyle.h: see the Autoconf documentation
configure: WARNING: astyle.h: section "Present But Cannot Be Compiled"
configure: WARNING: astyle.h: proceeding with the compiler's result
checking for astyle.h... no
--- End code ---
I tested the change with an older version of astyle, which does not require c++17 ( v 3.4.14), and it selects the installed astyle
--- Code: ---checking astyle.h usability... yes
checking astyle.h presence... yes
checking for astyle.h... yes
checking for astyle::ASPeekStream... yes
--- End code ---
Im no expert in autotools, but this looks like a harmless change. Attaching the patch.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version