Re: [ROOT] Error: Symbol TSdaqGuiFactory is not defined in current scope FILE: LINE:0

From: Rene Brun (Rene.Brun@cern.ch)
Date: Sun Nov 23 2003 - 18:47:13 MET


Hi Simon,

Why are you doing:

   gGuiFactory = (TGuiFactory *) gROOT->ProcessLineFast("new> 
TSdaqGuiFactory();");

instead of

   gGuiFactory = new  TSdaqGuiFactory();

The first form requires your class TSdaqGuifactory to be known by CINT. 
You must generate a dictionary (via rootcint).

Why do you need to develop a GuiFactory?

Rene Brun

On Sun, 23 Nov 2003, sdean 
wrote:

> Hi ROOT-talkers,
> 
> I've succesfully built a library called 'libsmt_ped_tools.a' containing 
> various ROOT-based classes, one of which is called TSdaqGuiFactory 
> (inherits from TGuiFactory). This library was linked in when I built the 
> following piece of code:
> 
> ==================================================================
> #include "smt_ped_tools/sdaqbrowser.hpp"
> 
> int main(int argc, char **argv){
> 
>   TApplication thisapplication("This Application", &argc, argv);
>   
>   gGuiFactory = (TGuiFactory *) gROOT->ProcessLineFast("new 
> TSdaqGuiFactory();");
>   new TBrowser("Browser","SMT SDAQ Browser",800,600);
>   
>   thisapplication.Run();
>   
>   return 0;
> }
> 
> ===================================================================
> (sdaqbrowser.hpp contains the line:
> 	#include "smt_ped_tools/TSdaqGuiFactory.hpp" )
> 
> 
> However, when I run the resulting binary, I get the errors shown at the 
> end of this message. Can anyone see what's going wrong? The version of 
> ROOT being used is v3_05_00b and I'm running in Linux with GCC 3.1.
> 
> Thank you all for any help you can send my way,
> 
> Simon
> 
> 
> 
> 
> 
> ================= ERROR OUTPUT FOLLOWS =========================
> 
> Error: Symbol TSdaqGuiFactory is not defined in current scope  FILE: 
> LINE:0
> Error: type TSdaqGuiFactory not defined FILE: LINE:0
> *** Interpreter error recovered ***
> 
>  *** Break *** segmentation violation
>  Generating stack trace...
> 
>  *** Break *** write on a pipe with no one to read it
> 
>  *** Break *** write on a pipe with no one to read it
> 
>  *** Break *** write on a pipe with no one to read it
> 
>  *** Break *** write on a pipe with no one to read it
>  0x401fc101 in TUnixSystem::StackTrace() + 0x231 from 
> /D0/ups/root/Linux-2-4/v3_05_00bGCC_3_1-exception-opt-thread/lib/libCore.so
>  0x401faccf in TUnixSystem::DispatchSignals(ESignals) + 0x11f from 
> /D0/ups/root/Linux-2-4/v3_05_00bGCC_3_1-exception-opt-thread/lib/libCore.so
>  0x401f9c66 in <unknown> from 
> /D0/ups/root/Linux-2-4/v3_05_00bGCC_3_1-exception-opt-thread/lib/libCore.so
>  0x401fdfde in <unknown> from 
> /D0/ups/root/Linux-2-4/v3_05_00bGCC_3_1-exception-opt-thread/lib/libCore.so
>  0x417f44f3 in <unknown> from /lib/libpthread.so.0
>  0x4182f8b8 in <unknown> from /lib/libc.so.6
>  0x08048acc in TApplication::TApplication[in-charge](char const*, int*, 
> char**, void*, int) + 0x284 from ./bin/Linux2.4-GCC_3_1/sdaqbrowser
>  0x4181d336 in __libc_start_main at 
> /usr/src/build/133577-i386/BUILD/glibc-2.2.4/csu/../sysdeps/generic/libc-start.c:129 
> from /lib/libc.so.6
>  0x08048921 in TBrowser::TBrowser[in-charge](char const*, char const*, 
> unsigned, unsigned) + 0x49 from ./bin/Linux2.4-GCC_3_1/sdaqbrowser
> Abort (core dumped)
> 
> 



This archive was generated by hypermail 2b29 : Thu Jan 01 2004 - 17:50:17 MET