我应该在哪里放置动态库(dynlib)来链接到 Cocoa 应用程序?

发布于 2024-12-17 04:58:36 字数 268 浏览 4 评论 0原文

假设我要使用一些可通过自动工具安装在我的 Cocoa 应用程序中的库。我应该把它“放置”在哪里?我应该运行 ./configure && make 然后将 .dynlib 复制到我的 Xcode 项目中?还是执行 ./configure && 更好?制作&& sudo make install 然后配置我的项目以链接到它?在后一种情况下,Xcode 构建器是否足够聪明,可以将库复制到捆绑包中?

Suppose I am going to use some library that is installable through autotools in my Cocoa application. Where should I "place" it? Should I run ./configure && make and then copy the .dynlib it to my Xcode project? Or is it better to execute ./configure && make && sudo make install and then configure my project to link to it? In the latter case, would the Xcode builder be smart enough to copy the library to the bundle?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

梦里兽 2024-12-24 04:58:36

我不再使用 Mac OS X。无论如何,我相信首选的解决方案是静态链接到库或将 .dynlib 包含在捆绑包中。

(我尝试使用 autotools (又名 ./configure && make && sudo make install)安装库,然后将参数添加到项目配置中;结果是我的应用程序在未安装该库的任何机器上都不起作用。)

I am not working with Mac OS X anymore. Anyway, I believe the preferred solution is either to link to the library statically or include the .dynlib in the bundle.

(I tried to install the library using autotools (aka ./configure && make && sudo make install) and then add the parameters to the project configuration; the result was that my application did not work in any machine where the library was not installed.)

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文