Does rootcint support attribute_ ((align(x)))?


When I tried to creat a dictionary with rootcint on a header.h file that contains, e.g.

struct XY{
int X;
int Y;
} attribute ((aligned(8)));

rootcint complains a missing “;” on the line that contains line: “} attribute((aligned(8)));”.

Error: ’ ; ’ missing after class/struct/enum declaration in header.h

The “;” is there for sure.

The header file is for a pre-compiled C dynamic library (*.so), and I was trying to create a dictionary from the header file following instruction given in (/viewtopic.php?t=3488), so I can load the library and use it in the ROOt environment.

My questions:

  1. Does rootcint support “((attribute align(x)))” statement? if so, any suggestion what I did wrong; any extra compile flags that I need to supply to rootcint ?

  2. Is there a simpler example that some one can point me to on how to create a dictionary for an external lib? so that I can load and use it in the ROOT environment?




it doesn’t. You can either create a header which #defined _attribute__X) as nothing, so CINT understands but ignores it. Or you pass -p after -c to invoke an external preprocessor, so rootcint doesn’t see attribute to begin with.

Cheers, Axel.