cppcheck インストール

c言語メモリリークを調べるツールとしてcppcheckをmacに入れてみる。

の両方に入れた。

手順としてはhomebrewをインストールしてhomebrew経由でcoocheckをインストール。

 


(1)homebrew をインストールする


$ ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

出力の最後に
Run `brew doctor` before you install anything
Run `brew help` to get started
と出てくる。

$ brew doctor

出力の最初は
Please note that these warnings are just used to help the Homebrew maintainers
with debugging if you file an issue. If everything you use Homebrew for is
working fine: please don't worry and just ignore them. Thanks!
となっている。
実際、たくさんのerror messageが出てくるが、気にしない。

(2) cppcheckをインストールする
$ brew install cppcheck


参考

http://brew.sh/index_ja.html
http://ttbf.redxxiii.com/archives/243