Dear experts,
While I was compiling my c++ code (hist_mass_vn.C) with the following command it is showing me some errors mentioned below. In my code, I am using the TMVA Reader() and the .xml files that are produced after BDT training because of that it is showing an error. I tried with multiple options available for compilation but nothing worked in my case. I will appreciate any kind of help on this.
Compilation command I am using:
g++ -o vn.out hist_mass_vn.C
root-config --cflags --glibs`
Error I am getting:
/tmp/nsaha/ccmMt5bV.o: In function `hist_mass_vn(int)':
hist_mass_vn.C:(.text+0x1a60): undefined reference to `TMVA::Tools::Instance()'
hist_mass_vn.C:(.text+0x1aa1): undefined reference to `TMVA::Reader::Reader(TString const&, bool)'
hist_mass_vn.C:(.text+0x1b0d): undefined reference to `TMVA::Reader::AddVariable(TString const&, float*)'
hist_mass_vn.C:(.text+0x1b56): undefined reference to `TMVA::Reader::AddVariable(TString const&, float*)'
hist_mass_vn.C:(.text+0x1b9f): undefined reference to `TMVA::Reader::AddVariable(TString const&, float*)'
hist_mass_vn.C:(.text+0x1be8): undefined reference to `TMVA::Reader::AddVariable(TString const&, float*)'
hist_mass_vn.C:(.text+0x1c31): undefined reference to `TMVA::Reader::AddVariable(TString const&, float*)'
/tmp/nsaha/ccmMt5bV.o:hist_mass_vn.C:(.text+0x1c7a): more undefined references to `TMVA::Reader::AddVariable(TString const&, float*)' follow
/tmp/nsaha/ccmMt5bV.o: In function `hist_mass_vn(int)':
hist_mass_vn.C:(.text+0x1d40): undefined reference to `TMVA::Reader::BookMVA(TString const&, TString const&)'
hist_mass_vn.C:(.text+0x2508): undefined reference to `TMVA::Reader::EvaluateMVA(TString const&, double)'
collect2: error: ld returned 1 exit status
Thanks & regards,
Nihar