Code::Blocks Forums
User forums => Using Code::Blocks => Topic started by: Calexus on September 20, 2011, 09:43:35 pm
-
How does the cppcheck plugin find the cppcheck executable?
I'm doing some testing of the latest (5458) on osx and I'm having some problem with cppcheck.
Output:
cppcheck --version
execvp(cppcheck, --version) failed with error 2!
switching working directory to : /test/
cppcheck --verbose --all --style --xml --file-list=CppCheckInput.txt
execvp(cppcheck, --verbose, --all, --style, --xml, --file-list=CppCheckInput.txt) failed with error 2!
Failed to parse cppcheck XML file.
Probably it's not produced correctly.
I'm guessing the plugin cant find the executable as even --version fails. Running cppcheck from a terminal the manual way works as it should.
-
it requires the executable to be in your PATH.
-
Or asks you for the full path to the executable.
See here: http://svn.berlios.de/wsvn/codeblocks/trunk/src/plugins/contrib/CppCheck/CppCheck.cpp?peg=7458
in CppCheck::DoCppCheckVersion().
-
Well I have it in my PATH, and use it frequently, and I was not asked about it's location so it must be something else. But as I run out of batteries I'm now back in windows so I'll have to wait until work tomorrow before I can continue.
But there are no settings or options regarding the cppcheck plugin, right? At least I could not find any.
-
No settings, as far as I know.
You can try to use strace (or the equivalent on MacOSX, dtrace I think) to see what is really happening.
-
Never heard of dtrace, I'm kind of new to osx, but I'll give it a try.