2

I have downloaded cppcheck tool and build it. Now am facing the problem that cppcheck command not found. Is there any mistake..suggest me the steps..

I tried in gcc compiler as following:

> cd /home/tcsujth/Desktop/cppcheck-1.46.1/
> g++ -o cppcheck -Ilib cli/*.cpp lib/*.cpp
> ./cppcheck
SYNTAX----------
cppcheck: error: could not find or open any of the paths given.
Segmentation fault (core dumped)
> cppcheck --version
cppcheck: Command not found.

2 Answers 2

6

I am a Cppcheck developer.

I assume that the g++ command finish without errors.

The "cppcheck: error: could not find or open any of the paths given" indicates that the compile was successful. It is an error that cppcheck writes if it doesn't find any source code to analyse. You must provide the path to your source code. If you provided a path then it seems something is wrong with the given path.

The segmentation fault seems interesting. Can you reproduce it with the latest Cppcheck? Feel free to report it here: http://sourceforge.net/apps/trac/cppcheck/ with some details about how it can be reproduced.

The "cppcheck: Command not found" simply means that the shell can't find cppcheck (it is not located in any path given by the PATH environment variable).

Best regards, Daniel

Sign up to request clarification or add additional context in comments.

Comments

0

I was also facing the same issue most of the time you give path including the folder of your project itself try proving path one folder behind: Like:(assuming your project resides in "projectfolder"

instead of this- D:\myfolder\projectfolder try- D:\myfolder\

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.