ROOT::Minuit2::Minuit2Minimizer problems


    I am following the example here: [url][/url]

and have built ROOT with the minuit2 option however, I get the errror:

Undefined symbols for architecture x86_64:
“ROOT::Minuit2::Minuit2Minimizer::SetFunction(ROOT::Math::IBaseFunctionMultiDim const&)”, referenced from:
_main in Prime.o
"ROOT::Minuit2::Minuit2Minimizer::SetVariable(unsigned int, std::basic_string<char, std::char_traits, std::allocator > const&, double, double)", referenced from:
_main in Prime.o
"ROOT::Minuit2::Minuit2Minimizer::PrintResults()", referenced from:
_main in Prime.o
"ROOT::Minuit2::Minuit2Minimizer::Minimize()", referenced from:
_main in Prime.o
"ROOT::Minuit2::Minuit2Minimizer::Minuit2Minimizer(ROOT::Minuit2::EMinimizerType)", referenced from:
_main in Prime.o
"ROOT::Minuit2::Minuit2Minimizer::~Minuit2Minimizer()", referenced from:
_main in Prime.o
"ROOT::Minuit2::Minuit2Minimizer::X() const", referenced from:
_main in Prime.o
ld: symbol(s) not found for architecture x86_64
collect2: error: ld returned 1 exit status
make: *** [Project] Error 1

with the code:

ROOT::Minuit2::Minuit2Minimizer min ( ROOT::Minuit2::kMigrad );
  double StepFactor = 2.;
  double U238StepFactor = 5.;
  ROOT::Math::Functor f(&LogLikelihood, 24);
  min.SetVariable(0,"C0", U238Coefficients[0], 1.e-1/U238StepFactor);
  min.SetVariable(1,"C1", U238Coefficients[1], 1.e-2/U238StepFactor);
  min.SetVariable(2,"C2", U238Coefficients[2], 1.e-2/U238StepFactor);

  const double *xs = min.X();

Does anyone know what is going on? Thank you very much. Please note that I have cut out the majority of my variables. I have 24 but for the sake of briefness, I cut down the code for viewing.

Solved after I posted this. I wasn’t linking the lMinuit2 library.