Cargo install cargo-generate error "failed to run custom build command for `curl-sys v0.4.36+curl-7.71.1`"

Hi, i've been trying to install cargo-generate package but the build process failed.
Here's the error :

My system spec:
Windows 10 home (Version 1903)
OS build : 18362.1016
intel i7-8550u

Thank You.

cargo-generate wants to use curl library, and tries to build it from source, but compilation fails for some reason. The error message doesn't make sense, unless gcc is super picky about / vs \.

It works for me using Visual Studio target x86_64-pc-windows-msvc instead of the gnu/gcc one.

Hi, thank you for your reply.
Do i need to change compiler from gcc to x86_64-pc-windows-msvc ?
if so how do i change it?

any clue is ok thnx.

  1. Install Visual Studio, make sure it includes Windows SDK and C++ components
  2. rustup default x86_64-pc-windows-msvc
1 Like

Thank you @kornel, Problem solved.

  1. installed a new Windows SDK with C++ components.
  2. show the installed toolchain rustup show.
  3. then change the toolchain by running rustup default stable-x86_64-pc-windows-msvc.
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.