2

I downloaded cppcheck to analyze my C++ programs, successfuly got to work it´s gui environment but I would also like to use it from command line.

In C:\users\me\documents\main.cpp is my cpp program that I try to analyze with cppcheck. When I type cppcheck main.cpp in cmd, I only get a message saying 'cppcheck' is not recognized as an internal or external command, operable program or batch file.

Is there anything I should link my cppcheck with in order to get recognized by command line?

4
  • the c++ tag is for questions about c++ code Commented Oct 26, 2020 at 12:35
  • Is cppcheck in your PATH? Commented Oct 26, 2020 at 12:36
  • The directory where the cppcheck is installed needs to be in your path or you need to supply the full pathname to it. Commented Oct 26, 2020 at 12:37
  • Ok and should I add that into system variables or user variables? Commented Oct 26, 2020 at 12:44

1 Answer 1

3

The directory where cppcheck is installed needs to be added to your PATH if not present, or in alternative you have to give the full-pathname to the execution command.

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.