error: no member named ‘GSLMCIntegrator’ in namespace ‘ROOT::Math’
ROOT::Math::GSLMCIntegrator ig(ROOT::Math::IntegrationMultiDim::kVEGAS,1,1,1e4);
~~~~~~~~~~~~^
error: use of undeclared identifier ‘ig’
ig.SetFunction(wf);
^
error: use of undeclared identifier ‘ig’
return ig.Integral(xmin,xmax); //in GeV^{-2}
The system seems not to recognize the class…it doesn’t matter wheter i include the library Math/GSLMCIntegrator.h or not the outcome is the same.
Hi @dfagundes,
thank you for posting on the ROOT forum!
The functions you’re looking for are part of the MathMore package, which should be enabled by default in ROOT. However, your error makes me think that in your installation you don’t have it. Can you tell how you’ve installed ROOT?
The option for MathMore depends on you having GSL installed on your system or using the builtin version of GSL. If you are not using the CMake build system, it’s recommended that you install GSL with homebrew or similar prior to installing ROOT.
thanks for the spot-on answer. Now I see the problem…I installed ROOT from Snap, trying to avoid the long installation using CMake. But I shall step back and to see what get after your advices. What looks very strange to me is that this very same code used to work perfectly 6 months back in the same machine. Maybe I messed it up with some update…
i installed Root 6.30.04 from scratch using CMake, still I get the some errors. Following other posts here i red that Mathmore is installed by default in the Cmake installation.