User forums > Help

Installing Code::Blocks from source on Linux

<< < (5/7) > >>

stahta01:

--- Quote from: christo on March 20, 2025, 05:51:31 pm ---@Miguel Gimenez I think above patch can cause compiling against astyle headers provided in codeblocks,  and link to astyle libraries present in the system. This might cause issues because of ABI incompatibility.

--- End quote ---

From configure.ac

--- Code: ---AC_CHECK_HEADER(astyle.h, [HAVE_ASTYLE=yes], [HAVE_ASTYLE=no])

dnl check if system astyle is at least 3.0, otherwise use bundled astyle-library
dnl ASPeekStream is declared since 3.0
if test "$HAVE_ASTYLE" = "yes" ; then
AC_CHECK_TYPE([astyle::ASPeekStream], , [HAVE_ASTYLE=no], [#include "astyle.h"])
else
HAVE_ASTYLE=no
fi

--- End code ---

from makefile.am

--- Code: ---if HAVE_ASTYLE
libAstyle_la_LIBADD += -lastyle
EXTRA_DIST += astyle/ASBeautifier.cpp \
astyle/ASEnhancer.cpp \
astyle/ASFormatter.cpp \
astyle/ASResource.cpp \

--- End code ---

Miguel Gimenez:
OK, but it is already giving problems the other way because the newer astyle library needs C++17 and we use C++11.

I would remove library detection from configure.ac and HAVE_ASTYLE check from Makefile.am, opinons?

stahta01:

--- Quote from: Miguel Gimenez on March 20, 2025, 06:37:44 pm ---OK, but it is already giving problems the other way because the newer astyle library needs C++17 and we use C++11.

I would remove library detection from configure.ac and HAVE_ASTYLE check from Makefile.am, opinons?

--- End quote ---

I would check for CXX11 or CXX14 and [if yes] disable looking for system astyle. The exact names are likely in an m4 file.
Edit: HAVE_CXX11 and HAVE_CXX14

Tim S.

Miguel Gimenez:
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.

stahta01:

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

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version