开发者

How to build cppcheck tool in gcc compiler?

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 开发者_JAVA百科-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.


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


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\

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜