compilation problem in Fortran 90

Hi all,

I have a project in Fortran 90, and try to use HDF5 as the data format.
The project is built by CMake. When I compile it, an error comes up:
"
...: error #6404: This name does not have a type, and must have an
explicit type. [H5T_NATIVE_FLOAT]
call h5tcopy_f(H5T_NATIVE_FLOAT, datatype_id, error)
---------------------------^

"
The compilation command line is as:

cd /home/dongli/work/build/init_data &&
/opt/intel/Compiler/11.1/056/bin/intel64/ifort -o
CMakeFiles/gen_init_data.dir/gen_init_data.f90.o -g
-I/home/dongli/work/build/util -I/home/dongli/work/build/core
-I/opt/netcdf.ifort/include -I/opt/hdf5.ifort/1.8.4/include -fPIC -c
/home/dongli/work/fpsw/init_data/gen_init_data.f90

Since I have already added the include path of HDF5, the compilation
should not failed. What is the problem?

Thanks for help!

Best regards,

DONG Li

���� �:

Hi all,

I have a project in Fortran 90, and try to use HDF5 as the data
format. The project is built by CMake. When I compile it, an error
comes up:
"
...: error #6404: This name does not have a type, and must have an
explicit type. [H5T_NATIVE_FLOAT]
call h5tcopy_f(H5T_NATIVE_FLOAT, datatype_id, error)
---------------------------^

"
The compilation command line is as:

cd /home/dongli/work/build/init_data &&
/opt/intel/Compiler/11.1/056/bin/intel64/ifort -o
CMakeFiles/gen_init_data.dir/gen_init_data.f90.o -g
-I/home/dongli/work/build/util -I/home/dongli/work/build/core
-I/opt/netcdf.ifort/include -I/opt/hdf5.ifort/1.8.4/include -fPIC -c
/home/dongli/work/fpsw/init_data/gen_init_data.f90

Since I have already added the include path of HDF5, the compilation
should not failed. What is the problem?

Thanks for help!

Best regards,

DONG Li

Hi all,

I have figured it out. Because "H5T_NATIVE_FLOAT" is a predefined
datatype in C interface, the correspondince in Fortran interface is
"H5T_NATIVE_REAL".

Best regards,

DONG Li