TF1::Integral() in 5.34/36 not compatible with new version

Hello Rooters,

I have a root project which needs to run on Windows and on Linux. For Windows compilation with VisualStudio I learned in the forum that only Root5 works. For the Linux compilation any version should work, especially since my collaborators mostly always have the newest version. It turns out, that Root6 TF1::Integral() is not backwards compatible with Root5 TF1:Integral() and consequently I cannot compile my project since I need the TF1::Integral() functionality to work in both:

Root6:

Root5:

Double_t Integral(Double_t a, Double_t b, const Double_t* params = 0, Double_t epsilon = 1e-12) Double_t Integral(Double_t ax, Double_t bx, Double_t ay, Double_t by, Double_t epsilon = 1e-12) Double_t Integral(Double_t ax, Double_t bx, Double_t ay, Double_t by, Double_t az, Double_t bz, Double_t epsilon = 1e-12)

Do you have a tip how I can solve this? Is there maybe a flag for the compiler to leave out or include sections of code depending on the Root version?

Cheers,
Andreas

I have found a quick fix in the meantime, exploiting that on Windows I only use Root5 and on Linux only the new Root versions. It compiles now, but I am not sure what the equivalent of the Root6 integral is in the Root5 syntax. I would be happy about a nice solution where my project would be compilable on the same OS with both Root versions! Here is my fix:

Double_t ax(0),bx(0),ay(0),by(0),epsilon(1e-12);
//some code
#ifdef _WIN32
    Double_t Integral(ax,bx, ay,by, epsilon)
#elif __linux__
    Double_t Integral(ax, bx, epsilon)
#elif __unix__ // all unices not caught above
    Double_t Integral(ax, bx, epsilon)
#else
#   error "Unknown OS!"
#endif