0

我正在尝试在 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似乎说它是正确的版本,所以我对可能出现的问题有点迷茫。有什么想法吗?

4

0 回答 0