Undefined reference to `TMVA::Tools::Instance()'

Dear experts,

I want to compile the TMVAClassification() in my main.cc[1] using a Makefile [2] but I git the error message [3]. Is some TMVA library missing in my Makefile?




In function TMVAClassification(TString)': main.cc:(.text+0x979): undefined reference toTMVA::tools::Instance()'
collect2: error: ld returned 1 exit status
Makefile:10: recipe for target ‘do.exe’ failed
make: *** [do.exe] Error 1

You need to link with -lTMVA

Also, consider using at least -Wall -Wextra

Dear behrenhoff,

it helps a lot, but I still have the error message [1]. Do you know which library is missing?


undefined reference to `TMVA::TMVAGui(char const*)’

Note: you need ROOT 6.

Dear behrenhoff and Pepe,

all compile now. Thank you for your help.