cppcheck インストール
c言語のメモリリークを調べるツールとしてcppcheckをmacに入れてみる。
- macbook air OSX 10.7.5 Lion
- mac mini OSX 10.10 Yosemite
の両方に入れた。
手順としては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