How to do grafics w/o interpreter?

From: merzky@zib.de
Date: Sun Jul 27 1997 - 15:58:26 MEST


// Hello!

// These days I tried to use ROOT to draw some histograms like the ones
// shown at the ROOT webpages. It didn't work...

// Well, it's fine to have a C Interpreter, but I liked to use ROOT's
// functions in compiled programs. I hoped: some calls, and I have a pic/histogram...

// Why doesn't it work? 
// It compiles w/o problems, but gives no output, esp. no grafical...
// Didn't I correctly understood the idea of ROOT at all? It seems to work fine
// via the interpreter (ROOT shell)...

// Sincerly yours, Andre Merzky.

//___________________________________________________________________________
//TEST.C - Test Root
//___________________________________________________________________________

#include <stdio.h>

#include "TROOT.h"
#include "TApplication.h"
#include "TCanvas.h"
#include "TPaveLabel.h"


//___________________________________________________________________________
void main (void)
{
	TROOT blub("Test", "Test of ROOT...");  // btw: where is this call documented?
	
	TCanvas *c1 = new TCanvas("c1");
	c1->Range(0,0,1,1);
	
	TPaveLabel par(0.1,0.8,0.9,0.95,"Example");
	par.SetFillColor(42);
	par.Draw();
	
	return;
}

// PS.:

// compiled with: 
// CC -I. -I/apps/software/root/include -I/usr/include                     \
//     +a1 +Z  -O -w -c -o test.o test.C 

//  CC -O -g +a1 -z test.o -o test                                          \
//     -L/apps/software/root/lib                                            \
//     -lBase -lCint -lClib -lCont -lFunc -lGraf -lGraf3d -lHist -          \
//     -lHtml -lMeta -lMinuit -lNet -lPostscript -lProof -lTree -lUnix      \
//     -lZip -lGpad -lGX11 -lMotif -lWidgets -lX3d 



This archive was generated by hypermail 2b29 : Tue Jan 04 2000 - 00:26:20 MET