New project, Windows platform, LINK failed

prompt:
Non-UTF-8 output: LINK : fatal error LNK1181: \xce\xde\xb7\xa8\xb4\xf2\xbf\xaa\xca\xe4\xc8\xeb\xce\xc4\xb c\xfe\xa1\xb0C:\\Program.obj\xa1\xb1\r\n

python turn the string

>>> content = b"Non-UTF-8 output: LINK : fatal error LNK1181: \xce\xde\xb7\xa8\xb4\xf2\xbf\xaa\xca\xe4\xc8\xeb\xce\xc4\xbc\xfe\xa1\xb0C:\\Program.obj\xa1\xb1\r\n"
>>> print(content.decode("gbk"))
Non-UTF-8 output: LINK : fatal error LNK1181: 无法打开输入文件“C:\Program.obj”

>>>

How can I solve it? What I searched on Google is to change the settings in VS, but this is a rust project.

Complete compilation prompt

error: linking with `link.exe` failed: exit code: 1181
  |
  = note: "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\VC\\Tools\\MSVC\\14.28.29910\\bin\\HostX64\\x64\\link.exe" "/NOLOGO" "/NXCOMPAT" "/LIBPATH:C:\\Users\\Administrator\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib" "D:\\CLionProjects\\rust-hello-temp\\target\\debug\\deps\\rust_hello_temp.1958t8js7o833scx.rcgu.o" "D:\\CLionProjects\\rust-hello-temp\\target\\debug\\deps\\rust_hello_temp.2dcpd37ufuirv6m2.rcgu.o" "D:\\CLionProjects\\rust-hello-temp\\target\\debug\\deps\\rust_hello_temp.2duw4v3xxyv3vsf5.rcgu.o" "D:\\CLionProjects\\rust-hello-temp\\target\\debug\\deps\\rust_hello_temp.2wxkbv89f887owud.rcgu.o" "D:\\CLionProjects\\rust-hello-temp\\target\\debug\\deps\\rust_hello_temp.3jf4qillig7nsy7y.rcgu.o" "D:\\CLionProjects\\rust-hello-temp\\target\\debug\\deps\\rust_hello_temp.3mebxh1uvdhuelk9.rcgu.o" "D:\\CLionProjects\\rust-hello-temp\\target\\debug\\deps\\rust_hello_temp.5044dijbqgjmenl9.rcgu.o" "D:\\CLionProjects\\rust-hello-temp\\target\\debug\\deps\\rust_hello_temp.t6ep0r9j605h166.rcgu.o" "/OUT:D:\\CLionProjects\\rust-hello-temp\\target\\debug\\deps\\rust_hello_temp.exe" "D:\\CLionProjects\\rust-hello-temp\\target\\debug\\deps\\rust_hello_temp.3iwugi43aarubcn1.rcgu.o" "/OPT:REF,NOICF" "/DEBUG" "/NATVIS:C:\\Users\\Administrator\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\etc\\intrinsic.natvis" "/NATVIS:C:\\Users\\Administrator\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\etc\\liballoc.natvis" "/NATVIS:C:\\Users\\Administrator\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\etc\\libcore.natvis" "/NATVIS:C:\\Users\\Administrator\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\etc\\libstd.natvis" "/LIBPATH:D:\\CLionProjects\\rust-hello-temp\\target\\debug\\deps" "/LIBPATH:C:\\Users\\Administrator\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib" "C:\\Users\\Administrator\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\libstd-e5130808ccb074ce.rlib" "C:\\Users\\Administrator\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\libpanic_unwind-580326a9fdffe4b1.rlib" "C:\\Users\\Administrator\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\librustc_demangle-a76d77b5d9ed4759.rlib" "C:\\Users\\Administrator\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\libhashbrown-d5a5b7aa7eeea0b8.rlib" "C:\\Users\\Administrator\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\librustc_std_workspace_alloc-4b74b4985b95e6c8.rlib" "C:\\Users\\Administrator\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\libunwind-b2d5eb0d27518d1c.rlib" "C:\\Users\\Administrator\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\libcfg_if-8a162ec37e71ea47.rlib" "C:\\Users\\Administrator\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\liblibc-45fb7c94b612099e.rlib" "C:\\Users\\Administrator\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\liballoc-3c0db88c6c3c2080.rlib" "C:\\Users\\Administrator\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\librustc_std_workspace_core-ae8fea3b9ef7193c.rlib" "C:\\Users\\Administrator\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\libcore-44bd5dbe4e29964c.rlib" "C:\\Users\\Administrator\\.rustup\\toolchains\\stable-x86_64-pc-windows-msvc\\lib\\rustlib\\x86_64-pc-windows-msvc\\lib\\libcompiler_builtins-2e1363d96f00dd60.rlib" "advapi32.lib" "ws2_32.lib" "userenv.lib" "msvcrt.lib"
  = note: Non-UTF-8 output: LINK : fatal error LNK1181: \xce\xde\xb7\xa8\xb4\xf2\xbf\xaa\xca\xe4\xc8\xeb\xce\xc4\xbc\xfe\xa1\xb0C:\\Program.obj\xa1\xb1\r\n

You may be running into this issue:

1 Like

I have no choice but to uninstall and reinstall Build Tools for Visual Studio 2019.
It's good after uninstalling and reinstalling.

1 Like