1 Some linking kinds are target-specific and not supported on all platforms.
3 Linking with `kind=framework` is only supported when targeting macOS,
4 as frameworks are specific to that operating system.
6 Similarly, `kind=raw-dylib` is only supported when targeting Windows-like
9 Erroneous code example:
11 ```ignore (should-compile_fail-but-cannot-doctest-conditionally-without-macos)
12 #[link(name = "FooCoreServices", kind = "framework")] extern "C" {}
13 // OS used to compile is Linux for example
16 To solve this error you can use conditional compilation:
19 #[cfg_attr(target="macos", link(name = "FooCoreServices", kind = "framework"))]
23 Learn more in the [Conditional Compilation][conditional-compilation] section
26 [conditional-compilation]: https://doc.rust-lang.org/reference/attributes.html#conditional-compilation