
奇怪的事...发表于 [2022-03-08 08:54:00],更新于 [2022-10-16 14:22:79]
总字数 [229], 阅读时长 [约1分钟], 阅读量 [
未知
]
publish by lenfrex
今天用rust编译一个库,因为之前没用过rust,是新装上去的。
我这里的linker指定的是mingw,也就是gcc那一套。
按照文档的说法,cargo build --release就好了。
编译的过程中,一开始还很顺利,但是半路就报错:
1 2 3 4 5 6 7 8 9 10 11 12 13
| error: linking with `x86_64-w64-mingw32-gcc` failed: exit code: 1 | = note: "x86_64-w64-mingw32-gcc" "-fno-use-linker-plugin" "-Wl,--dynamicbase" "-Wl,--disable-auto-image-base" "-m6...
// 有很多路径的输出...
= note: collect2.exe: fatal error: CreateProcess: No such file or directory compilation terminated.
error: could not compile `crc32fast` due to previous error warning: build failed, waiting for other jobs to finish... error: build failed
|
行吧,老办法,搜。
好嘛,玄学问题…
原来的系统变量PATH里边mingw的路径为D:\mingw-w64\x86_64-8.1.0-posix-seh-rt_v6-rev0\mingw64\bin
你猜怎么着?
“bin”后边多加个斜杠就好了 ←_←
附:其他人的方法 gcc: error: CreateProcess: No such file or directory解决方案_肥宅Sean-CSDN博客