{"id":1159,"hash":"765a71d8ba94fb06d9fd233bc375c3538811e83bd8c2e1db461982be9b682480","pattern":"Unable to compile Rust hello world on Windows: linker link.exe not found","full_message":"I have installed Rust on windows from Rust installation page. After installation I tried running the \"hello world\" program but got the following error.\n\n>cargo run\n\nError\n\nCompiling helloworld v0.1.0 (C:\\Users\\DELL\\helloworld)\n\nerror: linker `link.exe` not found\nnote: The system cannot find the file specified. (os error 2)\nnote: the msvc targets depend on the msvc linker but `link.exe` was not found\nnote: please ensure that VS 2013, VS 2015 or VS 2017 was installed with the Visual C++ option\nerror: aborting due to previous error\nerror: Could not compile `helloworld`.\n\nTo learn more, run the command again with --verbose.\n\nCode:\n\nfn main() {\n    println!(\"Hello, world!\");\n}","ecosystem":"cargo","package_name":"compiler-errors","package_version":null,"solution":"I downloaded and installed the Build Tools for Visual Studio 2019. During installation I selected the C++ tools. It downloaded almost 5GB of data. I restarted the machine after installation and compiling the code worked fine:\n\n> cargo run\nCompiling helloworld v0.1.0 (C:\\Users\\DELL\\helloworld)\nFinished dev [unoptimized + debuginfo] target(s) in 12.05s\n  Running `target\\debug\\helloworld.exe`\nHello, world!","confidence":0.95,"source":"stackoverflow","source_url":"https://stackoverflow.com/questions/55603111/unable-to-compile-rust-hello-world-on-windows-linker-link-exe-not-found","votes":222,"created_at":"2026-04-19T04:52:27.231298+00:00","updated_at":"2026-04-19T04:52:27.231298+00:00"}