rust - 无法运行 `time v0.1.25` 的自定义构建命令

标签 rust

我尝试使用 cargo build --release 编译脚本,但得到以下输出 ( full stacktrace ):

running: "gcc" "-O0" "-c" "-ffunction-sections" "-fdata-sections" "-mwin32" "-m64" "-fPIC" "C:\Users\User\.cargo\registry\src\github.com-1ecc6299db9ec823\time-0.1.25\src/time_helpers.c" "-o" "D:\Projects\hots-unpack\target\release\build\time-e758cbe877e9589d\out\src\time_helpers.o"     

failed to run custom build command for `time v0.1.25`

Process didn't exit successfully: `D:\Projects\hots-unpack\target\release\build\time-e758cbe877e9589d\build-script-build` (exit code: 101)

--- stderr
thread '<main>' panicked at 'explicit panic', C:\Users\User\.cargo\registry\src\github.com-1ecc6299db9ec823\gcc-0.3.4\src\lib.rs:380

这是script我要编译

最佳答案

我需要用于 Windows 的 64 位版本的 gcc:http://mingw-w64.org

现在工作起来很有魅力。

关于rust - 无法运行 `time v0.1.25` 的自定义构建命令,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29932255/

相关文章:

closures - 使用闭包创建回调系统

rust - 尝试绘制到纹理渲染目标时 gfx-rs 断言失败

syntax - 为什么在模式匹配中使用 `ref` 而不是星号?

rust - 如何从 WebAssembly 中的 Rust 返回字符串(或类似字符串)?

unit-testing - 在运行完所有测试之后,是否可以执行拆解功能?

rust - 在迭代器中写入数组

Rust 安装导致终端权限问题

rust - 如何将SQLX记录加载到Rust中的结构Vec

rust - 如何在 actix-web 中执行异步函数?

variables - Rust 服务器必须保存变量的更新值