Skip to content

Commit

Permalink
Merge pull request #1420 from Turbo87/patch-2
Browse files Browse the repository at this point in the history
book/building: Fix `expect_build()` call
  • Loading branch information
adetaylor authored Jan 8, 2025
2 parents bea6877 + 8750b63 commit 340e672
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion book/src/building.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ fn main() {
let path = std::path::PathBuf::from("src"); // include path
let mut b = autocxx_build::Builder::new("src/main.rs", &[&path])
.extra_clang_args(&["-std=c++17"])
.expect_build();
.build()
.unwrap();
b.flag_if_supported("-std=c++17") // use "-std:c++17" here if using msvc on windows
.compile("autocxx-demo"); // arbitrary library name, pick anything
println!("cargo:rerun-if-changed=src/main.rs");
Expand Down

0 comments on commit 340e672

Please sign in to comment.