I'm attempting to build the rfd
(GitHub - PolyMeilex/rfd: Rusty File Dialog) package for Mac Catalyst. I'm running into a linking issue when building an example.
I've successfully compiled the library with the following:
cargo +nightly build -Z build-std --release --lib --target x86_64-apple-ios-macabi
When I try to compile the example with:
cargo +nightly build -Z build-std --release --example simple --target x86_64-apple-ios-macabi
I receive the following error:
= note: ld: warning: directory not found for option '-L~/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/x86_64-apple-ios-macabi/lib'
ld: warning: directory not found for option '-L~/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/x86_64-apple-ios-macabi/lib'
Undefined symbols for architecture x86_64:
"_CGShieldingWindowLevel", referenced from:
rfd::backend::macabi::file_dialog::panel_ffi::Panel::new::h50dc944e150e1ae9 in librfd-3591fabd0bc37163.rlib(rfd-3591fabd0bc37163.rfd.8464c089a5c38870-cgu.01.rcgu.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I'm not sure how the nightly toolchains interact with rustup, but the only toolchains visible in ~/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/
are
aarch64-apple-ios/
x86_64-apple-darwin/
There was a previous topic on this from October of 2022, but it was locked without a resolution.