Re: [ROOT] Comipled problem ?

From: Kurt Rinnert (rinnert@ekp.physik.uni-karlsruhe.de)
Date: Thu Aug 09 2001 - 13:36:16 MEST


Hi Harufumi,

it looks like you never enter the ROOT event loop. I suppose you create
an instance of TApplication in your program, i.e. something like

TApplication* app = new TApplication("ROOT APP", &argc, argv, NULL, 0);

or (in case you want a ROOT prompt)

TRint* app = new TRint("ROOT APP", &argc, argv, NULL, 0);

You then have to call 

app->Run();

to enter the ROOT event loop after you created your canvas. Otherwise
your program terminates, everything goes out of scope and the canvas is
deleted.

hope this helps
	Kurt

> Harufumi Tsuchiya wrote:
> >
> > Hi, everyone.
> >
> > I use ROOT v3.01/06 which was compiled on FreeBSD 4.3 using
> > gcc 2.95.3.
> >
> > When I compiled my C++ program by following way,
> > I got message shown bellow.
> >
> > g++ -I$ROOTSYS/include xy_distv22_compile.cpp `root-config --cflags --libs --glibs`
> >
> > $ROOTSYS/lib/libCore.so: warning: tmpnam() possibly used unsafely; consider using mkstemp()
> >
> > What the meaning of the message ?
> >
> > After that, excutable file (a.out) was available. But, I could not show
> > result on display after excuting a.out. Its canvas apeared for a moment
> > and disapeared immediately,
> > while I could get canvas and expected result using not-compiled macro.
> > Why ?
> >
> > Please tell me the reason why these behavior happened.
> >
> > Thank you for your help !
> >
> > Best regards.
> >
> >

-- 
Kurt Rinnert  ***  eMail rinnert@ekp.physik.uni-karlsruhe.de



This archive was generated by hypermail 2b29 : Tue Jan 01 2002 - 17:50:56 MET