Rootcint and I2O standard

Hi,
I am developing an interface between root and I2O, Intelligent Input/Output (I2O), a pupular interface to transmit data.
While things correctly work if I build my C++ program and link root libraries, I was not able to integrate I2O inside root, for interactive use for example.
The problem comes from the rootcint step: rootcint seems not to be able to parse the standard i2o .h files.
Specifically, I get

[pccmsgw] /cmsraid1/tom/TEST > make -f extMakeFile
Generating dictionary …
Warning: Illegal numerical expression 2_0_0 FILE:i2o/shared/i2omsg.h LINE:74
Warning: Illegal numerical expression 2_0_0 FILE:i2o/shared/i2omsg.h LINE:74
Warning: Illegal numerical expression 2_0_0 FILE:i2o/shared/i2otypes.h LINE:65
Warning: Illegal numerical expression 2_0_0 FILE:i2o/shared/i2otypes.h LINE:65
Warning: Illegal numerical expression 1_5_5 FILE:i2o/shared/i2odep.h LINE:41
Warning: Illegal numerical expression 1_5_5 FILE:i2o/shared/i2odep.h LINE:41
Limitation: can not handle macro ARCH unknown_arch Use +P or -p option FILE:i2o/shared/i2odep.h LINE:48
Limitation: can not handle macro BSP unknown_bsp Use +P or -p option FILE:i2o/shared/i2odep.h LINE:51
Error: Symbol S64 is not defined in current scope FILE:i2o/shared/i2otypes.h LINE:80
Error: class,struct,union or type S64 not defined FILE:i2o/shared/i2otypes.h LINE:124
Report: Unrecognized string ‘PRAGMA_PACK_POP PRAGMA_ALIGN_POP #endif’ ignored FILE:i2o/shared/i2otypes.h LINE:149
Warning: Illegal numerical expression 2_0_0 FILE:i2o/shared/i2osgl.h LINE:73
Warning: Illegal numerical expression 2_0_0 FILE:i2o/shared/i2osgl.h LINE:73

So tha main problem comes from the parsing of i2o/shared/i2otypes.h LINE:80, which reads

/* 64 bit defines */

typedef struct _S64 {
U32 LowPart;
S32 HighPart;
} S64; <---- this is line 80

I really do not see what is wrong with this.

Can anyone help?

Cheers

Tommaso

As indicated by the error message, you should run rootcint with the +P option.
Your struct references data type (typedef
likely defined in a macro).
Using the Preprocessor option will fix this problem.

Rene

Hello Tommaso,

Will you send me i2o header file to gotom@hanno.jp if it is not too big.

Thank you
Masa Goto

[quote=“brun”]As indicated by the error message, you should run rootcint with the +P option.
Your struct references data type (typedef
likely defined in a macro).
Using the Preprocessor option will fix this problem.

Rene[/quote]

Can you provide an example (or a link to an example…)
I guess I tried all the possible ways without much luck.

Thanks a lot

So, i produced the following simple file for cint that produces the error:

typedef unsigned long U32;
typedef unsigned short S32;

typedef struct _S64 {
U32 LowPart;
S32 HighPart;
} S64;

class Ciao
{
public:
int i;
};

compiling it using root 3.10 on macosx yields:
rootcint mydict.cxx -c ttest.h
Error: link requested for unknown class ttest FILE:G__auto10769LinkDef.h LINE:7
Warning: Error occured during reading source files
Warning: Error occured during dictionary source generation
!!!Removing mydict.cxx mydict.h !!!
Error: rootcint: error loading headers…

The file G__auto10769LinkDef.h has inside:
#ifdef CINT

#pragma link off all globals;
#pragma link off all classes;
#pragma link off all functions;

#pragma link C++ class ttest;

#endif

Hi,

You need to write your own linkdef file (see User’s Guide) and $ROOTSYS/test/EventLinkDef.h). And use

The auto linkdef only generate the dictionary for a class with the same name as the header file

Cheers,
Philippe.

Thanks for the hint. The compiler took the file now.
So I understand that if a file defines a
typedef struct X {} X;
there must e a definition file for X or the compiled file must
be called X.h, X.cc, etc…

Thanks again.
Johannes