Hi:
I am new to root, so right now I just run the example in root primer:
[code] #include “TF1.h”
#ifndef CINT
int main()
{
TF1 *f1 = new TF1(“f1”,“sin(x)/x”,0.,10.);
f1->Draw();
return 0;
}
#endif[/code]
and then g++ source.cpp -lHist -lCore to compile the source file and it generate executable file a.out.
However, I run ./a.out, it said that
Info in TCanvas::MakeDefCanvas: created default TCanvas with name c1
*** Error in `./a.out’: double free or corruption (!prev): 0x0000000001584fc0 ***
Aborted
I want to ask how to make such simple example work? Because it totally work in ROOT interactive shell.