Skip to content
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

allow static link kind for rustc-link-lib= #61

Open
imWildCat opened this issue Jul 15, 2024 · 0 comments
Open

allow static link kind for rustc-link-lib= #61

imWildCat opened this issue Jul 15, 2024 · 0 comments

Comments

@imWildCat
Copy link

fn ios() {
    // vcpkg::find_package("icu").unwrap(); // this would build the whole rust lib but the compilation for iOS using xcode would fail due to missing symbols
    println!("cargo:rustc-link-search=native=path/to/vcpkg/installed/arm64-ios-simulator/lib");
    println!("cargo:rustc-link-lib=static=icuuc");
    println!("cargo:rustc-link-lib=static=icui18n");
    println!("cargo:rustc-link-lib=static=icudata");

only adding static= to the lib being linked can fix

https://doc.rust-lang.org/cargo/reference/build-scripts.html#:~:text=other%20linker%20options.-,cargo%3A%3Arustc%2Dlink%2Dlib%3DLIB,%2C%20or%20framework.%20See%20the%20rustc%20book%20for%20more%20detail.,-cargo%3A%3Arustc%2Dlink

Is there a way to specify this kind?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant