Hey,
I am currently trying to compile a shared library for reading a hdf5 file into root. I’m running Ubuntu precise 64 bit and root 5.32.
The c++ file itself does not yet contain any hdf5 functions, just the #include “hdf5.h” line. I have set up everything (linkdef.h) to compile the class. When I remove the #include “hdf5.h” line, the compiling works:
gcc `root-config --cflags` -m64 -c -O2 -fPIC -I./ -Wall -o HDF_file.o HDF_file.cpp
rootcint -f R__HDF_file.cpp -c HDF_file.h linkdef.h
gcc `root-config --cflags` -m64 -c -O2 -fPIC -I./ -Wall -o R__HDF_file.o R__HDF_file.cpp
gcc -O2 -Wall -shared `root-config --glibs` HDF_file.o R__HDF_file.o -o HDF_file.so
rm R__HDF_file.cpp R__HDF_file.o
When I have the #include “hdf5.h” in, it gives:
gcc `root-config --cflags` -m64 -c -O2 -fPIC -I./ -Wall -o HDF_file.o HDF_file.cpp
rootcint -f R__HDF_file.cpp -c HDF_file.h linkdef.h
Syntax Error: __BEGIN_DECLS #if __WORDSIZE==64 typedef struct /usr/include/inttypes.h:280:
Error: Symbol __BEGIN_DECLS#if __WORDSIZE is not defined in current scope /usr/include/inttypes.h:280:
Warning: Illegal numerical expression 64 typedef struct /usr/include/inttypes.h:280:
Warning: Illegal numerical expression 64 typedef struct /usr/include/inttypes.h:280:
Warning: Illegal numerical expression 64 typedef struct /usr/include/inttypes.h:280:
Warning: Illegal numerical expression 64 typedef struct /usr/include/inttypes.h:280:
Warning: Illegal numerical expression 64 typedef struct /usr/include/inttypes.h:280:
Warning: Illegal numerical expression 64 typedef struct /usr/include/inttypes.h:280:
Warning: Illegal numerical expression 64 typedef struct /usr/include/inttypes.h:280:
Warning: Illegal numerical expression 64 typedef struct /usr/include/inttypes.h:280:
Warning: Illegal numerical expression 64 typedef struct /usr/include/inttypes.h:280:
Warning: Illegal numerical expression 64 typedef struct /usr/include/inttypes.h:280:
Warning: Illegal numerical expression 64 typedef struct /usr/include/inttypes.h:280:
Error: unsigned can not be specified for float or double 64 typedef struct /usr/include/inttypes.h:280:
make: *** [R__HDF_file.cpp] Killed
make: *** Deleting file `R__HDF_file.cpp'
Does anyone know what I could do here?
Thank you very much in advance!