Allen and all,

I resolved the problem. The fix was to add the full path of the
hdf_fortran.lib into the "Project Properties > Linker > Input > Additional
dependencies" field such as:

""C:\Program Files\HDF5\lib\hdf5_fortran.lib"

including the quotation marks because there are whitespaces in the path. I
used to only write hdf5_fortran.lib in this field and Linker was not able
to find the library. Another option is to add the HDF's lib folder into the
"Project Properties > Linker > General > Additional Library Directories"
and then only specify the hdf5_fortran.lib in the "Project Properties >
Linker > Input > Additional dependencies" field.

Thank you for your help.

Regards,

Ekin


On Tue, Aug 6, 2013 at 7:07 PM, Allen Byrne <[email protected]> wrote:

> **
>
> Ekin,
>
>
>
> Well, I guess we need to explore other ideas. How about the cmake
> configuration logs from the examples project - I am guessing that all the
> fortran tests passed? How about the cmake cache in the build folder, are
> all the settings correct?
>
>
>
> Allen
>
>
>
> On Tuesday, August 06, 2013 04:14:52 PM Ekin Akoglu wrote:
>
> Dear Allen,
>
> Thank you for your suggestions. You are right, I couldn't link the F03
> examples, either. However, my HDF5 is configured with HDF5_ENABLE_F2003 ON
> according to the hdf5-config created by CMake. Further, the Visual Studio
> Settings-Designer File (libhdf5) also has the "Fortran 2003 Compiler: ON"
> line. I couldn't figure out what is missing.
>
> Regards,
>
>
> Ekin
>
> On Mon, Aug 5, 2013 at 6:33 PM, Allen Byrne <[email protected]> wrote:
>
> Ekin,
>
>
>
> I think that is correct, at least I see the same files. You might try
> getting the HDF hdf5-examples project source and use CMake to build the 1.8
> examples with Fortran 2003 enabled. If that works, then you can compare the
> VS projects with yours.
>
>
>
> Allen
>
>
>
>
>
>
>
> On Monday, August 05, 2013 04:49:28 PM Ekin Akoglu wrote:
>
> Dear Allen,
>
> Thank you for your response. I compiled HDF5 from source using CMake under
> windows and enabled FORTRAN and FORTRAN2003 options. Do you think I managed
> to enable those options or these errors mean I could not? My installation
> directory of HDF5 under "Program Files" includes "libhdf5_fortran" under
> "lib". Further, the "include" folder in the installation directory of HDF5
> includes all sorts of "h5*_provisional" include files that the linker
> complained about.
>
> Regards,
>
>
> Ekin
>
> On Mon, Aug 5, 2013 at 4:22 PM, Allen Byrne <[email protected]> wrote:
>
> Yes, FORTRAN 2003 is supported in Visual Studio, however our published
> binaries did not enable that option. You will need to build the libraries
> with the option enabled.
>
>
>
> Allen
>
>
> On Sunday, August 04, 2013 04:42:51 PM Ekin Akoglu wrote:
>
> Dear all,
>
> As I understood from the documentation of HDF5 1.8.11, FORTRAN 2003 is now
> supported on Windows with Visual Studio. If I am right, now I should be
> able to compile and link my project without errors. However, the build
> process gives errors on linking step as below:
>
> Linking...
> h5write.obj : error LNK2019: unresolved external symbol _H5LIB_mp_H5OPEN_F
> referenced in function _H5WRITE
> h5write.obj : error LNK2019: unresolved external symbol
> _H5P_mp_H5PCREATE_F referenced in function _H5WRITE
> h5write.obj : error LNK2019: unresolved external symbol
> _H5P_mp_H5PSET_PRESERVE_F referenced in function _H5WRITE
> h5write.obj : error LNK2019: unresolved external symbol
> _H5F_mp_H5FCREATE_F referenced in function _H5WRITE
> h5write.obj : error LNK2019: unresolved external symbol
> _H5S_mp_H5SCREATE_SIMPLE_F referenced in function _H5WRITE
> h5write.obj : error LNK2019: unresolved external symbol
> _H5LIB_PROVISIONAL_mp_H5OFFSETOF referenced in function _H5WRITE
> h5write.obj : error LNK2019: unresolved external symbol
> _H5T_mp_H5TCREATE_F referenced in function _H5WRITE
> h5write.obj : error LNK2019: unresolved external symbol
> _H5T_mp_H5TINSERT_F referenced in function _H5WRITE
> h5write.obj : error LNK2019: unresolved external symbol
> _H5D_mp_H5DCREATE_F referenced in function _H5WRITE
> h5write.obj : error LNK2019: unresolved external symbol
> _H5D_PROVISIONAL_mp_H5DWRITE_PTR referenced in function _H5WRITE
> h5write.obj : error LNK2019: unresolved external symbol _H5D_mp_H5DCLOSE_F
> referenced in function _H5WRITE
> h5write.obj : error LNK2019: unresolved external symbol _H5T_mp_H5TCLOSE_F
> referenced in function _H5WRITE
> h5write.obj : error LNK2019: unresolved external symbol _H5S_mp_H5SCLOSE_F
> referenced in function _H5WRITE
> h5write.obj : error LNK2019: unresolved external symbol
> _H5T_mp_H5TARRAY_CREATE_F referenced in function _H5WRITE
> h5write.obj : error LNK2019: unresolved external symbol _H5T_mp_H5TCOPY_F
> referenced in function _H5WRITE
> h5write.obj : error LNK2019: unresolved external symbol _H5P_mp_H5PCLOSE_F
> referenced in function _H5WRITE
> h5write.obj : error LNK2019: unresolved external symbol _H5F_mp_H5FCLOSE_F
> referenced in function _H5WRITE
> Release\Console1.exe : fatal error LNK1120: 17 unresolved externals
>
> Could you please confirm if I am right? The link command I used is as
> follows:
>
> /OUT:"Release\Console1.exe" /INCREMENTAL:NO /NOLOGO /LIBPATH:"C:\Program
> Files\HDF5\include\fortran" /LIBPATH:"C:\Program Files\HDF5\lib" /MANIFEST
> /MANIFESTFILE:"c:\documents and settings\administrator\my documents\visual
> studio
> 2010\Projects\Console1\Console1\Release\Console1.exe.intermediate.manifest"
> /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /SUBSYSTEM:CONSOLE
> /IMPLIB:"c:\documents and settings\administrator\my documents\visual studio
> 2010\Projects\Console1\Console1\Release\Console1.lib"
>
> Thank you in advance,
>
>
> Ekin
>
> On Mon, Nov 19, 2012 at 5:17 PM, Ekin Akoglu <[email protected]> wrote:
>
> Thank you for the information, Scot.
>
>
> Ekin
>
> On Mon, Nov 19, 2012 at 4:28 PM, <[email protected]> wrote:
>
> The Fortran2003 option is not supported on windows with Visual Studio, you
> can look at RELEASE.txt for the platforms supporting F2003. It is, however,
> on our to-do list.
>
> Scot
>
>
> On 2012-11-16 09:24, Ekin Akoglu wrote:
>
> P.S. Sorry for cross-posting but I forgot to edit the subject field
> in my previous e-mail. Please excuse me.
>
> Dear all,
>
> I am trying to compile and link a fortran program under Visual Studio 2010
> with Intel Fortran Compiler 13. The  program compiles without errors,
> whereas, during linking process it gives two unresolved symbol errors:
>
> Error 1 error LNK2019: unresolved external symbol
> _H5LIB_PROVISIONAL_mp_H5OFFSETOF referenced in function _H5WRITE h5write.obj
> Error 2 error LNK2019: unresolved external symbol
> _H5D_PROVISIONAL_mp_H5DWRITE_PTR referenced in function _H5WRITE h5write.obj
>
> My Linker command line configuration is as follows:
>
> /OUT:"ReleaseEc FORT.exe" /INCREMENTAL:NO /NOLOGO /LIBPATH:"C:Program
> Files (x86)HDF_GroupHDF51.8.10lib" /MANIFEST
> /MANIFESTFILE:"C:UserseaDocumentsVisual Studio 2010ProjectsEc FORTEc
> FORTReleaseEc FORT.exe.intermediate.manifest"
> /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /SUBSYSTEM:CONSOLE
> /IMPLIB:"C:UserseaDocumentsVisual Studio 2010ProjectsEc FORTEc
> FORTReleaseEc FORT.lib" hdf5_fortrandll.lib hdf5dll.lib hdf5_f90cstubdll.lib
>
> And my Fortran compiler command line options are:
>
> /nologo /O2 /fpp /I"C:Program Files
> (x86)HDF_GroupHDF51.8.10includefortran" /DHDF5F90_WINDOWS /D_HDF5USEHLDLL_
> /module:"Release\" /object:"Release\" /Fd"Releasevc100.pdb" /libs:static
> /threads /c
>
> I already set the preprocessor definitions
> "HDF5F90_WINDOWS;_HDF5USEHLDLL_". THe HDF5 version I use is 1.8.10, which
> was compiled from source with Visual Studio 2010 and Intel Fortran Compiler
> 13. I used Cmake and enabled Fortran2003. I tried many different options to
> no avail. Could you make any suggestions, please?
>
> Best,
>
> Ekin
>
>
> --
> Ekin Akoglu
>
> Institute of Marine Sciences
> Middle East Technical University
> P.O. Box 28, 33731
> Erdemli, Mersin
> Turkey
>
> Web: www.ims.metu.edu.tr [1]
>  Email: [email protected]
> Phone: +90 324 521 34 34
> GSM: +90 506 554 03 90
>
>
> Links:
> ------
> [1] http://www.ims.metu.edu.tr
>
> _______________________________________________
> 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
>
>
>
>
> --
> Ekin Akoglu
>
> Institute of Marine Sciences
> Middle East Technical University
> P.O. Box 28, 33731
> Erdemli, Mersin
> Turkey
>
> Web: www.ims.metu.edu.tr
> Email: [email protected]
> Phone: +90 324 521 34 34
> GSM: +90 506 554 03 90
>
>
>
>
>
>
>
>
>
>
>
>
>
_______________________________________________
Hdf-forum is for HDF software users discussion.
[email protected]
http://mail.lists.hdfgroup.org/mailman/listinfo/hdf-forum_lists.hdfgroup.org

Reply via email to