Chapter 10 — Getting started¶
After CppVerify (install), you will have cpp-verify and clang++ under build/bin/
(built from source) or under bin/ of the unpacked release archive. The commands below use
./build/bin/; with an archive, use its bin/ instead.
Verify a source file:
./build/bin/cpp-verify myfile.cpp
Compile with contract checking enabled:
./build/bin/clang++ -std=c++17 -fverify-contracts -c myfile.cpp -o myfile.o
The contract constructs (cppverify::pre and the others) require -fverify-contracts. The
standalone verifier enables it automatically.
To compile (or just syntax-check) without running the solver, use -fno-verify — it skips the
SMT step and implies -fverify-contracts, giving a fast syntax/semantics-only check
(see Commands and flags).