0

Could somebody please help me get Clang up and running? (I don't have 3.2)

I've followed numerous tutorials (basically every link off of this page Using Clang Static Analyzer from within XCode) but I just cant get it to work!

The only thing I've managed to do successfully so far is download clang! Grrrr .... dubbeat smash!

Bear in mind I've never written an apple script before.

I have clang on my desktop

Community
  • 1
  • 1
dubbeat
  • 7,706
  • 18
  • 70
  • 122
  • Possible duplicate of [Using Clang Static Analyzer from within Xcode](https://stackoverflow.com/questions/961844/using-clang-static-analyzer-from-within-xcode) – user7610 Feb 01 '19 at 10:30

3 Answers3

1

The easiest way is to just update to Xcode 3.2.1 - using clang then becomes a no-brainer - nothing to install or configure - just set the compiler to Clang LLVM 1.0 in the project settings.

Paul R
  • 208,748
  • 37
  • 389
  • 560
  • Do you know if 3.2 can be downloaded at all instead of being posted on cd ? – dubbeat Mar 26 '10 at 10:01
  • I'll admit defeat & get 3.2. Just out of curiosity Could you help me understand this error? Last login: Fri Mar 26 09:02:51 on console cd '/Users/dub/Desktop/Barry Apps/MyApp2';scan-build xcodebuild -configuration Debug clean;scan-build -V xcodebuild -configuration Debug dubs-mac:~ dub$ cd '/Users/dub/Desktop/Barry Apps/MyApp2';scan-build xcodebuild -configuration Debug clean;scan-build -V xcodebuild -configuration Debug -bash: scan-build: command not found -bash: scan-build: command not found dubs-mac-mini:MyApp2 dub$ – dubbeat Mar 26 '10 at 10:16
  • No idea - sorry - what's scan-build ? Is that the Clang static analysis driver for Xcode ? – Paul R Mar 26 '10 at 10:34
  • It sure is. I was working off of this tutorial http://allancraig.net/blog/?p=381. No Biggie, was just curious what I doing wrong – dubbeat Mar 26 '10 at 14:52
  • I think that tutorial is now pretty much redundant since Xcode 3.2 was released with Clang LLVM. Have fun. – Paul R Mar 26 '10 at 16:28
0

I don't user the Clang Static Analyzer but there's a built in static analysis in XCode 3.2:

http://developer.apple.com/mac/library/featuredarticles/StaticAnalysis/index.html

schaechtele
  • 1,130
  • 1
  • 9
  • 12
  • That is the same thing, just different builds of it, depending only whether you get it built in from Apple, or whether you fetch it yourself (for example, to have a newer version). https://clang-analyzer.llvm.org/xcode.html – user7610 Feb 01 '19 at 10:25
0

Either use the version bundled in XCode, or download a newer version at https://clang-analyzer.llvm.org/ then see some additional instructions at https://clang-analyzer.llvm.org/xcode.html to switch XCode to that downloaded version.

The question you've linked is quite old and the information is out-of-date, I would not refer to it much, any more.

user7610
  • 25,267
  • 15
  • 124
  • 150