运行scan-build时出错"无法发现'ccc-analyzer'"

mam*_*mcx 3 debugging memory-leaks objective-c

我正在试图使用其他线程中建议的scan-build工具在我的项目chibi -ORM中发现泄漏.

但是当从终端运行时:

/Users/mamcx/Downloads/checker-0.138/scan-build  -k -V xcodebuild
Run Code Online (Sandbox Code Playgroud)

我明白了:

009-01-13 10:33:18.296 xcodebuild[14025:4213] Warning:  Couldn't discover the 'ccc-analyzer' compiler's built-in search paths and preprocessor definitions for language dialect 'objective-c'.  This may lead to indexing issues.
Compiler: /Users/mamcx/Downloads/checker-0.138/ccc-analyzer
Reason:   gcc-4.0: installation problem, cannot exec '/Developer/usr/bin/arm-apple-darwin9-gcc-4.0.1': No such file or directory
Run Code Online (Sandbox Code Playgroud)

但是,我可以从XCode Ide构建和调试.这是这个工具的问题,或者我的方面有什么问题?

Fra*_*rba 7

无需更改项目,只需将-sdk标志添加到xcodebuild命令,例如:

scan-build -k -V xcodebuild -configuration Debug -sdk iphonesimulator2.0
Run Code Online (Sandbox Code Playgroud)

您可以将2.0更改为2.1,2.2,2.2.1或3.0以匹配目标SDK.