Unable to compile Rust hello world on Windows: linker link.exe not found

后端 未结 5 2195
隐瞒了意图╮
隐瞒了意图╮ 2020-12-13 08:31

I have installed Rust on windows from Rust installation page. After installation I tried running the \"hello world\" program but got the following error.



        
5条回答
  •  一个人的身影
    2020-12-13 09:12

    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:

    > cargo run
    Compiling helloworld v0.1.0 (C:\Users\DELL\helloworld)
    Finished dev [unoptimized + debuginfo] target(s) in 12.05s
      Running `target\debug\helloworld.exe`
    Hello, world!
    

提交回复
热议问题