Use of ROOT:Math::chisquared_cdf_c

I am trying to use ROOT:Math::chisquared_cdf_c.

I have a very simple macro

#include <stdio.h>
#include <TROOT.h>
#include <TChain.h>
#include <TFile.h>
#include <string.h>
void strange(){
double pippo =ROOT::Math::chisquared_cdf_c(80,76);

I do:


then I try to compile:

.L strange.cpp++

and I get the following

Info in : script has already been loaded in interpreted mode
Info in : unloading /a/home/kolya/fspano/topanalysis/src/./strange.cpp and compiling it
Info in TUnixSystem::ACLiC: creating shared library /a/home/kolya/fspano/topanalysis/src/./
In file included from /a/home/kolya/fspano/topanalysis/src/./fileyjyQCf.h:32,
from /a/home/kolya/fspano/topanalysis/src/./fileyjyQCf.cxx:16:
/a/home/kolya/fspano/topanalysis/src/./strange.cpp: In function void strange()': /a/home/kolya/fspano/topanalysis/src/./strange.cpp:12: error:gSystem’ was not declared in this scope
/a/home/kolya/fspano/topanalysis/src/./strange.cpp:13: error: ROOT::Math' has not been declared /a/home/kolya/fspano/topanalysis/src/./strange.cpp:13: error:chisquared_cdf_c’ was not declared in this scope
/a/home/kolya/fspano/topanalysis/src/./strange.cpp:12: warning: unused variable ‘gSystem’
/a/home/kolya/fspano/topanalysis/src/./strange.cpp:13: warning: unused variable 'chisquared_cdf_c’
distcc[22493] ERROR: compile /a/home/kolya/fspano/topanalysis/src/./fileyjyQCf.cxx on localhost failed
g++: /a/home/kolya/fspano/topanalysis/src/./fileyjyQCf.o: No such file or directory
distcc[22498] ERROR: compile (null) on localhost failed
Error in : Compilation failed!

Why can’t I compile? Do I need just to define the ROOT::Math namespace in the beginning?



Somehow the code you included in this post and the error message do not match.
Anyway, the error seem to simply be that you have not included the proper header file.