Hello,

Fortran modules/libraries are not cross-compiler compatible.
You need to build HDF5 with the compiler that is used in the end.

I usually build the library twice, once with gfortran and once with whatever commercial compiler is on the machine.

Right now, I work with
    - gcc / gfortran
    - icc / ifort
set up separately.
Also, I use modules to switch between libraries ( http:// modules.sourceforge.net/ ). It should be available under RHEL 5.

In your case, try using h5fc for everything or rebuild HDF5 with ifort.

In all situations, h5fc should be used for every code that uses HDF5 and for the main program.

Pierre

Le 5 juil. 11 à 19:42, naomi a écrit :

To make this question clearer:
-  I built the library using GFortran (the default configure
--enable-fortran)
- My code is built using Intel ifort, except for the 2 subroutines that use
the hdf5 libraries, which I compile with h5fc
- I'm trying to link them together and get undefined references, despite
adding the h5fc libraries to my link command.

--
View this message in context: http://hdf-forum.184993.n3.nabble.com/ Fortran-undefined-references-tp3141209p3141723.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


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

Reply via email to