Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

HDF5 as dynamic linked library Qt/C++ under Windows

Tags:

c++

hdf5

cmake

qt

I downloaded

Windows (64-bit) 1 Compilers: CMake VS 2013 C, C++, IVF 15 from here

Now I read on their homepage that

  1. this contains only release libraries and
  2. that there are libararies contained with a lib prefix, and they are static libraries
  3. that there are libreries without a lib prefix and they are dynamic libaries

For example hdf5.lib and libhdf5.lib

I would like to link dynamically. On their homepage they say that

To use the shared libraries on Windows specify the H5_BUILT_AS_DYNAMIC_LIB compile definition.

What does this mean??? What do they want me to do in order to use the libraries without prefix for dynamic linbking?

like image 629
newandlost Avatar asked Sep 03 '25 02:09

newandlost


1 Answers

For anyone who comes across this question and is using Visual Studio, another solution is to open the project properties and go to Configuration PropertiesC/C++Preprocessor and add H5_BUILT_AS_DYNAMIC_LIB to the list of Preprocessor Definitions.

like image 130
gnovice Avatar answered Sep 04 '25 15:09

gnovice