Code::Blocks Forums

User forums => Help => Topic started by: slacis on February 02, 2014, 01:26:49 pm

Title: C::B & cppcheck plugin configuration
Post by: slacis 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?
Title: Re: C::B & cppcheck plugin configuration
Post by: slacis 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.
Title: Re: C::B & cppcheck plugin configuration
Post by: oBFusCATed on February 02, 2014, 01:42:53 pm
What plugin? CppCheck?

Have you tried Settings -> Environment -> CppCheck?
Title: Re: C::B & cppcheck plugin configuration
Post by: slacis 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)
Title: Re: C::B & cppcheck plugin configuration
Post by: oBFusCATed 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.
Title: Re: C::B & cppcheck plugin configuration
Post by: ollydbg 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. :)



Title: Re: C::B & cppcheck plugin configuration
Post by: slacis 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 ...
Title: Re: C::B & cppcheck plugin configuration
Post by: oBFusCATed 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.

Title: Re: C::B & cppcheck plugin configuration
Post by: jmh8743 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