-
Notifications
You must be signed in to change notification settings - Fork 711
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The compiled code has no functions #2989
Comments
This is the project code:video_metadata_wasm.zip |
help me,Please! |
Thanks for reaching out! To help you effectively, I need more specific details. Could you provide a minimal reproducible example? Reviewing code in a zip files isn't feasible for me to debug efficiently. |
This is likely to be wasm function visibility defaulting to hidden. You need to build with -fvisibility=default |
OK,what do I need to do? I compiled ffmpeg as a static library by following the command, I copied the header file, and lib into my project directory still without exporting functions
|
I used the following command to compile and there was an error
Compiler lacks C11 support If you think configure made a mistake, make sure you are using the latest |
I successfully built a static library through commands, but I still did not generate functions through bindings
build.rs
|
I have the same issue when compiling to target cargo build --release --target wasm32-unknown-emscripten Error: error[E0425]: cannot find function `speex_preprocess_state_destroy` in crate `aec_rs_sys`
--> src/lib.rs:85:29
|
85 | aec_rs_sys::speex_preprocess_state_destroy(preprocess_state);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not found in `aec_rs_sys` Repro: git clone https://github.com/thewh1teagle/aec-rs -b feat/wasm
cd aec-rs
brew install emscripten cmake
rustup target add wasm32-unknown-emscripten
cargo build --release --target wasm32-unknown-emscripten -p libaec Update: let mut bindings = bindgen::Builder::default().header("wrapper.h");
if target.contains("wasm") {
bindings = bindings.clang_arg("-fvisibility=default");
} |
hello, I'm learning Rust from Java, I'm interested in Rust, and recently I had a difficulty compiling to wasm using Rust+ffmpeg hybrid, bindgen couldn't generate the ffi function I needed.
ffmpeg code location: The "tripartite/ffmpeg" folder in the project project directory. Versions of bindgen I have tried :0.69.5, 0.70.1.
Compile command:
cargo build --release --target wasm32-unknown-unknown
System environment:
This is an error message
The text was updated successfully, but these errors were encountered: