Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
28434 Discussions

Multiple Additional Dependencies error


I downloaded and installed the HDF5 libraries for Windows 10 x64.

The install process creates a folder here:

C:\Program Files\HDF_Group\HDF5\1.10.5\

Inside this folder I have these 2 folders:

  • include
  • lib

I'm using Visual Studio 2019 and Intel Visual Fortran 2019, so in my project configurations I added this includes path to the "Additional Include Directories"

C:\Program Files\HDF_Group\HDF5\1.10.5\include

and added this lib folder path to the "Additional Library Directories":

C:\Program Files\HDF_Group\HDF5\1.10.5\lib

I did it in VS for "All configurations" and "All Platforms"

Link Library Dependencies: YES

Finally I have to set which library files I will link.
In this project, I have to add 2 files:

  1. libhdf5_fortran.lib
  2. libhdf5_hl_fortran.lib

So, in Linker -> Input -> Additional Dependencies, I wrote:

libhdf5_fortran.lib; libhdf5_hl_fortran.lib

If I add just the first one (libhdf5_fortran.lib) and compile this project I got some linker erros because the second file is missing.

BUT, If I add these 2 files together, I got just one linker error:

LNK1181: cannot open input file 'libhdf5_fortran.lib;'

To me this is wierd because this first file was already accepted by the linker in the first attemp.
Why the linker is given this error only when I add the second *.lib file?

In the error message, is it adding a ";" to the library filename?

Thank you

0 Kudos
1 Reply
Honored Contributor III

Use a comma as a separator, not semicolon.

0 Kudos