我正在使用 rust-gmp-kzen 库,它将 rust 绑定到 gmp。当我运行 rust 程序时,它在语句“BigInt::one();”处中止其中调用“__gmpz_init_set_ui”。 我重新安装了 gcc、gmp、rustup vs,但是问题仍然出现。
dyld[77446]: missing symbol called
我在网上搜索了很多,但没有找到相关的解决方案。任何人都可以知道这个问题吗?
Rustup和cargo使用arm64架构。然而 gmp 库适用于 x86_64 架构。因此,当链接 gmp 库时,rust 无法找到该库并中止。
我卸载了 rustup :
cargo self uninstall
然后再次安装,选择 x86_64-apple-darwin 而不是 arch64
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh