Alternatively, but more cryptic you could use:
#include "TObject.h"
// 262146 = 4.00.02
#if ROOT_VERSION_CODE < 262146
typedef double Double32_t;
#endif
which rootcint can parse directly.
Cheers, Fons.
On Wed, 2004-06-09 at 19:03, Philippe Canal wrote:
> Try
> rootcint -f TTCint.cxx -c -p tt.h
>
> Cheers,
> Philippe
>
> -----Original Message-----
> From: owner-roottalk@pcroot.cern.ch
> [mailto:owner-roottalk@pcroot.cern.ch]On Behalf Of Ruben Shahoyan
> Sent: Wednesday, June 09, 2004 1:08 PM
> To: roottalk@cern.ch
> Subject: [ROOT] Problem with ROOT_VERSION macro
>
>
> Hello,
> I have problem with creating the dictionary for the class
> whose definition depends on the root version.
> The simple code like
>
> //------- header file
> #include "TObject.h"
> #if ROOT_VERSION_CODE < ROOT_VERSION(4,00,2)
> typedef double Double32_t;
> #endif
>
> class NaCovMatrix : public TObject {
> public:
> NaCovMatrix() {fSize2=0; fElements = 0;}
> Int_t fSize2; // array size
> Double32_t* fElements; //[fSize2] Elements
> ClassDef(NaCovMatrix,11) //Covariance Matrix Class Double32
> };
>
> //------- source file
> #include "tt.h"
> ClassImp(tt)
>
> leads to following output:
>
> rootcint -f TTCint.cxx -c tt.h
> Error: Too many '}' FILE:tmpfile LINE:265
> Error: Unexpected EOF G__exec_statement() FILE:tmpfile LINE:266
> Advice: You may need to use +P or -p option
> Error: link requested for unknown class tt FILE:G__auto28287LinkDef.h
> LINE:7
> Warning: Error occured during reading source files
> Warning: Error occured during dictionary source generation
> !!!Removing TTCint.cxx TTCint.h !!!
> Error: rootcint: error loading headers...
>
> although the gcc does not complain at all.
>
> Any hints?
> Regards,
> Ruben
--
Org: CERN, European Laboratory for Particle Physics.
Mail: 1211 Geneve 23, Switzerland
E-Mail: Fons.Rademakers@cern.ch Phone: +41 22 7679248
WWW: http://www.rademakers.org/fons/ Fax: +41 22 7679480
This archive was generated by hypermail 2b29 : Sun Jan 02 2005 - 05:50:08 MET