Author Topic: C::B & cppcheck plugin configuration  (Read 16090 times)

Offline slacis

  • Single posting newcomer
  • *
  • Posts: 4
C::B & cppcheck plugin configuration
« on: February 02, 2014, 01:26:49 pm »
I am using C::B on windows.
When I choose Pugins>CppCheck I get error message
"Failed to launch cppcheck"
"Please setup the cppcheck executable accordingly in the settings"

Environment settings>CppCheck> expects executable "cppcheck.exe", C::B distribution has only CppCheck.dll

What do I need to do?

Offline slacis

  • Single posting newcomer
  • *
  • Posts: 4
Re: C::B & cppcheck plugin configuration
« Reply #1 on: February 02, 2014, 01:34:22 pm »
Well, now I have installed cppcheck separately and correspondingly indicated "cppcheck,exe". It works.
But I still have the old questions - how to configure C::B plugin?
C::B version: 13:12.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: C::B & cppcheck plugin configuration
« Reply #2 on: February 02, 2014, 01:42:53 pm »
What plugin? CppCheck?

Have you tried Settings -> Environment -> CppCheck?
(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 slacis

  • Single posting newcomer
  • *
  • Posts: 4
Re: C::B & cppcheck plugin configuration
« Reply #3 on: February 02, 2014, 02:08:55 pm »
Sure, I have tried, look my message above.
What I am tying to say is
1) default setting are not valid
2) I would like to know what exactly I should write in settings.

Does plugin needs cppcheck.exe? (cppcheck.exe is not included in C::B windows distribution)

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: C::B & cppcheck plugin configuration
« Reply #4 on: February 02, 2014, 03:20:26 pm »
1.They worked for me out of the box and I don't remember to have changed anything there.
2. cppcheck --help?
3. yes, of course it needs the cppcheck.exe and yes it is not included in the distribution, you have to install it manually.
(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 ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5915
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: C::B & cppcheck plugin configuration
« Reply #5 on: February 02, 2014, 04:04:37 pm »
Environment settings>CppCheck> expects executable "cppcheck.exe", C::B distribution has only CppCheck.dll
Don't be confused by the dll/exe names.
CppCheck.dll is the C::B plugin dll, usually located in \share\CodeBlocks\plugins\ folder.
But cppcheck.exe is an external tool should be obtained from cppcheck.sourceforge.net.

Surely, CppCheck.dll(C::B plugin) need to run cppcheck.exe to check files. :)



If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Offline slacis

  • Single posting newcomer
  • *
  • Posts: 4
Re: C::B & cppcheck plugin configuration
« Reply #6 on: February 02, 2014, 04:19:12 pm »
Thanks everybody !

Problem is solved for me.  :)

Probably it is good to write few lines in Help>Plugins>CppCheck
concerning installation of cppcheck.exe
It could help some plugins newbie like me ...

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: C::B & cppcheck plugin configuration
« Reply #7 on: February 02, 2014, 04:35:57 pm »
Patches welcome:)

This is the file you should edit: http://sourceforge.net/p/codeblocks/code/HEAD/tree/trunk/src/plugins/contrib/CppCheck/resources/manifest.xml

If you don't like to mess with svn/patches. Write it as a comment on the forum and I'll commit it.

(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 jmh8743

  • Single posting newcomer
  • *
  • Posts: 2
Re: C::B & cppcheck plugin configuration
« Reply #8 on: March 06, 2014, 05:47:27 pm »
Thanks for your help, got it found it, executed. Just came from VB6.
Installed on 2 machines. If you want comment I'll generate one for you.

Mike
« Last Edit: March 06, 2014, 05:50:32 pm by jmh8743 »