Author Topic: How does the cppcheck plugin find the cppcheck executable?  (Read 9384 times)

Offline Calexus

  • Multiple posting newcomer
  • *
  • Posts: 48
How does the cppcheck plugin find the cppcheck executable?
« 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:

Quote
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.

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5529
Re: How does the cppcheck plugin find the cppcheck executable?
« Reply #1 on: September 20, 2011, 09:51:12 pm »
it requires the executable to be in your PATH.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13406
    • Travis build status
Re: How does the cppcheck plugin find the cppcheck executable?
« Reply #2 on: September 20, 2011, 09:53:20 pm »
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().
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline Calexus

  • Multiple posting newcomer
  • *
  • Posts: 48
Re: How does the cppcheck plugin find the cppcheck executable?
« Reply #3 on: September 20, 2011, 10:04:54 pm »
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.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13406
    • Travis build status
Re: How does the cppcheck plugin find the cppcheck executable?
« Reply #4 on: September 20, 2011, 10:33:22 pm »
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.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline Calexus

  • Multiple posting newcomer
  • *
  • Posts: 48
Re: How does the cppcheck plugin find the cppcheck executable?
« Reply #5 on: September 20, 2011, 10:38:11 pm »
Never heard of dtrace, I'm kind of new to osx, but I'll give it a try.