11

Error is shown at "cargo run" upon the first example of Getting started

C:\Users\HiWin10\hello-rust>cargo run --verbose
   Compiling hello-rust v0.1.0 (C:\Users\HiWin10\hello-rust)
     Running `rustc --edition=2018 --crate-name hello_rust src\main.rs --color always --crate-type bin --emit=dep-info,link -C debuginfo=2 -C metadata=888d1f7b91fb6e4a -C extra-filename=-888d1f7b91fb6e4a --out-dir C:\Users\HiWin10\hello-rust\target\debug\deps -C incremental=C:\Users\HiWin10\hello-rust\target\debug\incremental -L dependency=C:\Users\HiWin10\hello-rust\target\debug\deps`
error: linking with `link.exe` failed: exit code: 1181
  |
  = note: "C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Enterprise\\VC\\Tools\\MSVC\\14.12.25827\\bin\\HostX64\\x64\\link.exe" "/NOLOGO" "/NXCOMPAT" "/LIBPATH:C:\\Users\\HiWin10\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib" "C:\\Users\\HiWin10\\hello-rust\\target\\debug\\deps\\hello_rust-888d1f7b91fb6e4a.1twe2j0sf4nhwv0v.rcgu.o" "C:\\Users\\HiWin10\\hello-rust\\target\\debug\\deps\\hello_rust-888d1f7b91fb6e4a.1vsfetqgdl2mm9ku.rcgu.o" "C:\\Users\\HiWin10\\hello-rust\\target\\debug\\deps\\hello_rust-888d1f7b91fb6e4a.2b2k1el9ge2t96a7.rcgu.o" "C:\\Users\\HiWin10\\hello-rust\\target\\debug\\deps\\hello_rust-888d1f7b91fb6e4a.2wy84pmiszi6o3fj.rcgu.o" "C:\\Users\\HiWin10\\hello-rust\\target\\debug\\deps\\hello_rust-888d1f7b91fb6e4a.51bmf9dki30948b3.rcgu.o" "C:\\Users\\HiWin10\\hello-rust\\target\\debug\\deps\\hello_rust-888d1f7b91fb6e4a.q67qbh00yussp5o.rcgu.o" "/OUT:C:\\Users\\HiWin10\\hello-rust\\target\\debug\\deps\\hello_rust-888d1f7b91fb6e4a.exe" "C:\\Users\\HiWin10\\hello-rust\\target\\debug\\deps\\hello_rust-888d1f7b91fb6e4a.11f4ns4fn9v6i7z4.rcgu.o" "/OPT:REF,NOICF" "/DEBUG" "/NATVIS:C:\\Users\\HiWin10\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\etc\\intrinsic.natvis" "/NATVIS:C:\\Users\\HiWin10\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\etc\\liballoc.natvis" "/NATVIS:C:\\Users\\HiWin10\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\etc\\libcore.natvis" "/LIBPATH:C:\\Users\\HiWin10\\hello-rust\\target\\debug\\deps" "/LIBPATH:C:\\Users\\HiWin10\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib" "C:\\Users\\HiWin10\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\libstd-c418a1c7c96bdbae.rlib" "C:\\Users\\HiWin10\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\libpanic_unwind-740e55ec30ec9b42.rlib" "C:\\Users\\HiWin10\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\librustc_demangle-4e3d4b2c73be2130.rlib" "C:\\Users\\HiWin10\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\libhashbrown-e03c95365300773b.rlib" "C:\\Users\\HiWin10\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\librustc_std_workspace_alloc-9b63ec27f8df7123.rlib" "C:\\Users\\HiWin10\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\libunwind-cc811f306714ba24.rlib" "C:\\Users\\HiWin10\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\liblibc-dee84a63f4b90027.rlib" "C:\\Users\\HiWin10\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\liballoc-7d070a58cfb70fe0.rlib" "C:\\Users\\HiWin10\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\librustc_std_workspace_core-10ec18f1dfe36e70.rlib" "C:\\Users\\HiWin10\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\libcore-e0e69d50f48d4667.rlib" "C:\\Users\\HiWin10\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\libcompiler_builtins-45eb0e961cc324b2.rlib" "advapi32.lib" "ws2_32.lib" "userenv.lib" "msvcrt.lib"
  = note: LINK : fatal error LNK1181:


error: aborting due to previous error

error: Could not compile `hello-rust`.

Caused by:
  process didn't exit successfully: `rustc --edition=2018 --crate-name hello_rust src\main.rs --color always --crate-type bin --emit=dep-info,link -C debuginfo=2 -C metadata=888d1f7b91fb6e4a -C extra-filename=-888d1f7b91fb6e4a --out-dir C:\Users\HiWin10\hello-rust\target\debug\deps -C incremental=C:\Users\HiWin10\hello-rust\target\debug\incremental -L dependency=C:\Users\HiWin10\hello-rust\target\debug\deps` (exit code: 1)

C:\Users\HiWin10\hello-rust>

Similar error is shown using intellij-rust in Intellij IDEA

C:/Users/HiWin10/.cargo/bin/cargo.exe run --package hello-rust --bin hello-rust
   Compiling hello-rust v0.1.0 (C:\Users\HiWin10\IdeaProjects\hello-rust)
error: linking with `link.exe` failed: exit code: 1181
  |
  = note: "C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Enterprise\\VC\\Tools\\MSVC\\14.12.25827\\bin\\HostX64\\x64\\link.exe" "/NOLOGO" "/NXCOMPAT" "/LIBPATH:C:\\Users\\HiWin10\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib" "C:\\Users\\HiWin10\\IdeaProjects\\hello-rust\\target\\debug\\deps\\hello_rust-888d1f7b91fb6e4a.1twe2j0sf4nhwv0v.rcgu.o" "C:\\Users\\HiWin10\\IdeaProjects\\hello-rust\\target\\debug\\deps\\hello_rust-888d1f7b91fb6e4a.1vsfetqgdl2mm9ku.rcgu.o" "C:\\Users\\HiWin10\\IdeaProjects\\hello-rust\\target\\debug\\deps\\hello_rust-888d1f7b91fb6e4a.2b2k1el9ge2t96a7.rcgu.o" "C:\\Users\\HiWin10\\IdeaProjects\\hello-rust\\target\\debug\\deps\\hello_rust-888d1f7b91fb6e4a.2wy84pmiszi6o3fj.rcgu.o" "C:\\Users\\HiWin10\\IdeaProjects\\hello-rust\\target\\debug\\deps\\hello_rust-888d1f7b91fb6e4a.51bmf9dki30948b3.rcgu.o" "C:\\Users\\HiWin10\\IdeaProjects\\hello-rust\\target\\debug\\deps\\hello_rust-888d1f7b91fb6e4a.q67qbh00yussp5o.rcgu.o" "/OUT:C:\\Users\\HiWin10\\IdeaProjects\\hello-rust\\target\\debug\\deps\\hello_rust-888d1f7b91fb6e4a.exe" "C:\\Users\\HiWin10\\IdeaProjects\\hello-rust\\target\\debug\\deps\\hello_rust-888d1f7b91fb6e4a.11f4ns4fn9v6i7z4.rcgu.o" "/OPT:REF,NOICF" "/DEBUG" "/NATVIS:C:\\Users\\HiWin10\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\etc\\intrinsic.natvis" "/NATVIS:C:\\Users\\HiWin10\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\etc\\liballoc.natvis" "/NATVIS:C:\\Users\\HiWin10\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\etc\\libcore.natvis" "/LIBPATH:C:\\Users\\HiWin10\\IdeaProjects\\hello-rust\\target\\debug\\deps" "/LIBPATH:C:\\Users\\HiWin10\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib" "C:\\Users\\HiWin10\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\libstd-c418a1c7c96bdbae.rlib" "C:\\Users\\HiWin10\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\libpanic_unwind-740e55ec30ec9b42.rlib" "C:\\Users\\HiWin10\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\librustc_demangle-4e3d4b2c73be2130.rlib" "C:\\Users\\HiWin10\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\libhashbrown-e03c95365300773b.rlib" "C:\\Users\\HiWin10\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\librustc_std_workspace_alloc-9b63ec27f8df7123.rlib" "C:\\Users\\HiWin10\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\libunwind-cc811f306714ba24.rlib" "C:\\Users\\HiWin10\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\liblibc-dee84a63f4b90027.rlib" "C:\\Users\\HiWin10\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\liballoc-7d070a58cfb70fe0.rlib" "C:\\Users\\HiWin10\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\librustc_std_workspace_core-10ec18f1dfe36e70.rlib" "C:\\Users\\HiWin10\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\libcore-e0e69d50f48d4667.rlib" "C:\\Users\\HiWin10\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\libcompiler_builtins-45eb0e961cc324b2.rlib" "advapi32.lib" "ws2_32.lib" "userenv.lib" "msvcrt.lib"
  = note: LINK : fatal error LNK1181: 


error: aborting due to previous error

error: Could not compile `hello-rust`.

To learn more, run the command again with --verbose.

Process finished with exit code 101

Since there is no specific names of libraries after LNK1181, I have no idea what is missing. Could you help to suggest how to diagnose ?

PS: A maybe-different error is shown at "cargo run" under Windows Subsystem for Linux

testwsl@localdesktop:~/hello-rust$ cargo run
   Compiling hello-rust v0.1.0 (/home/testwsl/hello-rust)
error: linking with `cc` failed: exit code: 2
  |
  = note: "cc" "-Wl,--as-needed" "-Wl,-z,noexecstack" "-m64" "-L" "/home/testwsl/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib" "/home/testwsl/hello-rust/target/debug/deps/hello_rust-61a6dbe3daa05864.1vqvvt1zu5yjmkx2.rcgu.o" "/home/testwsl/hello-rust/target/debug/deps/hello_rust-61a6dbe3daa05864.35e6mijtpa61ekwc.rcgu.o" "/home/testwsl/hello-rust/target/debug/deps/hello_rust-61a6dbe3daa05864.3guttdxbl4ju2ho3.rcgu.o" "/home/testwsl/hello-rust/target/debug/deps/hello_rust-61a6dbe3daa05864.3w3apmysmbwmta20.rcgu.o" "/home/testwsl/hello-rust/target/debug/deps/hello_rust-61a6dbe3daa05864.555cq0ss6gtr2lhv.rcgu.o" "/home/testwsl/hello-rust/target/debug/deps/hello_rust-61a6dbe3daa05864.pnha9ks6selykbe.rcgu.o" "-o" "/home/testwsl/hello-rust/target/debug/deps/hello_rust-61a6dbe3daa05864" "/home/testwsl/hello-rust/target/debug/deps/hello_rust-61a6dbe3daa05864.2jltqdnkmdrx6xjn.rcgu.o" "-Wl,--gc-sections" "-pie" "-Wl,-zrelro" "-Wl,-znow" "-nodefaultlibs" "-L" "/home/testwsl/hello-rust/target/debug/deps" "-L" "/home/testwsl/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-Wl,--start-group" "-Wl,-Bstatic" "/home/testwsl/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd-9895e8982b0a79e7.rlib" "/home/testwsl/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libpanic_unwind-57306b8ed3378a0e.rlib" "/home/testwsl/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libbacktrace_sys-54463ae5adae3649.rlib" "/home/testwsl/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_demangle-d99667b199a9875a.rlib" "/home/testwsl/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libhashbrown-51f4300e102199f5.rlib" "/home/testwsl/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_std_workspace_alloc-b3ccf1f7737a6a91.rlib" "/home/testwsl/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libunwind-157c37a3ceb78853.rlib" "/home/testwsl/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/liblibc-505bcee45aafb736.rlib" "/home/testwsl/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/liballoc-c29abd529ba4452b.rlib" "/home/testwsl/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_std_workspace_core-895383a3232f6572.rlib" "/home/testwsl/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcore-5594cb4f559bc761.rlib" "-Wl,--end-group" "/home/testwsl/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcompiler_builtins-38e90baf978bc428.rlib" "-Wl,-Bdynamic" "-ldl" "-lrt" "-lpthread" "-lgcc_s" "-lc" "-lm" "-lrt" "-lpthread" "-lutil" "-lutil"
  = note: Non-UTF-8 output: /usr/bin/cc: 1: /usr/bin/cc: \x7fELF\x01\x01\x01\x02\x03\x01\xe4\x90: not found\n/usr/bin/cc: 4: /usr/bin/cc: Syntax error: \"(\" unexpected (expecting \")\")\n

error: aborting due to previous error

error: Could not compile `hello-rust`.

To learn more, run the command again with --verbose.
testwsl@localdesktop:~/hello-rust$ cc
-bash: /usr/bin/cc: cannot execute binary file: Exec format error
testwsl@localdesktop:~/hello-rust$ cargo run --verbose
   Compiling hello-rust v0.1.0 (/home/testwsl/hello-rust)
     Running `rustc --edition=2018 --crate-name hello_rust src/main.rs --color always --crate-type bin --emit=dep-info,link -C debuginfo=2 -C metadata=61a6dbe3daa05864 -C extra-filename=-61a6dbe3daa05864 --out-dir /home/testwsl/hello-rust/target/debug/deps -C incremental=/home/testwsl/hello-rust/target/debug/incremental -L dependency=/home/testwsl/hello-rust/target/debug/deps`
error: linking with `cc` failed: exit code: 2
  |
  = note: "cc" "-Wl,--as-needed" "-Wl,-z,noexecstack" "-m64" "-L" "/home/testwsl/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib" "/home/testwsl/hello-rust/target/debug/deps/hello_rust-61a6dbe3daa05864.1vqvvt1zu5yjmkx2.rcgu.o" "/home/testwsl/hello-rust/target/debug/deps/hello_rust-61a6dbe3daa05864.35e6mijtpa61ekwc.rcgu.o" "/home/testwsl/hello-rust/target/debug/deps/hello_rust-61a6dbe3daa05864.3guttdxbl4ju2ho3.rcgu.o" "/home/testwsl/hello-rust/target/debug/deps/hello_rust-61a6dbe3daa05864.3w3apmysmbwmta20.rcgu.o" "/home/testwsl/hello-rust/target/debug/deps/hello_rust-61a6dbe3daa05864.555cq0ss6gtr2lhv.rcgu.o" "/home/testwsl/hello-rust/target/debug/deps/hello_rust-61a6dbe3daa05864.pnha9ks6selykbe.rcgu.o" "-o" "/home/testwsl/hello-rust/target/debug/deps/hello_rust-61a6dbe3daa05864" "/home/testwsl/hello-rust/target/debug/deps/hello_rust-61a6dbe3daa05864.2jltqdnkmdrx6xjn.rcgu.o" "-Wl,--gc-sections" "-pie" "-Wl,-zrelro" "-Wl,-znow" "-nodefaultlibs" "-L" "/home/testwsl/hello-rust/target/debug/deps" "-L" "/home/testwsl/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-Wl,--start-group" "-Wl,-Bstatic" "/home/testwsl/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd-9895e8982b0a79e7.rlib" "/home/testwsl/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libpanic_unwind-57306b8ed3378a0e.rlib" "/home/testwsl/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libbacktrace_sys-54463ae5adae3649.rlib" "/home/testwsl/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_demangle-d99667b199a9875a.rlib" "/home/testwsl/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libhashbrown-51f4300e102199f5.rlib" "/home/testwsl/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_std_workspace_alloc-b3ccf1f7737a6a91.rlib" "/home/testwsl/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libunwind-157c37a3ceb78853.rlib" "/home/testwsl/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/liblibc-505bcee45aafb736.rlib" "/home/testwsl/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/liballoc-c29abd529ba4452b.rlib" "/home/testwsl/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_std_workspace_core-895383a3232f6572.rlib" "/home/testwsl/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcore-5594cb4f559bc761.rlib" "-Wl,--end-group" "/home/testwsl/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcompiler_builtins-38e90baf978bc428.rlib" "-Wl,-Bdynamic" "-ldl" "-lrt" "-lpthread" "-lgcc_s" "-lc" "-lm" "-lrt" "-lpthread" "-lutil" "-lutil"
  = note: Non-UTF-8 output: /usr/bin/cc: 1: /usr/bin/cc: \x7fELF\x01\x01\x01\x02\x03\x01\xe4\x90: not found\n/usr/bin/cc: 4: /usr/bin/cc: Syntax error: \"(\" unexpected (expecting \")\")\n

error: aborting due to previous error

error: Could not compile `hello-rust`.

Caused by:
  process didn't exit successfully: `rustc --edition=2018 --crate-name hello_rust src/main.rs --color always --crate-type bin --emit=dep-info,link -C debuginfo=2 -C metadata=61a6dbe3daa05864 -C extra-filename=-61a6dbe3daa05864 --out-dir /home/testwsl/hello-rust/target/debug/deps -C incremental=/home/testwsl/hello-rust/target/debug/incremental -L dependency=/home/testwsl/hello-rust/target/debug/deps` (exit code: 1)
testwsl@localdesktop:~/hello-rust$
3
  • Apparently, someone from reddit had the same issue 4 months ago: reddit.com/r/rust/comments/b26f68/…. No proper solution though, except changing toolchain. Commented Jul 25, 2019 at 8:09
  • Probably a toolchain issue: github.com/rust-lang/rust/issues/51659 Commented Jul 25, 2019 at 8:12
  • I also have the 1181 error when trying to compile a Rust program using GTK on Windows 10(same thing on Debian runs fine). I am pretty sure my gtk install on Windows is borked. When I get a chance I will see if I can sort this out. If I do find a good answer I will post here. Commented Jul 25, 2019 at 14:19

1 Answer 1

9

Download and install the Build Tools for Visual Studio 2019. During installation select the C++ tools. It will download almost 5GB of data. Then restart the machine after installation and compiling the code will work fine.

You can visit this as well linker-link-exe-not-found

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.