Calling Rust from Python works already.
This is for calling Python from Rust.
lib.rs
use pyo3::Python;
#[test]
fn unary_arithmetic() {
let gil = Python::acquire_gil();
let py = gil.python();
}
cargo.toml
[dependencies]
pyo3 = { version = "0.12.4", features = ["extension-module"] }
When I try to run this, I get 'undefined reference to Py_***'
I suspect the problem is that I am not properly linking against Python.
How do I fix this ?