From 317f4ce8b947325218cf56535ad83e4f5b2f3945 Mon Sep 17 00:00:00 2001 From: robot9001 Date: Sun, 8 Oct 2023 00:34:47 +0200 Subject: [PATCH] fix: Link to `shlwapi` on Windows (again) as workaround Signed-off-by: robot9001 --- build.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/build.rs b/build.rs index 217fbef..de277fd 100644 --- a/build.rs +++ b/build.rs @@ -30,7 +30,12 @@ fn try_vcpkg() -> LibraryResult { vcpkg::Error::DisabledByEnv(_) => LibraryResult::Skipped(err), _ => LibraryResult::Failed(err), }, - Ok(lib) => LibraryResult::Success(lib), + Ok(lib) => { + // workaround, see https://github.com/robo9k/rust-magic-sys/pull/16#issuecomment-949094327 + println!("cargo:rustc-link-lib=shlwapi"); + + LibraryResult::Success(lib) + }, } }