install_name_tool 不执行任何操作

发布于 2024-11-14 16:00:14 字数 1606 浏览 2 评论 0原文

我正在准备在 OSX 上部署我的应用程序。 唯一的问题是重新定位共享库。

我将它们全部放在 .app-folder 本身的 Frameworks-folder 中。

我对每个库的尝试类似于:

install_name_tool \
   -id @executable_path/../Frameworks/QtSql.framework/Versions/4/QtSql \
   MyProgram.app/Contents/MacOS/MyProgram


install_name_tool \
    -change QtSql @executable_path/../Frameworks/QtSql.framework/Versions/4/QtSql \
    MyProgram.app/Contents/MacOS/MyProgram

当我再次在可执行文件上运行 otool -L 时没有任何改变。这仍然是输出:

kqoauth.framework/Versions/0/kqoauth (compatibility version 0.95.0, current version 0.95.0)
QtDeclarative.framework/Versions/4/QtDeclarative (compatibility version 4.7.0, current version 4.7.3)
QtScript.framework/Versions/4/QtScript (compatibility version 4.7.0, current version 4.7.3)
QtCore.framework/Versions/4/QtCore (compatibility version 4.7.0, current version 4.7.3)
QtSvg.framework/Versions/4/QtSvg (compatibility version 4.7.0, current version 4.7.3)
QtGui.framework/Versions/4/QtGui (compatibility version 4.7.0, current version 4.7.3)
QtSql.framework/Versions/4/QtSql (compatibility version 4.7.0, current version 4.7.3)
QtXmlPatterns.framework/Versions/4/QtXmlPatterns (compatibility version 4.7.0, current version 4.7.3)
QtNetwork.framework/Versions/4/QtNetwork (compatibility version 4.7.0, current version 4.7.3)
/usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 7.9.0)
/usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 832.0.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 125.2.10)

我做错了什么?

I'm preparing my application for deployment on OSX.
The only problem is relocating the shared libraries.

I put them all inside a Frameworks-folder in the .app-folder itself.

What I try for every library is something like:

install_name_tool \
   -id @executable_path/../Frameworks/QtSql.framework/Versions/4/QtSql \
   MyProgram.app/Contents/MacOS/MyProgram


install_name_tool \
    -change QtSql @executable_path/../Frameworks/QtSql.framework/Versions/4/QtSql \
    MyProgram.app/Contents/MacOS/MyProgram

When I run otool -L on my executable again nothing changed.This is still the output:

kqoauth.framework/Versions/0/kqoauth (compatibility version 0.95.0, current version 0.95.0)
QtDeclarative.framework/Versions/4/QtDeclarative (compatibility version 4.7.0, current version 4.7.3)
QtScript.framework/Versions/4/QtScript (compatibility version 4.7.0, current version 4.7.3)
QtCore.framework/Versions/4/QtCore (compatibility version 4.7.0, current version 4.7.3)
QtSvg.framework/Versions/4/QtSvg (compatibility version 4.7.0, current version 4.7.3)
QtGui.framework/Versions/4/QtGui (compatibility version 4.7.0, current version 4.7.3)
QtSql.framework/Versions/4/QtSql (compatibility version 4.7.0, current version 4.7.3)
QtXmlPatterns.framework/Versions/4/QtXmlPatterns (compatibility version 4.7.0, current version 4.7.3)
QtNetwork.framework/Versions/4/QtNetwork (compatibility version 4.7.0, current version 4.7.3)
/usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 7.9.0)
/usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 832.0.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 125.2.10)

What am I doing wrong?

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

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

发布评论

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

评论(1

迎风吟唱 2024-11-21 16:00:14

你尝试了吗

install_name_tool \
    -change QtSql.framework/Versions/4/QtSql \
    @executable_path/../Frameworks/QtSql.framework/Versions/4/QtSql \
    MyProgram.app/Contents/MacOS/MyProgram

?您可能需要使用完整的当前安装名称,如 otool -L 上所示。

Did you try

install_name_tool \
    -change QtSql.framework/Versions/4/QtSql \
    @executable_path/../Frameworks/QtSql.framework/Versions/4/QtSql \
    MyProgram.app/Contents/MacOS/MyProgram

? You likely need to use the full current install name as shown on otool -L.

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