Build Issue with ring v0.17.8 on Windows: gcc.exe not found

Hello,
I am trying to compile my Rust project which uses crate ring v0.17.8, but I keep encountering an error stating gcc.exe is not found, even after installing GCC and checking the PATH. Here's the complete error message:
The following warnings were emitted during compilation:

error: failed to run custom build command for ring v0.17.8 warning: ring@0.17.8: Compiler family detection failed due to error: ToolNotFound: Failed to find tool. Is gcc.exe` installed?

I have installed GCC through MinGW and verified that I can access gcc.exe from the command line (when I type gcc --version, I get the expected output). I also checked and confirmed that my system's PATH includes the path to the directory containing gcc.exe.
Despite this, I still encounter the same issue when building the project. I've tried cleaning the project and building again, but that did not solve the issue.
Suggestions on how I can resolve this would be greatly appreciated. Thanks!

1 Like

Have you switched rustup to use the -gnu windows target?
The default recommended target is based on MSVC, and I think it won't be compatible with GCC.

I have checked the default toolchain using rustup show and it is stable-x86_64-pc-windows-gnu.

1 Like

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.