I looked in the usual places (/usr/lib/,/Developer/usr/lib/,/usr/local/lib), and it isn't there.
If it isn't installed, does anyone know where I can find instructions to install it?
Thanks!
I'm not sure if I should close this, but I found the answer I was looking for:
In OS X, with XCode 4 installed, libclang.dylib is at /Developer/usr/clang-ide/lib/libclang.dylib
With the latest (appstore) XCode 4.3.2, the location changed, it can now be found in
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/libclang.dylib
The /Developer
directory, among others, no longer exists by default. Everything is now packaged inside the XCode application, so that delta updates from the appstore work.
You can always do a search of your filesystem. There are several ways.
On a Mac with Spotlight this is probably the best:
mdfind -name libclang.dylib
However most UNIX systems also have a locate database, which can be searched easily:
locate libclang.dylib
And when all else fails you can iterate through the file system (rather slowly) using find:
find / -type f -name libclang.dylib -o -name libclang.so
You'll get some errors about unreadable locations because they're only readable by root, but that's fine (hide these errors with 2> /dev/null
).
I found the answer:
In OS X, with XCode 4 installed, libclang.dylib is at /Developer/usr/clang-ide/lib/libclang.dylib
This is just posted for those who are interested in the answer.
On macOS Catalina (newest, as of posting) you can find it in the Xcode application, here:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/libclang.dylib
As well as outside of it if you just use Command Line Tools and you don't have Xcode.app installed, here:
/Library/Developer/CommandLineTools/usr/lib/libclang.dylib
As pointed out by @Daco Harkes the Xcode library does not include the Objective C headers, so you might want to use the Command Line Tools version anyway.
Additionally, this uses Apple's build of Clang which can be... quirky and doesn't implement all the newest features. So you might want to download the LLVM version, which you can download from their website or get from Homebrew's LLVM package (brew install llvm
).
When installed through Homebrew the library can be found at:
/usr/local/opt/llvm/lib/libclang.dylib
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With