无法编译Windows 32位上的curl-rust,未定义的对pthread函数的引用

无法编译Windows 32位上的curl-rust,未定义的对pthread函数的引用,第1张

概述无法编译Windows 32位上的curl-rust,未定义的对pthread函数引用

当我试图在安装了MSYS2的windows 32位上编译curl-rust时遇到了这个错误。 看来“pthread”不被MSYS2 / mingw32支持。

error: linking with gcc Failed: exit code: 1 D:/Applications/msys32/mingw32/bin/../lib/gcc/i686-w64-mingw32/6.1.0/libgcc_eh.a(unwind-DW2-fde.o):(.text+0x1a3): undefined reference to pthread_mutex_init' D:/Applications/msys32/mingw32/bin/../lib/gcc/i686-w64-mingw32/6.1.0/libgcc_eh.a(unwind-DW2-fde.o):(.text+0xfd9): undefined reference topthread_once' D:/Applications/msys32/mingw32/bin/../lib/gcc/i686-w64-mingw32/6.1.0/libgcc_eh.a(unwind-DW2-fde.o):(.text+0xfe5): undefined reference to pthread_mutex_lock' D:/Applications/msys32/mingw32/bin/../lib/gcc/i686-w64-mingw32/6.1.0/libgcc_eh.a(unwind-DW2-fde.o):(.text+0x10f4): undefined reference topthread_once' D:/Applications/msys32/mingw32/bin/../lib/gcc/i686-w64-mingw32/6.1.0/libgcc_eh.a(unwind-DW2-fde.o):(.text+0x1100): undefined reference to pthread_mutex_lock' D:/Applications/msys32/mingw32/bin/../lib/gcc/i686-w64-mingw32/6.1.0/libgcc_eh.a(unwind-DW2-fde.o):(.text+0x11cb): undefined reference topthread_once' D:/Applications/msys32/mingw32/bin/../lib/gcc/i686-w64-mingw32/6.1.0/libgcc_eh.a(unwind-DW2-fde.o):(.text+0x11d7): undefined reference to pthread_mutex_lock' D:/Applications/msys32/mingw32/bin/../lib/gcc/i686-w64-mingw32/6.1.0/libgcc_eh.a(unwind-DW2-fde.o):(.text+0x1239): undefined reference topthread_mutex_unlock' collect2.exe: error: ld returned 1 exit status

我的MSYS2安装中可能会出现一些错误吗?

除了该function不在windows上,我无法在网上find这个错误。

例如:

无法在windows上构buildrustless

为什么时间的纳秒值:持续时间在windows上最接近100的倍数?

与生成文件夹外部的windows库链接

书中的FFI示例在windows下找不到-lanneclib

如何获得Rust中跨平台的可执行扩展?

main.rs

// https://crates.io/crates/curl // http://alexcrichton.com/curl-rust/curl/index.HTML extern crate curl; use curl::easy::Easy; fn main() { let mut easy = Easy::new(); }

Cargo.toml

[package] name = "linksbypage" version = "0.1.0" authors = ["LeMoussel"] [dependencIEs] curl = "*"

windows(GNU ABI)防锈版本:1.11.0,Cargo版本:0.12.0每晚。

无法在windows上链接hello_world程序:/ usr / bin / link:额外的 *** 作数

如何找出为什么DLL不能在不同的程序中加载?

尝试在windows上编译时出错

MIO EventLoop不运行Tcpstream

创build一个窗口时在ntdll.dll中的SIGSEGV

总结

以上是内存溢出为你收集整理的无法编译Windows 32位上的curl-rust,未定义的对pthread函数的引用全部内容,希望文章能够帮你解决无法编译Windows 32位上的curl-rust,未定义的对pthread函数的引用所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/langs/1273139.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-06-08
下一篇 2022-06-08

发表评论

登录后才能评论

评论列表(0条)

保存