rust-from-c-example
rust-from-c-example copied to clipboard
make test fails
% make test
rustc -c mylib.rs
warning: missing crate link meta `name`, using `mylib` as default
warning: missing crate link meta `vers`, using `0.0` as default
gcc -o test test.c mylib.o
Undefined symbols for architecture x86_64:
"___morestack", referenced from:
_add in mylib.o
add::__rust_abi in mylib.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Makefile:7: recipe for target 'test' failed
make: *** [test] Error 1
% rust -v
rust 0.8
host: x86_64-apple-darwin
Forgot to mention, I'm on Mac OS X 10.9.
Submitted a pull request with a small fix based on the rust-core README.