Re: [ROOT] Problem compiling with ACLiC

From: Valeriy Onuchin (Valeri.Onoutchine@cern.ch)
Date: Mon Jul 21 2003 - 19:00:49 MEST


 Hi Christian,
static variables are intiated before program execution,
for example, at the  time when dynamic library (DLL) is loaded.
ACLiC produces such DLL ("guiArrayImpType_C.so").
In order to make yours example working, you need initialize gSystem,
something like:

TSystem *gSystem = new TMacSystem;
static TString sDir(gSystem->WorkingDirectory());
...

Why do you need such intialization?

Regards. Valeriy


> Dear Rooters
> 
> I have a long macro where I call TGFileDialog in a
> method, where I have defined:
>    static TString sDir(".");
> This macro compiles without any problems with ACLiC!
> 
> However, when I change only the above line to:
>    static TString sDir(gSystem->WorkingDirectory());
> I get the following error message even though I have
> added the include file: #include "TSystem.h"
> 
> root [1] .x guiArrayImpType.C+
> Info in <TUnixSystem::ACLiC>: creating shared library 
> /Users/cs/ROOT/rootcode/xgui/./guiArrayImpType_C.so
> Error: illegal pointer to class object gSystem 0x0 87  
> FILE:/Users/cs/ROOT/rootcode/xgui/guiArrayImpType.C LINE:661
> Warning: Error occured during reading source files
> Warning: Error occured during dictionary source generation
> !!!Removing /Users/cs/ROOT/rootcode/xgui/./tmp_1_Sb1zn8.cxx 
> /Users/cs/ROOT/rootcode/xgui/./tmp_1_Sb1zn8.h !!!
> Error: rootcint: error loading headers...
> Error in <ACLiC>: Dictionary generation failed!
> Error: Function guiArrayImpType() is not defined in current scope  FILE: 
> LINE:0
> Possible candidates are...
> filename       line:size busy function type and name  
> *** Interpreter error recovered ***
> root [2]
> 
> Do you have any ideas what the reason for this error could be?
> I am running root 3.05/06 on MacOS X 10.2.4.
> 
> Thank you in advance
> Best regards
> Christian
> _._._._._._._._._._._._._._._._
> C.h.i.s.t.i.a.n S.t.r.a.t.o.w.a
> V.i.e.n.n.a       A.u.s.t.r.i.a
> _._._._._._._._._._._._._._._._
> 
> 
> 



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