Menu

command “where cppcheck” (on windows command line) can't find anything

Thommy
2018-03-28
2018-04-05
  • Thommy

    Thommy - 2018-03-28

    I downloaded and installed "cppcheck"..

    However, when I go to the windows command prompt and type "where cppcheck", nothing can be found.

    What'S going on here? Is the command line interface for cppcheck only accessible on Unix systems?

     
  • versat

    versat - 2018-03-29

    The command line interface is accessible and working on Windows too.
    The where command only searches in the current directory and in the directories configured in the PATH environment variable. Since cppcheck (or better the installer) does not add it's directory to the PATH variable (and IMHO should not do that), you will get no results until you are already in the correct directory.
    When calling cppcheck via a batch script i use the full path, for me that is "C:\Program Files\Cppcheck\cppcheck".
    I guess you can just add the path to cppcheck.exe to the PATH environment variable so you do not have to enter it all the time, but i have not tried that yet.

     
  • raynebc

    raynebc - 2018-03-29

    I've added CppCheck's installation folder to my PATH variable and can call cppcheck by command line from any working directory without issue.

     
  • versat

    versat - 2018-04-05

    amai created a ticket regarding adding the path to the PATH variable by the installer:
    https://trac.cppcheck.net/ticket/8464

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.