Adjust rustc-link-lib directive
parent
37e72976d6
commit
80b31f723e
5
build.rs
5
build.rs
|
@ -28,14 +28,13 @@ mod windows {
|
||||||
);
|
);
|
||||||
|
|
||||||
generate_lib_from_dll(&out_dir, &vs_exe_path, &vlc_path);
|
generate_lib_from_dll(&out_dir, &vs_exe_path, &vlc_path);
|
||||||
println!("cargo:rustc-link-search=all={}", out_dir.display());
|
println!("cargo:rustc-link-search=native={}", out_dir.display());
|
||||||
// NOTE: Linking fails with
|
// NOTE: Without this directive, linking fails with:
|
||||||
// ```
|
// ```
|
||||||
// error LNK2019: unresolved external symbol vsnprintf referenced in function _{MangledSymbolName}
|
// 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
|
||||||
// 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
|
// https://stackoverflow.com/a/34230122
|
||||||
println!("cargo:rustc-link-lib=dylib=legacy_stdio_definitions");
|
println!("cargo:rustc-link-lib=dylib=legacy_stdio_definitions");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue