RE: [ROOT] signals/slots in the ROOT standalone application

From: Valeri Fine (fine@bnl.gov)
Date: Thu Sep 02 2004 - 22:28:24 MEST


Hello Vassili,

What you did should be correct. However I have to admit I never tried to
do what you did, namely to compile and run "guitest.C" against of Qt
layer.
I'll try to reproduce your problem (tonight) and let you know. I am away
at the moment.

 Did you try to run guitest.C as a ROOT macro ? Did it work?
  Thank you, Valeri 

> -----Original Message-----
> From: owner-roottalk@pcroot.cern.ch
[mailto:owner-roottalk@pcroot.cern.ch]
> On Behalf Of Vassili Maroussov
> Sent: Thursday, September 02, 2004 1:05 AM
> To: roottalk@pcroot.cern.ch
> Subject: [ROOT] signals/slots in the ROOT standalone application
> 
> Dear All,
> 
> there is an "#if" in the "tutorials/guitest.C"  that gives a hint it's
> possible to
> build a standalone application if to #define STANDALONE:
> 
> //-------------------------------------------
> #ifdef STANDALONE
> TROOT root("GUI", "GUI test environement");
> 
> int main(int argc, char **argv)
> {
>    TApplication theApp("App", &argc, argv);
> 
>    if (gROOT->IsBatch()) {
>       fprintf(stderr, "%s: cannot run in batch mode\n", argv[0]);
>       return 1;
>    }
> 
>    guitest();
> 
>    theApp.Run();
> 
>    return 0;
> }
> #endif
> //-------------------------------------------
> 
> In order to build a standalone application I've tried the following
> naive way:
> 
> 1) (I've) installed qt-free-3.3.3 with the "./configure -qt-gif
-thread";
> 2) installed ROOT-4.00.08 with "./configure --enable-qt
--enable-table";
> 3) copied ".rootrc" given at
http://root.bnl.gov/QtRoot/QtRoot.html#switch
>    into the working directory ("$ROOTSYS/tutorials");
> 4) copied Makefile and Makefile.arch from "../test" to the working
dir.;
>    and built an executable by "make guitest" (lazy guy);
> 
> I've used the gcc version 2.96 20000731 (Red Hat Linux 7.2
2.96-112.7.1)
> 
> I haven't got any compilation error message, but a core dump while
trying
> to run the "./guitest":
> 
> -------------
> ** $Id: TGQt.cxx,v 1.2 2004/07/11 04:14:11 brun Exp $ this=0x8a4ed90
> Error in <TUnixSystem::DynamicPathName>: QtGui[.so | .sl | .dl | .a]
> does not exist in
>
.:/usr/local/ROOT/new/lib:/usr/local/ROOT/new/lib:./:/usr/lib/qt-3.3.3/l
ib
> 
>  *** Break *** segmentation violation
>  Generating stack trace...
>  0x41593958 in <unknown> from /lib/i686/libc.so.6
>  0x0805c32b in guitest(void) + 0x37 from ./guitest
>  0x0805c3ed in main + 0x81 from ./guitest
>  0x41581657 in __libc_start_main at
>
/usr/src/build/230306-i686/BUILD/glibc-2.2.4/csu/../sysdeps/generic/libc
-
> start.c:129
> from /lib/i686/libc.so.6
>  0x0804eb81 in TGGroupFrame::TGGroupFrame(TGWindow const *, TGString
*,
> unsigned int, unsigned long, unsigned long, unsigned long) + 0x3d from
> ./guitest
> Aborted (core dumped)
> -------------
> 
> What is a correct way to build a standalone version of "guitest.C"
with
> signals/slots?
> 
> Thank you,
> 
> Vassili.



This archive was generated by hypermail 2b29 : Sun Jan 02 2005 - 05:50:09 MET