From 80b31f723e76aa6d0869938de3527e5588a0326a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Markus=20R=C3=B8yset?= <maroider@protonmail.com>
Date: Tue, 13 Apr 2021 21:18:30 +0200
Subject: [PATCH] Adjust rustc-link-lib directive

---
 build.rs | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/build.rs b/build.rs
index 2a28e00..02c7834 100644
--- a/build.rs
+++ b/build.rs
@@ -28,14 +28,13 @@ mod windows {
         );
 
         generate_lib_from_dll(&out_dir, &vs_exe_path, &vlc_path);
-        println!("cargo:rustc-link-search=all={}", out_dir.display());
-        // NOTE: Linking fails with
+        println!("cargo:rustc-link-search=native={}", out_dir.display());
+        // NOTE: Without this directive, linking fails with:
         //       ```
         //       error LNK2019: unresolved external symbol vsnprintf referenced in function _{MangledSymbolName}
         //          msvcrt.lib(vsnprintf.obj) : error LNK2001: unresolved external symbol vsnprintf
         //          msvcrt.lib(vsnprintf.obj) : error LNK2001: unresolved external symbol _vsnprintf
         //       ```
-        //       without this.
         //       https://stackoverflow.com/a/34230122
         println!("cargo:rustc-link-lib=dylib=legacy_stdio_definitions");
     }