Re: [ROOT] Problem compiling with ACLiC

From: cstrato (aon.912121399@aon.at)
Date: Mon Jul 21 2003 - 23:07:52 MEST


Dear Philippe, Valeriy, Rene

Thank you for your answers and your explanations.

To answer your question: What is my intent?

Surely, one of the greatest features of ROOT is CINT. I still cannot believe
how well this C++ interpreter works, and being able to compile my source
code on the fly, using ACLiC is also a great feature.

Concretely, as you probably know, I am currently developing a very complex
GUI for my program, which consist of many separate complex frames.
So, my developing cycle is the following:
1, I develop the separate frames as separate macros, taking advantage of 
the interpreter.
2, I compile each macro with ACLiC to find hidden errors, since sometimes
CINT is too forgiving.
3, Finally, I add the code to the other code of my GUI app.

As you see, my macros are not intended to be macros, but simply a great
way to develop my application. I hope this answers your question.

It is clear to me that both CINT and ACLiC have limitations, and I have
no problem to live with these limitations. However, I will continue to 
report
problems which I encounter, even though some of these problems will not be
solved. Maybe, I could suggest to add an item to the Reference Guide, where
all these limitations will be listed. This would make it easier to 
distinguish
between inherent limitations and my own bugs.

Maybe, I could take the opportunity to tell you my wishlist to CINT:
It would be great if ROOT/CINT would have an option to force CINT
to adhere to ANSI C++ standard, e.g. by starting ROOT with root -ansi.
This would make it even more easy to use CINT for code development.

Thank you all for developing such a great tool, and Masaharu for CINT.

Best regards
Christian

P.S.: Dear Valeriy:
Sorrowly, your suggestion with TMacSystem did not help.


Philippe Canal wrote:

>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