1

I got the following error on Ubuntu 16.04:

$ cppcheck --project=compile_commands.json 
cppcheck: error: unrecognized command line option: "--project=compile_commands.json".

I already tried reinstalling cppcheck. Does anyone know to what this error is related?

1 Answer 1

2

cppcheck doesn't support the --project option on the version available by default on Ubuntu 16.04 (xenial). The version of cppcheck there is 1.72

If you wish to use the option --project then install a newer cppcheck.

  • It can be installed from the snap store (sudo snap install cppcheck).
  • It can be installed manually from cppcheck.net - download source, build locally
  • You can upgrade to ubuntu 18.04/20.04 and use the version from there.
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.