RE: [ROOT] Problem compiling with ACLiC

From: Philippe Canal (pcanal@fnal.gov)
Date: Mon Jul 21 2003 - 20:14:11 MEST


Hi Christian,

While parsing the file, CINT is warning you of a potential problem (i.e.
gSystem is not guarantee to be set at the time of execution).  When using
ACLiC, we know that gSystem has already been set (because the system got
initialized to the point of letting you call ACLiC), so it is a spurrious
message in __this__ case.  You can work-around the problem being doing:

  void guiArrayImpType() {
#ifndef __CINT__ /* hide the implementation from CINT */
  ...
#endif
  }

However, is it really you intent from your function to record the current
directory at the time of the first call and use it for any susequent calls?
This __sounds__ like a potential source of problem (i.e. surprising
behavior).   What was your intent?

Cheers,
Philippe.

-----Original Message-----
From: owner-roottalk@pcroot.cern.ch
[mailto:owner-roottalk@pcroot.cern.ch]On Behalf Of cstrato
Sent: Sunday, July 20, 2003 4:59 PM
To: roottalk
Subject: [ROOT] Problem compiling with ACLiC


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