building python interface in lib.rs with functions in other files #4048
Unanswered
frameadvisors
asked this question in
Questions
Replies: 1 comment
-
Please update your PyO3 version. 0.15 is very old and probably before support for cross module importing was implemented. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
What is the proposed way of achieving this?
Here is the error stream:
Compiling pyo3-build-config v0.15.2
Compiling pyo3-macros-backend v0.15.2
Compiling pyo3 v0.15.2
Compiling pyo3-macros v0.15.2
error[E0425]: cannot find value __pyo3_get_function_add in this scope
--> src/lib.rs:12:20
|
12 | m.add_function(wrap_pyfunction!(add, m)?)?;
| ^^^^^^^^^^^^^^^^^^^^^^^^ not found in this scope
|
= note: this error originates in the macro proc_macro_call which comes from the expansion of the macro wrap_pyfunction (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0425]: cannot find value __pyo3_get_function_double in this scope
--> src/lib.rs:13:20
|
13 | m.add_function(wrap_pyfunction!(double, m)?)?;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ not found in this scope
|
= note: this error originates in the macro proc_macro_call which comes from the expansion of the macro wrap_pyfunction (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0425]: cannot find value __pyo3_get_function_multiply in this scope
--> src/lib.rs:14:20
|
14 | m.add_function(wrap_pyfunction!(multiply, m)?)?;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not found in this scope
|
= note: this error originates in the macro proc_macro_call which comes from the expansion of the macro wrap_pyfunction (in Nightly builds, run with -Z macro-backtrace for more info)
warning: unused imports: add, double
--> src/lib.rs:5:15
|
5 | use add_int::{add, double};
| ^^^ ^^^^^^
|
= note: #[warn(unused_imports)] on by default
warning: unused import: multiply_int::multiply
--> src/lib.rs:6:5
|
6 | use multiply_int::multiply;
| ^^^^^^^^^^^^^^^^^^^^^^
libunwind: malformed __unwind_info at 0x181ED0CA8 bad second level page
libunwind: malformed __unwind_info at 0x181ED0CA8 bad second level page
For more information about this error, try rustc --explain E0425.
warning: pydesign (lib) generated 2 warnings
error: could not compile pydesign (lib) due to 3 previous errors; 2 warnings emitted
warning: build failed, waiting for other jobs to finish...
Beta Was this translation helpful? Give feedback.
All reactions