I am able to work with ROOT on my mac, visualization and analyzing PREPARED .root data, but when I want to compile a code with #include<TROOT.h>, I have some errors like:
typedef basic_string_view string_view;
./RStringView.h:36:12: error: no template named ‘basic_string_view’
typedef basic_string_view<char16_t> u16string_view;
./RStringView.h:37:12: error: no template named ‘basic_string_view’
typedef basic_string_view<char32_t> u32string_view;
./RStringView.h:38:12: error: no template named ‘basic_string_view’
typedef basic_string_view<wchar_t> wstring_view;
./RStringView.h:50:28: error: no member named ‘to_string’ in
‘std::__1::basic_string_view<char, std::__1::char_traits >’
Can you help me, to find out a solution.
_ROOT Version:6.06/04 Platform: Not Provided Compiler: Not Provided
Which c++ version are you using? You need to use the same C++ standard when compiling ROOT and when compiling your own software. Reason: ROOT defines its own std::string_view if that is not provided by the compiler.
What does root-config --cflags output? You need the same -std=XXXXX setting when compiling your own code.
From the shown output, it seems to me that you copied ROOT includes (from some unknown ROOT version) to your “current directory” (i.e. “./”) which doesn’t really seem like the right thing to do to me (or am I wrong?).
BTW. You need to specify your “operating system” and your “compiler” versions (you specified only that you were using an outdated ROOT 6.06/04 which will break on newer systems / compilers).