Menu

Cppcheck gui Configurations

2024-05-08
2024-05-22
  • Lydiane Massabe Kengne

    Hello everyone,

    I am pretty new to Cppcheck and I need your help please. I have noticed that Cppcheck does not seem to understand Macro definitions in the code. Currently I am analyzing a component in the Cppcheck gui and I always run on the error "There was a critical error with id 'unknownMacro' when analyzing C:/Users/lydian/test.c. Analysis aborted". This macro is defined in another file in the component (config.h). Why does Cppcheck not see the definitions in this config file.

    Also please how can I define the configuration for Cppcheck to see the Macro from the cppcheck gui and hence continue the analysis of the file.

    On the command line, I can suppress the error or have an config file where I define the macro and hence use maybe the --include function, but my problem is how to fix this error from the graphical user interface (gui).

    Please help.

     
  • Daniel Marjamäki

    Very sorry for so slow reply. You need to provide the include paths.

    In the GUI: Create a project file. "File" menu and then "New project..". In the project you can configure the include paths.

    On the command line: Use -I

    Please let me know if you need more help.

     

    Last edit: Daniel Marjamäki 2024-05-22

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.