Dear Rene,
there is no problem to build a standalone executable from
test/guitest.cxx (it doesn't use signal/slots), but I'm specifically
interested how to use the signal/slot mechanism (like in
tutorials/guitest.C) in standalone executables.
Thank you,
Vassili.
Rene Brun wrote:
> see $ROOTSYS/test/guitest.cxx
>
> running make in the test directory will automatically build the
> standalone
> executable guitest.
>
> Rene Brun
>
> Vassili Maroussov wrote:
> >
> > 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/lib
>
> >
> > *** 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