Skip to content

Can't link static library in /usr/local/lib #31419

@dragostis

Description

@dragostis

I'm trying to build a library with a #[link]ed static library which lies in /usr/local/lib, but rustc can't seem to find it. I haven't been able to find the default paths that it looks through.

The command is this:

rustc src/lib.rs --crate-name mrusty --crate-type lib -g --out-dir
/Users/dragos/Documents/Rust/mrusty/target/debug --emit=dep-info,link -L
dependency=/Users/dragos/Documents/Rust/mrusty/target/debug -L
dependency=/Users/dragos/Documents/Rust/mrusty/target/debug/deps --extern
libc=/Users/dragos/Documents/Rust/mrusty/target/debug/deps/liblibc-47e3aae331d291a4.rlib

The error is this:

error: could not find native static library `mruby`, perhaps an -L flag is missing?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions