Applications that were created with earlier HDF5 releases may not compile with 1.14 by default. The API Compatibility Macros in HDF5 allow users to work around this issue. Users can specify a compatibility macro mapping for the version of HDF5 that an application was built with. For example, a 1.10 (or 1.12) application can be built with 1.14 using either an application or library mapping as follows: - To compile an application built with a version of HDF5 that includes deprecated symbols (the default), make sure to pass
-DH5_USE_110_API (or -DH5_USE_112_API) to the compiler. For example (C), you can specify h5cc -DH5_USE_110_API (or -DH5_USE_112_API ) when using autotools) and cmake -DCMAKE_C_FLAGS="-DH5_USE_110_API" (or -DCMAKE_C_FLAGS="-DH5_USE_110_API") when using CMake.
- To build an HDF5 library with the 1.10 (or 1.12.) APIs you must set
DEFAULT_API_VERSION to v110 (or v112) when configuring. For example, with autotools specify --with-default-api-version=v110 (or --with-default-api-version=v112) and with CMake set -DDEFAULT_API_VERSION:STRING=v110 (or -DDEFAULT_API_VERSION:STRING=v112) in the HDF5options.cmake file when using the CMake source release (CMake-hdf5-1.14.0 ).
However, users will not be able to take advantage of some of the new features in 1.14 if using these compatibility mappings. |