install_name_tool 不执行任何操作
我正在准备在 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
你尝试了吗
?您可能需要使用完整的当前安装名称,如
otool -L
上所示。Did you try
? You likely need to use the full current install name as shown on
otool -L
.