amethyst / amethyst/bracket-lib

Issues with link_resource

オープン
#361 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
Rust
スター
1.7k
フォーク
126
PR マージ指標
30日以内にマージされた PR はありません

説明

I am following the Roguelike tutorial and am trying to make use of an REX file. Code is below:

```
use bracket_lib::prelude::{embedded_resource, link_resource, XpFile};

embedded_resource!(SMALL_DUNGEON, "../resources/desert.xp");
pub struct RexAssets {
pub menu: XpFile
}

impl RexAssets {
pub fn new() -> RexAssets {
link_resource!(SMALL_DUNGEON, "../resources/desert.xp");

RexAssets {
menu: XpFile::from_resource("../resources/desert.xp").unwrap()
}
}
}
```

I am getting this build error:
```
error[E0425]: cannot find value `EMBED` in this scope
--> src/rex_assets.rs:10:9
|
10 | link_resource!(SMALL_DUNGEON, "../resources/desert.xp");
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not found in this scope
|
= note: this error originates in the macro `link_resource` (in Nightly builds, run with -Z macro-backtrace for more info)
```

Any ideas why I would be getting this? Peeking at the source code for `link_resource`, I see a reference to EMBED, but I don't know anything about macros, so I'm not sure what it's referencing or what it is trying to do.

I am on a M1 Macbook running rustc version 1.77.1

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。