Hi,
I recently installed HDF5 1.8.5. I'm on Ubuntu with the latest GCC and I
want to work on some hdf files with the FORTRAN interface. I built HDF with
configure --prefix=dir -enable fortran -enable gcc and successfully
installed it. So I'm trying to compile the .f90 files in the example folder
but I get an undefined_reference error for every function I'm trying to
use.For example for the file "fileexample.f90"

/tmp/cci2V8j2.o: In function `MAIN__':
fileexample.f90:(.text+0x21): undefined reference to `__h5lib_MOD_h5open_f'
fileexample.f90:(.text+0x5b): undefined reference to `__h5f_MOD_h5fcreate_f'
fileexample.f90:(.text+0x6d): undefined reference to `__h5f_MOD_h5fclose_f'
fileexample.f90:(.text+0x78): undefined reference to `__h5lib_MOD_h5close_f'
collect2: ld returned 1 exit status

I'm not an experienced Linux user so I might be doing something wrong.I
checked some previous posts but didn't help.
Can you please tell me how I should compile the .f90 cause I think I'm
getting it wrong. I have been using NetCDF for some time and it has static
libraries in my usr/local/lib folder while HDF hasn't.All the HDF static
libraries are in my installation folder/lib while all the .mod and .h files
in installation folder/include. Should I install the libraries with install
.a /usr/local/lib or should I link the folder when I compile?

Thank you,
Euri.
-- 
View this message in context: 
http://hdf-forum.184993.n3.nabble.com/HDF5-and-undefined-reference-tp2475757p2475757.html
Sent from the hdf-forum mailing list archive at Nabble.com.

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

Reply via email to