Hi Thomas,

Please try to add 

use H5TB

statement to your program.

Elena
On Jul 1, 2010, at 9:47 AM, Thomas Robitaille wrote:

> Hello,
> 
> I am having problems compiling fortran 90 code with calls to high-level table 
> routines. For example, I get the following error:
> 
> $ h5fc test.f90
> Undefined symbols:
>   "_h5tbread_field_name_f_", referenced from:
>       _MAIN__ in test.o
> ld: symbol(s) not found
> 
> if I try compiling the following test code:
> 
> program test
> 
>   use hdf5
>   implicit none
> 
>   integer(hid_t) :: file, dset ! file or group identifier 
>   character(len=100) :: dset_name = 'test' ! name of the dataset 
>   character(len=100) :: field_name = 'test_field' ! name of the field
>   integer(hsize_t) :: start = 1! start record 
>   integer(hsize_t) :: nrecords = 100 ! records
>   integer(size_t)  :: type_size = 4 ! type size
>   real, dimension(100) :: buf ! data buffer 
>   integer :: hdferr
> 
>   CALL h5open_f(hdferr)
>   
>   call h5fopen_f('test.hdf5', h5f_acc_rdonly_f, file, hdferr)
>   call h5dopen_f (file, dset_name, dset, hdferr)
> 
>   call h5tbread_field_name_f(dset, dset_name, field_name, start, &
>        & nrecords, type_size, buf, hdferr)    
> 
> end program test
> 
> In case this helps, HDF5 was configured with:
> 
> ./configure --enable-fortran FC=ifort --prefix=/usr/local/hdf5 --enable-hl 
> --enable-cxx
> 
> and the h5fc commands are:
> 
> $ h5fc -show test.f90
> ifort -fPIC -I/usr/local/hdf5/include -c test.f90
> ifort -fPIC -I/usr/local/hdf5/include test.o -L/usr/local/hdf5/lib 
> /usr/local/hdf5/lib/libhdf5hl_fortran.a /usr/local/hdf5/lib/libhdf5_hl.a 
> /usr/local/hdf5/lib/libhdf5_fortran.a /usr/local/hdf5/lib/libhdf5.a -lz -lm
> 
> Does anyone know what I am doing wrong?
> 
> Thanks for any advice,
> 
> Thomas
> 
> _______________________________________________
> Hdf-forum is for HDF software users discussion.
> [email protected]
> http://mail.hdfgroup.org/mailman/listinfo/hdf-forum_hdfgroup.org

_______________________________________________
Hdf-forum is for HDF software users discussion.
[email protected]
http://mail.hdfgroup.org/mailman/listinfo/hdf-forum_hdfgroup.org

Reply via email to