Closed xdb64 closed 4 years ago
I was dveloping an app and it worked fine, but when I tried to use get_wch() it blew up.
get_wch()
This is an example that fails:
extern crate ncurses; use ncurses::*; fn main() { let mut search_string = String::new(); loop { let user_input = get_wch(); match user_input.unwrap() { WchResult::Char(27u32) => break, WchResult::Char(ch) => { search_string += &std::char::from_u32(ch).unwrap().to_string(); }, _ => {} } } }
This is the error message:
alex@smartalex-bed:~/.repos/codelib/rust/ncurses_issue$ cargo run Compiling ncurses_issue v0.1.0 (/home/alex/.repos/codelib/rust/ncurses_issue) error: linking with `cc` failed: exit code: 1 | = note: "cc" "-Wl,--as-needed" "-Wl,-z,noexecstack" "-m64" "-L" "/home/alex/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib" "/home/alex/.repos/codelib/rust/ncurses_issue/target/debug/deps/ncurses_issue-c19f1bdbdc2c9591.11anpt5ojh66jmj8.rcgu.o" "/home/alex/.repos/codelib/rust/ncurses_issue/target/debug/deps/ncurses_issue-c19f1bdbdc2c9591.11elowl4xud7t47i.rcgu.o" "/home/alex/.repos/codelib/rust/ncurses_issue/target/debug/deps/ncurses_issue-c19f1bdbdc2c9591.1398chkl13l8fpd3.rcgu.o" "/home/alex/.repos/codelib/rust/ncurses_issue/target/debug/deps/ncurses_issue-c19f1bdbdc2c9591.15usda50cxo7lmup.rcgu.o" "/home/alex/.repos/codelib/rust/ncurses_issue/target/debug/deps/ncurses_issue-c19f1bdbdc2c9591.1js5hrb3djoro7qj.rcgu.o" "/home/alex/.repos/codelib/rust/ncurses_issue/target/debug/deps/ncurses_issue-c19f1bdbdc2c9591.1k6oiv2k9nars3sm.rcgu.o" "/home/alex/.repos/codelib/rust/ncurses_issue/target/debug/deps/ncurses_issue-c19f1bdbdc2c9591.1s6zoaas2azdgozz.rcgu.o" "/home/alex/.repos/codelib/rust/ncurses_issue/target/debug/deps/ncurses_issue-c19f1bdbdc2c9591.1ss2tdcy29x2l88o.rcgu.o" "/home/alex/.repos/codelib/rust/ncurses_issue/target/debug/deps/ncurses_issue-c19f1bdbdc2c9591.1ve7vp3xcjmcd94c.rcgu.o" "/home/alex/.repos/codelib/rust/ncurses_issue/target/debug/deps/ncurses_issue-c19f1bdbdc2c9591.2979m2yakjxca8da.rcgu.o" "/home/alex/.repos/codelib/rust/ncurses_issue/target/debug/deps/ncurses_issue-c19f1bdbdc2c9591.2oh7q9bmzw0g0okx.rcgu.o" "/home/alex/.repos/codelib/rust/ncurses_issue/target/debug/deps/ncurses_issue-c19f1bdbdc2c9591.2owh7dgnqa42syvk.rcgu.o" "/home/alex/.repos/codelib/rust/ncurses_issue/target/debug/deps/ncurses_issue-c19f1bdbdc2c9591.2rqozhzy94r1y08i.rcgu.o" "/home/alex/.repos/codelib/rust/ncurses_issue/target/debug/deps/ncurses_issue-c19f1bdbdc2c9591.3djr8cllpya4xdgx.rcgu.o" "/home/alex/.repos/codelib/rust/ncurses_issue/target/debug/deps/ncurses_issue-c19f1bdbdc2c9591.3rwppxax1cyl6juq.rcgu.o" "/home/alex/.repos/codelib/rust/ncurses_issue/target/debug/deps/ncurses_issue-c19f1bdbdc2c9591.4dmzpfn94op1ai7k.rcgu.o" "/home/alex/.repos/codelib/rust/ncurses_issue/target/debug/deps/ncurses_issue-c19f1bdbdc2c9591.4fzj8pnzutlgthca.rcgu.o" "/home/alex/.repos/codelib/rust/ncurses_issue/target/debug/deps/ncurses_issue-c19f1bdbdc2c9591.4qhoj7wwch0tw8iv.rcgu.o" "/home/alex/.repos/codelib/rust/ncurses_issue/target/debug/deps/ncurses_issue-c19f1bdbdc2c9591.4ue85hv0760z1nsf.rcgu.o" "/home/alex/.repos/codelib/rust/ncurses_issue/target/debug/deps/ncurses_issue-c19f1bdbdc2c9591.4uocaqxkfncidct0.rcgu.o" "/home/alex/.repos/codelib/rust/ncurses_issue/target/debug/deps/ncurses_issue-c19f1bdbdc2c9591.547d5o3xh8drwzdr.rcgu.o" "/home/alex/.repos/codelib/rust/ncurses_issue/target/debug/deps/ncurses_issue-c19f1bdbdc2c9591.y6ufe3bbhlrjmi5.rcgu.o" "-o" "/home/alex/.repos/codelib/rust/ncurses_issue/target/debug/deps/ncurses_issue-c19f1bdbdc2c9591" "/home/alex/.repos/codelib/rust/ncurses_issue/target/debug/deps/ncurses_issue-c19f1bdbdc2c9591.13vzqna7esf6xjvu.rcgu.o" "-Wl,--gc-sections" "-pie" "-Wl,-zrelro" "-Wl,-znow" "-nodefaultlibs" "-L" "/home/alex/.repos/codelib/rust/ncurses_issue/target/debug/deps" "-L" "/home/alex/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-Wl,-Bstatic" "/home/alex/.repos/codelib/rust/ncurses_issue/target/debug/deps/libncurses-d58f086df8620deb.rlib" "/home/alex/.repos/codelib/rust/ncurses_issue/target/debug/deps/liblibc-7ed32985e2931d6a.rlib" "-Wl,--start-group" "/home/alex/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd-c32b051c3aafd36c.rlib" "/home/alex/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libpanic_unwind-eabf8b29c0a244dd.rlib" "/home/alex/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libhashbrown-5c336cc1b5ec2048.rlib" "/home/alex/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_std_workspace_alloc-c7631f762b1ba6d9.rlib" "/home/alex/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libbacktrace-db0f6c539591c951.rlib" "/home/alex/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libbacktrace_sys-32c2dc6fbc292c9c.rlib" "/home/alex/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_demangle-84e9c510dc249620.rlib" "/home/alex/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libunwind-13bc027534de0b4c.rlib" "/home/alex/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcfg_if-b3c13ecda1794c6c.rlib" "/home/alex/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/liblibc-72dc11de859645e9.rlib" "/home/alex/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/liballoc-a78b04f112feb31a.rlib" "/home/alex/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_std_workspace_core-29469f6c53ac35f8.rlib" "/home/alex/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcore-0eb3c513c640c4a6.rlib" "-Wl,--end-group" "/home/alex/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcompiler_builtins-0b278345638bce90.rlib" "-Wl,-Bdynamic" "-lncurses" "-lutil" "-ldl" "-lutil" "-ldl" "-lrt" "-lpthread" "-lgcc_s" "-lc" "-lm" "-lrt" "-lpthread" "-lutil" "-lutil" = note: /home/alex/.repos/codelib/rust/ncurses_issue/target/debug/deps/libncurses-d58f086df8620deb.rlib(ncurses-d58f086df8620deb.ncurses.ap4cwbmo-cgu.0.rcgu.o): In function `ncurses::get_wch': /home/alex/.cargo/registry/src/github.com-1ecc6299db9ec823/ncurses-5.99.0/src/lib.rs:323: undefined reference to `get_wch' collect2: error: ld returned 1 exit status error: aborting due to previous error error: could not compile `ncurses_issue`. To learn more, run the command again with --verbose. alex@smartalex-bed:~/.repos/codelib/rust/ncurses_issue$
I tried to do sudo apt install ncurses*, but the same error happens again. I'm using XUbuntu 18.04.4 LTS (Bionic Beaver).
sudo apt install ncurses*
What could be the issue?
I was dveloping an app and it worked fine, but when I tried to use
get_wch()
it blew up.This is an example that fails:
This is the error message:
I tried to do
sudo apt install ncurses*
, but the same error happens again. I'm using XUbuntu 18.04.4 LTS (Bionic Beaver).What could be the issue?