前提・実現したいこと
termionのコンパイルの成功
発生している問題・エラーメッセージ(ユーザ名はhogeにしています)
process didn't exit successfully: `rustc --crate-name termion C:\Users\hoge.c argo\registry\src\github.com-1ecc6299db9ec823\termion-1.5.1\src\lib.rs --color a lways --crate-type lib --emit=dep-info,link -C debuginfo=2 -C metadata=35ca6e4f0 549d332 -C extra-filename=-35ca6e4f0549d332 --out-dir C:\Users\hoge\projectrust\ study\rust\target\debug\deps -L dependency=C:\Users\hoge\projectrust\study\rust\ target\debug\deps --extern libc=C:\Users\hoge\projectrust\study\rust\target\debu g\deps\liblibc-8ac9d18c7ff6c68c.rlib --cap-lints allow` (exit code: 1)
該当のソースコード(ttps://qiita.com/hatoo@github/items/905a19a98876e7446edf様のサイトのコード)
extern crate termion; extern crate sys; use std::io::{stdin, stdout, Write}; use termion::event::{Event, Key}; use termion::input::TermRead; use termion::raw::IntoRawMode; fn main() { let stdin = stdin(); // Rawモードに移行 // into_raw_modeはIntoRawModeトレイトに定義されている // めんどくさいので失敗時は終了(unwrap) // stdout変数がDropするときにrawモードから元の状態にもどる let mut stdout = stdout().into_raw_mode().unwrap(); // eventsはTermReadトレイトに定義されている for evt in stdin.events() { // Ctrl-cでプログラム終了 // Rawモードなので自前で終了方法を書いてかないと終了する方法がなくなってしまう! if evt.unwrap() == Event::Key(Key::Ctrl('c')) { return; } } }
試したこと
maybe a missing extern crate sys;
?と出たのでextern crate sys;を追加したが失敗。
rustup updateを使用したが失敗。
補足情報(FW/ツールのバージョンなど)
Windows7 Home Premium
rustup 1.17.0 (069c88ed6 2019-03-05)
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2019/04/20 17:22