Integration in ROOT

Hello
I’m trying to use integration in ROOT however root crashes without any message. Can someone help me here?
Here is the code, the second #include command contains <iostream but two angle brackets cause it to remove it from the post for some reason.

#include "Math/Integrator.h"

// #include<iostream>

// using namespace std;

double f(double x){

    return (pow(x,2));

}

void temp()

{ROOT::Math::Functor1D testFunc(&f);

ROOT::Math::Integrator ig(testFunc,ROOT::Math::IntegrationOneDim::kGAUSS);

ig.SetFunction(testFunc);

double val = ig.Integral(0,2);

std::cout<<val;}

Please read tips for efficient and successful posting and posting code

ROOT Version: 6.20/00
Platform: Windows
Compiler: Not Provided


See the “Tips for Efficient and Successful Posting” and then “Posting code? Read this first!”.

Sorry for posting the full code here but the code is short, and I don’t know what is causing this to happen.

Fix errors reported by:
root [0] .L temp.cxx++

root [0] .L temp.Cpp++
Info in <TWinNTSystem::ACLiC>: creating shared library C:/Users/akasp/root/macros/temp_Cpp.dll
input_line_12:7:28: error: use of undeclared identifier 'IC'
"C:/Users/akasp/root/etc" -IC:/Users/akasp/root/etc//cling -IC:/Users/akasp/root/include"",
                           ^
Error in <ACLiC>: Dictionary generation failed!

@bellenot No such variable is present in the code

This issue with ACLiC has been fixed in more recent version of ROOT (e.g. 6.20.04)

Is there any way to update the root version without replacing the whole binary, ie through command line?

No, sorry, the only way is to replace everything