## Keyboard shortcuts

Press `←` or `→` to navigate between chapters

Press `S` or `/` to search in the book

Press `?` to show this help

Press `Esc` to hide this help

# Error code E0455

Some linking kinds are target-specific and not supported on all platforms.

Linking with `kind=framework` is only supported when targeting macOS, as frameworks are specific to that operating system.

Similarly, `kind=raw-dylib` is only supported when targeting Windows-like platforms.

Erroneous code example:

    #[link(name = "FooCoreServices", kind = "framework")] extern "C" {}
    // OS used to compile is Linux for example

To solve this error you can use conditional compilation:

    #![allow(unused)]
    fn main() {
    #[cfg_attr(target="macos", link(name = "FooCoreServices", kind = "framework"))]
    extern "C" {}
    }

Learn more in the Conditional Compilation section of the Reference.