What build tool for WIndows is required

At my new Windows 10 machine, I installed Microsoft Build Tools 2015 and Build Tools for Visual Studio 2017 but still can not run the rust app, and telling me the build tool is required!

Run cargo from the dev shell for the build tools and I believe it should work.

Run your ide from that shell to get the correct environment. It’s a bit of a pain but :woman_shrugging: once you get into the rhythm of it all it stops being very annoying.

1 Like

I got the below error, is it related or something else?

D:\Rust\my_app>cargo +nightly build
   Compiling rayon-core v1.4.1
   Compiling winapi v0.3.6
   Compiling serde v1.0.79
   Compiling httparse v1.3.2
error: linking with `link.exe` failed: exit code: 1181
  = note: "C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\BuildTools\\VC\\Tools\\MSVC\\14.15.26726\\bin\\HostX86\\x86\\link.exe" "/NOLOGO" "/NXCOMPAT" "/LIBPATH:C:\\Users\\Hasan Yousef\\.rustup\\toolchains\\nightly-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib" "D:\\Rust\\my_app\\target\\debug\\build\\rayon-core-c6168e60ebb51686\\build_script_build-c6168e60ebb51686.build_script_build.8k5nekpg-cgu.0.rcgu.o" "D:\\Rust\\my_app\\target\\debug\\build\\rayon-core-c6168e60ebb51686\\build_script_build-c6168e60ebb51686.build_script_build.8k5nekpg-cgu.1.rcgu.o" "D:\\Rust\\my_app\\target\\debug\\build\\rayon-core-c6168e60ebb51686\\build_script_build-c6168e60ebb51686.build_script_build.8k5nekpg-cgu.2.rcgu.o" "D:\\Rust\\my_app\\target\\debug\\build\\rayon-core-c6168e60ebb51686\\build_script_build-c6168e60ebb51686.build_script_build.8k5nekpg-cgu.3.rcgu.o" "D:\\Rust\ 


I just set up a new computer with VS2017, and it worked for me.

Just to double check, do you have all of these checkboxes checked?


1 Like

Me too, I use VS 2015.

Actually I installed initially Visual C++ ALT ... and Visual C++ MFC ... as well as MS Build 2015.

Now I installed Windows 10 SDK and Visual C++ tools and it is working correctly.


The ATL is useful if you want to work on rustc itself; I believe you need it as well. Glad you got it going!

1 Like

EDIT: I see you got it sorted. Ignore the question. :smiley:

Looks like you’re using the 32-bit linker. Is your rust setup for 64-bit?