Closed
Description
let cc = gcc::Config::new();
cc.include(std::fs::canonicalize("."));
Doesn't add absolute path of "." as the include dir (tested on Win10, MSVC). This is because Rust's canonicalize()
makes a UNC path such as \\?\C:\Foo
.
Stripping the \\?\
prefix seems to solve the problem, but I don't know enough about UNC paths to know whether that's a good solution.
I use fs::canonicalize()
as the easiest way to get absolute paths in build scripts of link/-sys
dependencies to reliably pass the paths in env vars for other packages to consume, and it works well on Unix.
Metadata
Metadata
Assignees
Labels
No labels