Hello everyone!
I can’t comlipe c++ file with ROOT functions. That is my code:
#include <iostream>
#include <TGraphErrors.h>
#include <vector>
#include<TCanvas.h>
int main()
{
std::vector <double> x{1,2,3,4,5,25,6,134,1,6,24,25,124,7,4,235,12,23,4,12,43,13,134,13,3};
std::vector <double> y{12,42,12,5,21,54,2,12,5,4,654,12,6,23,14,3,54,125,12,23,4,21,21,4,4};
TGraphErrors *graph = new TGraphErrors(x.size(),x.data(),y.data());
TCanvas polotno("canvas");
graph->Draw("*p");
polotno.Print("zero.pdf");
return 0;
}
I am compiling it using this command:
g++ -std=c++0x 1.cc `root-config --cflags --ldflags --libs`
And I get a such error:
/usr/bin/ld: cannot find -lGraf3d
/usr/bin/ld: cannot find -lPostscript
/usr/bin/ld: cannot find -lPhysics
collect2: error: ld returned 1 exit status