cppcheck can't find even standard headers such as iostream. Any ideas?
I am using Ubuntu 11.04 and cppcheck from the repository.
cppcheck can't find even standard headers such as iostream. Any ideas?
I am using Ubuntu 11.04 and cppcheck from the repository.
cppcheck is really bad at finding standard include headers, on Mac and Linux. Fortunately, you can suppress this check, and only scan your custom header files:
cppcheck --enable=all --suppress=missingIncludeSystem .
Unmatched suppression: missingIncludeSystem
... Or does this simply mean that the check didn't suppress any arror? Can I suppress the non-suppressed suppress-error then? O:) –
Pergolesi missingInclude
now. –
Ascendant 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.
-I
option can make cppcheck
run very slowly if you bring in a lot of headers. –
Ordinarily © 2022 - 2024 — McMap. All rights reserved.