clang_complete: OS X 中的 libclang.{so,dylib} 在哪里?
我查看了通常的位置(/usr/lib/、/Developer/usr/lib/、/usr/local/lib),但它不在那里。
如果未安装,有人知道在哪里可以找到安装说明吗?
谢谢!
我不确定是否应该关闭它,但我找到了我正在寻找的答案:
In OS X, with XCode 4installed, libclang.dylib is at /Developer/usr/clang-ide/lib/libclang.dylib
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
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
使用最新的(appstore)XCode 4.3.2,位置发生了变化,现在可以在
/Developer
目录中找到,除此之外,默认情况下不再存在。现在所有内容都打包在 XCode 应用程序内,以便应用程序商店的增量更新可以正常工作。
With the latest (appstore) XCode 4.3.2, the location changed, it can now be found in
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.您始终可以搜索文件系统。有几种方法。
在带有 Spotlight 的 Mac 上,这可能是最好的:
然而,大多数 UNIX 系统也有一个定位数据库,可以轻松搜索它:
当所有其他方法都失败时,您可以使用 find 迭代文件系统(相当慢):
您将得到一些关于不可读位置的错误,因为它们只能由 root 读取,但这没关系(使用
2> /dev/null
隐藏这些错误)。You can always do a search of your filesystem. There are several ways.
On a Mac with Spotlight this is probably the best:
However most UNIX systems also have a locate database, which can be searched easily:
And when all else fails you can iterate through the file system (rather slowly) using find:
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
).我找到了答案:
在 OS X 中,安装了 XCode 4,libclang.dylib 位于 /Developer/usr/clang-ide/lib/libclang.dylib
这只是为那些对答案感兴趣的人发布的。
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.
在 macOS Catalina(最新的,截至发布时)上,您可以在 Xcode 应用程序中找到它,此处:
以及在它之外,如果您只使用命令行工具并且没有安装 Xcode.app,此处:
正如所指出的作者:@Daco Harkes Xcode 库不包含 Objective C 标头,因此您可能需要使用命令行无论如何,工具版本。
此外,它使用了 Apple 的 Clang 版本,它可能......很奇怪,并且没有实现所有最新功能。因此,您可能想要下载 LLVM 版本,您可以从他们的网站下载或从 Homebrew 的 LLVM 获取包(
brew install llvm
)。通过 Homebrew 安装后,可以在以下位置找到该库:
On macOS Catalina (newest, as of posting) you can find it in the Xcode application, here:
As well as outside of it if you just use Command Line Tools and you don't have Xcode.app installed, here:
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:
在 Xcode.app 包中
通常有两个副本:
与 Python 结合使用以及在
pip install clang
之后In the Xcode.app bundle
Typically, two copies:
In conjunction with Python and after
pip install clang