-
Notifications
You must be signed in to change notification settings - Fork 28
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
adds proper dynamic linking #69
base: master
Are you sure you want to change the base?
Conversation
I also added multi architecture build. Sometimes when you want to build an Android APK you need a way of passing a single directory with .so files for every architecture. Now with
and it will search for the libs in this folder. |
would be nice to have this merged :) |
How to build for android and iOS ? I had bulit ffmpeg-kit , and add this to cargo.toml then run cargo ndk build
|
It would be great to be able to properly dynamically link on Unix platforms. If me rebasing this PR would make any difference to getting it merged let me know. |
if let Some(f) = file_name { | ||
println!("cargo:rustc-link-lib=dylib={}", f); | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing rustc-link-search ?
++ println!("cargo:rustc-link-search=native={}", ffmpeg_dll_path);
I needed to link ffmpeg dlls directly to the project (my dev PC must be offline -> military project), and I can confirm that in single architecture build mode, it works (with a little alteration). # (In config.toml)
[env]
# To generate the binding:
FFMPEG_INCLUDE_DIR = { value = '..\dependencies\win\ffmpeg_msvc\include', relative = true, force = true }
# To indicate location of avcodec, avutil, swresample, (..) => `.dll` AND `.lib`
FFMPEG_DLL_PATH = { value = '..\dependencies\win\ffmpeg_msvc\bin\', relative = true, force = true } |
dynamic linking was trying to link to a single file
this adds dynamic linking to the various .so files
tested and worked