Sorry, not sure how to do this. I've got the libBearLibTerminal.dylib
and put it in my src. not sure what to do with it from there... cargo run
says:
λ ~/sandbox/rust/bear/ master* cargo run
Compiling bear v0.1.0 (/Users/justgage/sandbox/rust/bear)
error: linking with `cc` failed: exit code: 1
|
= note: "cc" "-m64" "-L" "/Users/justgage/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib" "/Users/justgage/sandbox/rust/bear/target/debug/deps/bear-f9575ad4cb149f8b.2gkhn179cjec6l3b.rcgu.o" "/Users/justgage/sandbox/rust/bear/target/debug/deps/bear-f9575ad4cb149f8b.2kyead65syd0h408.rcgu.o" "/Users/justgage/sandbox/rust/bear/target/debug/deps/bear-f9575ad4cb149f8b.4ihsln5i6kcoxe74.rcgu.o" "/Users/justgage/sandbox/rust/bear/target/debug/deps/bear-f9575ad4cb149f8b.4qp6saoq8ch4khbi.rcgu.o" "/Users/justgage/sandbox/rust/bear/target/debug/deps/bear-f9575ad4cb149f8b.4tb9vh2tlhjgmdsg.rcgu.o" "-o" "/Users/justgage/sandbox/rust/bear/target/debug/deps/bear-f9575ad4cb149f8b" "/Users/justgage/sandbox/rust/bear/target/debug/deps/bear-f9575ad4cb149f8b.7ldewih2fcza26m.rcgu.o" "-Wl,-dead_strip" "-nodefaultlibs" "-L" "/Users/justgage/sandbox/rust/bear/target/debug/deps" "-L" "/Users/justgage/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib" "/Users/justgage/sandbox/rust/bear/target/debug/deps/libbear_lib_terminal-52c813dd64cd8b7e.rlib" "/Users/justgage/sandbox/rust/bear/target/debug/deps/libbear_lib_terminal_sys-2507a917265e469a.rlib" "/Users/justgage/sandbox/rust/bear/target/debug/deps/liblibc-83d68bd06eb59687.rlib" "/Users/justgage/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/libstd-edeacefc1391b975.rlib" "/Users/justgage/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/libpanic_unwind-661c88e34f871df0.rlib" "/Users/justgage/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/libunwind-f7c06680fdd716f3.rlib" "/Users/justgage/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/liblibc-f2e753da53df829c.rlib" "/Users/justgage/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/liballoc-961b28aeeb5bc8e1.rlib" "/Users/justgage/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/libcore-b6f6b59b6a29ec3a.rlib" "/Users/justgage/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/libcompiler_builtins-f31526d6d86acb04.rlib" "-lBearLibTerminal" "-lSystem" "-lresolv" "-lc" "-lm"
= note: ld: library not found for -lBearLibTerminal
clang: error: linker command failed with exit code 1 (use -v to see invocation)
error: aborting due to previous error
error: Could not compile `bear`.
To learn more, run the command again with --verbose.
My Cargo.toml file looks like:
[dependencies]
bear-lib-terminal = "2.0.0"
main.rs:
#[link(name = "libBearLibTerminal.dylib")]
use bear_lib_terminal::terminal;
pub fn main() {
terminal::open("Test", 80, 30);
terminal::print_xy(0, 0, "[color=red]asdf[bkcolor=blue]asdf");
terminal::refresh();
let _ = terminal::wait_event();
terminal::close();
}
question