diff --git a/Cargo.toml b/Cargo.toml index 7361f70..21c0edf 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -14,4 +14,4 @@ build = "build.rs" libc = "0.2.0" [build-dependencies] -gcc = "0.3" +cc = "1" diff --git a/build.rs b/build.rs index a4ce3b2..2481c4d 100644 --- a/build.rs +++ b/build.rs @@ -2,8 +2,12 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -extern crate gcc; - fn main() { - gcc::compile_library("libstb_image.a", &["src/stb_image.c"]); + let mut build = cc::Build::new(); + + build + .cpp(true) + .file("src/stb_image.c"); + + build.compile("libstb_image"); }