cppcheck can't find include files

前端 未结 2 935
耶瑟儿~
耶瑟儿~ 2021-02-07 00:52

cppcheck can\'t find even standard headers such as iostream. Any ideas?

I am using Ubuntu 11.04 and cppcheck from the repository.

2条回答
  •  萌比男神i
    2021-02-07 01:36

    It isn’t recommended to provide the paths to the standard C/C++ headers - Cppcheck has internal knowledge about ANSI C/C++ and it isn’t recommended that this known functionality is redefined. But feel free to try it.

    -I [dir]
    

    Give include path. Give several -I parameters to give several paths. First given path is checked first. If paths are relative to source files, this is not needed.

提交回复
热议问题