News:

Accounts with zero posts and zero activity during the last months will be deleted periodically to fight SPAM!

Main Menu

C::B & cppcheck plugin configuration

Started by slacis, February 02, 2014, 01:26:49 PM

Previous topic - Next topic

slacis

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?

slacis

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.

oBFusCATed

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!]

slacis

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)

oBFusCATed

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!]

ollydbg

Quote from: slacis on February 02, 2014, 01:26:49 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.

slacis

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

oBFusCATed

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!]

jmh8743

#8
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