-
Notifications
You must be signed in to change notification settings - Fork 459
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
include doesn't support UNC paths on Windows #169
Comments
Is this a bug with gcc-rs? Or is this a bug with cl.exe not accepting these paths? Do you have an error message? |
cl.exe doesn't support UNC paths ( So strictly speaking that's a bug in |
I've released a crate that normalizes paths in a compatible way: https://gitlab.com/kornelski/dunce It would be nice if that was built into the |
I'm going to close this since it sounds like it was a bug in |
- Use more robust canonicalize() on windows rust-lang/cc-rs#169 Basically, fs::canonicalize adds a prefix to the path which makes it a UNC path, and CMD doesnt work with these paths. This dunce::canonicalize returns a non-UNC path.
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.The text was updated successfully, but these errors were encountered: