Hi Amadio, I have used a binary version of ROOT on my mac os laptop, however while I am trying to cmake my native ROOT project with g++-8, I got compiling errors about '-Qunused-arguments
, if I cmake it with clang/clang++, I got errors about std::basic_string
as you mentioned above. And this native package could be well compiled with g++ on ubuntu system. I pasted the errors for g++-8 and clang below separately. Is there any way to bypass this?
Compiling errors with g++-8
[ 12%] Building CXX object src/CMakeFiles/MiniTuple.dir/MiniTuple.C.o
g++-8: error: unrecognized command line option '-Qunused-arguments'; did you mean '-Wunused-parameter'?
g++-8: error: unrecognized command line option '-stdlib=libc++'
make[2]: *** [src/CMakeFiles/MiniTuple.dir/MiniTuple.C.o] Error 1
make[1]: *** [src/CMakeFiles/MiniTuple.dir/all] Error 2
make: *** [all] Error 2
Compiling errors with clang/clang++
[ 12%] Building CXX object src/CMakeFiles/MiniTuple.dir/MiniTuple.C.o
[ 25%] Linking CXX shared library libMiniTuple.dylib
Undefined symbols for architecture x86_64:
"HistNameSvc::HistNameSvc()", referenced from:
MiniTuple::Initialize() in MiniTuple.C.o
"TVersionCheck::TVersionCheck(int)", referenced from:
___cxx_global_var_init in MiniTuple.C.o
"ROOT::GetROOT()", referenced from:
MiniTuple::MiniTuple(TTree*) in MiniTuple.C.o
"TFile::TFile(char const*, char const*, char const*, int)", referenced from:
MiniTuple::MiniTuple(TTree*) in MiniTuple.C.o
MiniTuple::AddOutputStream(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) in MiniTuple.C.o
"TClass::GetClass(std::type_info const&, bool, bool)", referenced from:
int TTree::SetBranchAddress<std::__1::vector<float, std::__1::allocator<float> > >(char const*, std::__1::vector<float, std::__1::allocator<float> >**, TBranch**) in MiniTuple.C.o
int TTree::SetBranchAddress<std::__1::vector<int, std::__1::allocator<int> > >(char const*, std::__1::vector<int, std::__1::allocator<int> >**, TBranch**) in MiniTuple.C.o
int TTree::SetBranchAddress<float>(char const*, float*, TBranch**) in MiniTuple.C.o
int TTree::SetBranchAddress<int>(char const*, int*, TBranch**) in MiniTuple.C.o
int TTree::SetBranchAddress<std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > > >(char const*, std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >**, TBranch**) in MiniTuple.C.o
"HistSvc::Fill(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, int, float, float, float, float)", referenced from:
MiniTuple::FillProbeB_region(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, int) in MiniTuple.C.o
"HistSvc::Fill(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, int, float, float, int, float, float, float, float, float)", referenced from:
MiniTuple::FillProbeB_region(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, int) in MiniTuple.C.o
"HistSvc::WriteHist()", referenced from:
MiniTuple::Finalize() in MiniTuple.C.o
"TBuffer::GetClass(std::type_info const&)", referenced from:
void TDirectoryFile::GetObject<TTree>(char const*, TTree*&) in MiniTuple.C.o
"TObject::operator delete(void*)", referenced from:
MiniTuple::MiniTuple(TTree*) in MiniTuple.C.o
MiniTuple::AddOutputStream(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >) in MiniTuple.C.o
"TStorage::ObjectAlloc(unsigned long)", referenced from:
TObject::operator new(unsigned long) in MiniTuple.C.o
"TDataType::GetType(std::type_info const&)", referenced from:
int TTree::SetBranchAddress<std::__1::vector<float, std::__1::allocator<float> > >(char const*, std::__1::vector<float, std::__1::allocator<float> >**, TBranch**) in MiniTuple.C.o
int TTree::SetBranchAddress<std::__1::vector<int, std::__1::allocator<int> > >(char const*, std::__1::vector<int, std::__1::allocator<int> >**, TBranch**) in MiniTuple.C.o
int TTree::SetBranchAddress<float>(char const*, float*, TBranch**) in MiniTuple.C.o
int TTree::SetBranchAddress<int>(char const*, int*, TBranch**) in MiniTuple.C.o
int TTree::SetBranchAddress<std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > > >(char const*, std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >**, TBranch**) in MiniTuple.C.o
"TTree::GetCurrentFile() const", referenced from:
MiniTuple::~MiniTuple() in MiniTuple.C.o
"typeinfo for TTree", referenced from:
void TDirectoryFile::GetObject<TTree>(char const*, TTree*&) in MiniTuple.C.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [src/libMiniTuple.dylib] Error 1
make[1]: *** [src/CMakeFiles/MiniTuple.dir/all] Error 2
make: *** [all] Error 2