diff --git a/build.rs b/build.rs index 00ce830..97aef46 100644 --- a/build.rs +++ b/build.rs @@ -710,10 +710,16 @@ fn main() { } // Fallback to pkg-config else { - pkg_config::Config::new() + match pkg_config::Config::new() .statik(statik) .probe("libavutil") - .unwrap(); + { + Ok(library) => library, + Err(e) => { + eprint!("Error: {}", e); + return; + }, + }; let mut libs = vec![ ("libavformat", "AVFORMAT"),