File tree Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -7,13 +7,18 @@ bindings to `bzip2` at compile time. The resulting bindings will be written to
7
7
` $OUT_DIR/bindings.rs ` where ` $OUT_DIR ` is chosen by ` cargo ` and is something
8
8
like ` ./target/debug/build/bindgen-tutorial-bzip2-sys-afc7747d7eafd720/out/ ` .
9
9
10
+ Note that the associated shared object to ` bz2 ` is ` libbz2.so ` . In general, a ` lib<name>.so ` should be referenced in the build file by ` <name> ` .
11
+
10
12
``` rust,ignore
11
13
extern crate bindgen;
12
14
13
15
use std::env;
14
16
use std::path::PathBuf;
15
17
16
18
fn main() {
19
+ // Tell cargo to look for shared libraries in the specified directory
20
+ println!("cargo:rustc-link-search=/path/to/lib");
21
+
17
22
// Tell cargo to tell rustc to link the system bzip2
18
23
// shared library.
19
24
println!("cargo:rustc-link-lib=bz2");
You can’t perform that action at this time.
0 commit comments