Hi Riccardo, Please look at the numerous examples of main programs we have in $ROOTSYS/test. Note that since version 3, you do not need the call to the TROOT constructor: TROOT root("rint", "The ROOT Interactive Interface"); The initialisation of ROOT is automatic. Now, the main point: Why do you want to implement your own main program? It is much better to simply create your own shared lib and dynamically link it from Root itself root > gSystem->Load("mylib"); or root > .L myscript.C++ Rene Brun On Fri, 15 Feb 2002, Ricardo Eusebi wrote: > > How can I make an executable out of a simple root script like the following > ( linux OS) > > #include "TCanvas.h" > int main(){ > > TCanvas *can = new TCanvas("a","B",300,400); > > return 0; > } > > I tried everthing I saw on the web. > I also tried the following : > > > //////////////////////////////////////////////////////////////// > //For ROOT////////////////////////////////////////////////////// > #include "TROOT.h" > #include "TApplication.h" > TROOT root("rint", "The ROOT Interactive Interface"); > //////////////////////////////////////////////////////////////// > > int main() { > TApplication app("App","My Root Program"); > > return 0; > } > > and didn't compile with KCC nor with root> .L <filename>.C++ > > In advance, Thank you !! > > Ricardo > > -- > -------------------------------------------------------------------- > Ricardo Eusebi > High Energy Physics > University of Rochester > Fermilab, (630) 840 8622 > -------------------------------------------------------------------- >
This archive was generated by hypermail 2b29 : Sat Jan 04 2003 - 23:50:41 MET