RE: [ROOT] Dictionary Generation ... setting gMyClassObject

From: Philippe Canal (pcanal@fnal.gov)
Date: Wed Jul 30 2003 - 17:30:52 MEST


Hi,

If rootcint's last parameter is a file whose name (before the extension) 
does not end with the letter 'linkdef' (with some leniency on casing), 
it tries to generate the dictionary for a class with the same name as
the file name.

You linkdef file name is missing the letter 'k'.  Just rename it and
it should work.

Cheers,
Philippe.

-----Original Message-----
From: owner-roottalk@pcroot.cern.ch
[mailto:owner-roottalk@pcroot.cern.ch]On Behalf Of zaldy
Sent: Wednesday, July 30, 2003 1:23 AM
To: roottalk@pcroot.cern.ch
Subject: [ROOT] Dictionary Generation ... setting gMyClassObject



Dear Rooters,


I would like to create a dictionary file at the command prompt:
   rootcint mydict.cc -c SB_CosmicRay.hh SB_CosmicRayLinDef.hh

I need this to generate a global class object; gMyClassObject;

However, I am met with this error:
--------------------------------
 Error: link requested for unknown class SB_CosmicRayLinDef 
FILE:G__auto3564LinkDef.h LINE:8
Warning: Error occured during reading source files
Warning: Error occured during dictionary source generation
!!!Removing mydict.cc mydict.h !!!
Error: rootcint: error loading headers...
---------------------------------


The content of SB_CosmicRayLinDef.hh
 is: 
     ----------------------------------------
     #ifdef __CINT__
     #pragma link C++ global gMyClassObject;
     #endif 
     ---------------------------------------

while SB_CosmicRay.hh is a generated file using 
tree->MakeClass("SB_CosmicRay");

Is this the correct way of making a global object (i.e, gROOT, etc)?
If so, how do we get rid of this error?

I'd appreciate your help/hint.
Thank you very much.


-- 

--------------------------------------------------------
                   Zaldy A. Nawang 
                   PS Users Room 2
                   Yon Gokan, 
                   E362, Neutrino Group, 
                   IPNS, KEK, 
                   Japan 
                    
                   e-mail: zaldy@neutrino.kek.jp
                   Tel. No. : (81) 029864 - 5387
--------------------------------------------------------



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