微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

在 amethyst hello world 示例 Arch Linux 中未解析的 xcb 导入

如何解决在 amethyst hello world 示例 Arch Linux 中未解析的 xcb 导入

我正在尝试在 Arch Linux 机器上的 Amethyst 中运行基本的 hello world 示例,并且在编译时我在编译 xcb 0.8.2 时遇到了一堆未解决的导入错误

我的 Cargo.toml 看起来像这样

[package]
name = "mygame"
version = "0.1.0"
authors = ["my_user"]
edition = "2018"

# See more keys and their deFinitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies.amethyst]
version = "0.15"
features = ["vulkan"]

我的代码如下:

use amethyst::prelude::*;
fn main() -> amethyst::Result<()> {
    Ok(())
}

我收到了大约 500 个错误,但它们都是与此类似的未解决的依赖项错误

error[E0432]: unresolved imports `ffi::xproto::xcb_setup_t`,`ffi::xproto::xcb_query_extension_reply_t`
  --> /home/my_user/.cargo/registry/src/github.com-1ecc6299db9ec823/xcb-0.8.2/src/ffi/base.rs:32:19
   |
32 | use ffi::xproto::{xcb_setup_t,xcb_query_extension_reply_t};
   |                   ^^^^^^^^^^^  ^^^^^^^^^^^^^^^^^^^^^^^^^^^ no `xcb_query_extension_reply_t` in `ffi::xproto`
   |                   |
   |                   no `xcb_setup_t` in `ffi::xproto`

error[E0412]: cannot find type `Setup` in this scope
   --> /home/my_user/.cargo/registry/src/github.com-1ecc6299db9ec823/xcb-0.8.2/src/base.rs:438:32
    |
438 |     pub fn get_setup(&self) -> Setup {
    |                                ^^^^^ not found in this scope

与 xcb 相关的我的 Cargo.lock 文件如下所示


[[package]]
name = "xcb"
version = "0.8.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5e917a3f24142e9ff8be2414e36c649d47d6cc2ba81f16201cdef96e533e02de"
dependencies = [
 "libc","log",]

我已经检查并确保 xcb 0.8.2 确实包含缺失的结构,而且由于 Cargo.lock 似乎说它是正确的版本,我有点不知道问题可能是什么。 有什么想法吗?

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。