diff --git a/hdf5-sys/build.rs b/hdf5-sys/build.rs index 7e2ab4cd..501b2ac2 100644 --- a/hdf5-sys/build.rs +++ b/hdf5-sys/build.rs @@ -746,4 +746,8 @@ fn get_build_and_emit() { let header = Header::parse(&hdf5_incdir); let config = Config { header, inc_dir: "".into(), link_paths: Vec::new() }; config.emit_cfg_flags(); + + if cfg!(windows) && config.header.version >= Version::new(1, 14, 0) { + println!("cargo:rustc-link-lib=shlwapi"); + } }