I have just installed Rust and create the first program "Hello World". When I compile it, I got below error with gcc. I use Windows 10 64 bits with Cygwin. Please tell me how to fix it.
Thanks in advance.
Thang@Thang-Laptop ~/rust_projects/hello_world
$ gcc --version
gcc.exe (MinGW.org GCC-6.3.0-1) 6.3.0
Copyright (C) 2016 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Thang@Thang-Laptop ~/rust_projects/hello_world
$ rustc main.rs
error: could not exec the linker `gcc`: Access is denied. (os error 5)
|
= note: "gcc" "-Wl,--enable-long-section-names" "-fno-use-linker-plugin" "-Wl,--nxcompat" "-nostdlib" "-m64" "C:\\cygwin64\\usr\\local\\lib\\rustlib\\x86_64-pc-windows-gnu\\lib\\crt2.o" "C:\\cygwin64\\usr\\local\\lib\\rustlib\\x86_64-pc-windows-gnu\\lib\\rsbegin.o" "-L" "C:\\cygwin64\\usr\\local\\lib\\rustlib\\x86_64-pc-windows-gnu\\lib" "main.0.o" "-o" "main.exe" "main.crate.allocator.o" "-Wl,--gc-sections" "-nodefaultlibs" "-L" "C:\\cygwin64\\usr\\local\\lib\\rustlib\\x86_64-pc-windows-gnu\\lib" "-Wl,-Bstatic" "C:\\cygwin64\\usr\\local\\lib\\rustlib\\x86_64-pc-windows-gnu\\lib\\libstd-032e1c452e2de4d1.rlib" "C:\\cygwin64\\usr\\local\\lib\\rustlib\\x86_64-pc-windows-gnu\\lib\\liballoc_system-af7b1e134ab5ede1.rlib" "C:\\cygwin64\\usr\\local\\lib\\rustlib\\x86_64-pc-windows-gnu\\lib\\librand-8432a2d911f96a2f.rlib" "C:\\cygwin64\\usr\\local\\lib\\rustlib\\x86_64-pc-windows-gnu\\lib\\libpanic_unwind-f4544e7032568897.rlib" "C:\\cygwin64\\usr\\local\\lib\\rustlib\\x86_64-pc-windows-gnu\\lib\\liballoc-4af742a168c01de9.rlib" "C:\\cygwin64\\usr\\local\\lib\\rustlib\\x86_64-pc-windows-gnu\\lib\\libstd_unicode-e2b4d8b13c8cf98f.rlib" "C:\\cygwin64\\usr\\local\\lib\\rustlib\\x86_64-pc-windows-gnu\\lib\\libunwind-8115485dc2a7ae72.rlib" "C:\\cygwin64\\usr\\local\\lib\\rustlib\\x86_64-pc-windows-gnu\\lib\\liblibc-863fb1f3088fad80.rlib" "C:\\cygwin64\\usr\\local\\lib\\rustlib\\x86_64-pc-windows-gnu\\lib\\libcore-6fe1fb0e133236a4.rlib" "C:\\cygwin64\\usr\\local\\lib\\rustlib\\x86_64-pc-windows-gnu\\lib\\libcompiler_builtins-297864ab139f9899.rlib" "-Wl,-Bdynamic" "-l" "advapi32" "-l" "ws2_32" "-l" "userenv" "-l" "shell32" "-Wl,-Bstatic" "-l" "gcc_eh" "-l" "pthread" "-Wl,-Bdynamic" "-lmingwex" "-lmingw32" "-lgcc" "-lmsvcrt" "-luser32" "-lkernel32" "C:\\cygwin64\\usr\\local\\lib\\rustlib\\x86_64-pc-windows-gnu\\lib\\rsend.o"
error: aborting due to previous error