From 7aad547c989029d36902383a4927d30c44a7a73e Mon Sep 17 00:00:00 2001 From: Magnus Ulimoen Date: Sun, 5 Nov 2023 12:58:50 +0100 Subject: [PATCH] Try including shlwapi on windows --- hdf5-sys/build.rs | 4 ++++ 1 file changed, 4 insertions(+) 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"); + } }