Hi,
So I was writing my simple code under xcode 3.1 trying to link root dylib as following:
- first here is my simple code:
#include “/sw2/include/root/TH1.h”
#include “/sw2/include/root/TCanvas.h”
int main () {
TCanvas *c1 = new TCanvas(“c1”,“Example”,10,10,700,500);
c1->SetFillColor(33);
c1->SetFrameFillColor(41);
c1->SetGrid();
TH1F* h = new TH1F("h1","h1 title",100,0,10);
for (int i=0; i<10; i++){
h->Fill(i);
}
h->Draw();
return 0;
}
-
I added libCore.5.20.dylib, libPad.5.20.dylib and libHist.5.20.dylib to my target for linking.
-
I compile and everything is fine.
-
I run the program and it returns 0. I also check the value of c1 and h and they are not NULL.
-
But where is my plot?
Thanks,
Bahman.