Compilation error on macOS

Hello,
on my mac with Mojave 10.14.6 (Xcode 11.2.1, AppleClang 11.0.0.11000033) and ROOT 6.12/04 I am trying to compile a GEANT4 project relying on ROOT. When compiling with CMake I get the following error:

/usr/local/include/root/RStringView.h:32:37:** error: **no member named ‘experimental’ in namespace ‘std’ using basic_string_view = ::std::experimental::basic_string_view<_CharT,_Traits>;

which is expected given the previous warning

/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/…/include/c++/v1/experimental/string_view:18:3: warning: “<experimental/string_view> has been removed. Use <string_view> instead.” [-W#warnings]

I’m wondering if this is a problem of ROOT but it looks like updating to a newer release is not supposed to fix the issue. I’ve tried to compile with -DCMAKE_CXX_FLAGS:STRING=-std=c++11 / 14 / 17 with no success.

Is this maybe a compiler issue?

Thanks!

Hi,

Please remove your CMakeCache.txt and reconfigure and then rebuild, that should solve the issue.

Cheers, Axel

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.