在 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 (将#修改为@)