Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Announcements
Welcome to the Intel Community. If you get an answer you like, please mark it as an Accepted Solution to help others. Thank you!
26758 Discussions

Multiple Additional Dependencies error

Maia__Nycholas
Beginner
202 Views

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

MY PROBLEM:
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
Steve_Lionel
Black Belt Retired Employee
202 Views

Use a comma as a separator, not semicolon.

Reply