From dc3cb8e498a41bed57dd942cf0ebeff9a94d5fc2 Mon Sep 17 00:00:00 2001 From: Imad Date: Tue, 25 Jun 2019 14:55:18 +0100 Subject: [PATCH] change "multiply" to "myfunctions" in the example --- rust/linking_with_c/README.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rust/linking_with_c/README.rst b/rust/linking_with_c/README.rst index fa53e2e..66d09b7 100644 --- a/rust/linking_with_c/README.rst +++ b/rust/linking_with_c/README.rst @@ -17,7 +17,7 @@ In the Rust file, - Add all external functions at the top with ``extern{}`` block - Add a link decorator like ``#[link(name = "myfunctions")]`` - + OR set the link in the build.rs file ``println!("cargo:rustc-link-lib=multiply");`` + + OR set the link in the build.rs file ``println!("cargo:rustc-link-lib=myfunctions");`` - Add ``extern crate libc;`` and ``use libc::c_int`` and all other datatypes needed - When calling the C function, wrap in an ``unsafe{}`` block