RE: rootcint error

From: Philippe Canal <pcanal_at_fnal.gov>
Date: Fri, 29 Sep 2006 12:46:04 -0500


Hi Akira,

If you generate the dictionary for your class using rootcint, instead of doing "#include the same header in a macro", you should simply use the library you build. In addition, you "#include the same header in a macro", this means that you intent on 'interpreting' your library code ... which I have to believe is __not__ what you want. (aka doing "execute it with the '+'" is anyway the right thing to do if you don't have the dictionary already generated).

Cheers,
Philippe.

-----Original Message-----
From: OKUMURA, Akira [mailto:oxon_at_icrr.u-tokyo.ac.jp] Sent: Friday, September 29, 2006 12:40 PM To: Philippe Canal
Cc: 'RootTalk'
Subject: Re: [ROOT] rootcint error

Hello Philippe,

-p option works when I use rootcint in command lines. However if I #include the same header in a macro and execute it without "+",
ROOT dumps similar errors.

Do you have any solution ?

Sincerely,

OKUMURA, Akira oxon_at_icrr.u-tokyo.ac.jp
Institute for Cosmic Ray Research, University of Tokyo 5-1-5 Kashiwanoha Kashiwa Chiba 277-8582 Japan Phone/Fax : +81 4-7136-3153
Skype : okumura.akira

On 2006/09/26, at 3:04, Philippe Canal wrote:

> This is probably a weakness in CINT macro preprocessor.
> Use the compiler's own pre-processor by adding the -p option:
>
> rootcint -f src/CorsikaIODict.cxx -c -p include/ACorsikaIACTFile.h
> include/LinkDef.h
>
> Cheers,
> Philippe.
>
> -----Original Message-----
> From: owner-roottalk_at_pcroot.cern.ch [mailto:owner-
> roottalk_at_pcroot.cern.ch]
> On Behalf Of OKUMURA, Akira
> Sent: Monday, September 25, 2006 9:49 AM
> To: RootTalk
> Subject: [ROOT] rootcint error
>
> Hello ROOTers,
>
> rootcint seems not to be able to handle comments correctly.
>
> The following is output of my makefile.
>
> ------------
> rootcint -f src/CorsikaIODict.cxx -c include/ACorsikaIACTFile.h
> include/LinkDef.h
> Error: Illegal pointer operation (tovalue) include/bernlohr/initial.h:
> 100:
> Error: operator '/' divided by zero include/bernlohr/initial.h:100:
> Syntax Error: (defined(lynx)||defined(__lynx__))/*Lynx-OS*/ include/
> bernlohr/initial.h:100:
> ------------
>
> If I delete the comment at the end of the line 99, rootcint runs
> without this error.
>
> line 98: # define MISSING_SNPRINTF 1
> line 99: #elif ( defined(lynx) || defined(__lynx__) ) /* Lynx-OS */
> line 100: # define OS_UNIX 1
>
> Is this a bug or any my mistake ?
>
> ROOT 5.08.00b with Fedora Core 3/GCC 3.4.3.
>
> Sincerely,
>
> OKUMURA, Akira oxon_at_icrr.u-tokyo.ac.jp
> Institute for Cosmic Ray Research, University of Tokyo
> 5-1-5 Kashiwanoha Kashiwa Chiba 277-8582 Japan
> Phone/Fax : +81 4-7136-3153
> Skype : okumura.akira
>
>
>
Received on Fri Sep 29 2006 - 19:46:18 MEST

This archive was generated by hypermail 2.2.0 : Mon Jan 01 2007 - 16:32:01 MET