Skip to content

Commit

Permalink
I always get
Browse files Browse the repository at this point in the history
`STATUS_DLL_NOT_FOUND`
error on Windows.
It is something to do with paths.
this rust-lang/cargo#6773
motivated the following change
(I know...)
  • Loading branch information
CGMossa committed Apr 10, 2023
1 parent f847c50 commit 838f196
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -643,7 +643,10 @@ fn main() {
println!("cargo:r_home={}", r_paths.r_home.display()); // Becomes DEP_R_R_HOME for clients

// make sure cargo links properly against library
println!("cargo:rustc-link-search={}", r_paths.library.display());
println!(
"cargo:rustc-link-search={}",
r_paths.library.canonicalize().unwrap().display()
);
println!("cargo:rustc-link-lib=dylib=R");

println!("cargo:rerun-if-changed=build.rs");
Expand Down

0 comments on commit 838f196

Please sign in to comment.