Mac 上 qt 库的错误 Qt 路径
我遇到以下情况:
我在 Mac 上构建了一个 Qt 应用程序(它使用某些 Qt 库,例如 QtSql - 它动态链接到它们)。问题是,当我将应用程序发送到另一台计算机(或者可能只是“其他用户”)时,该应用程序将因错误而无法执行,该错误表明 QtSql.framework 丢失。
最烦人的是预期路径是/Users/MyUserName/QtSDK/path_to_the_lib_folder。我已经到了我不知道我还能做些什么来修复它的地步。
我听说我可以使用 qt.conf 文件更改默认的硬编码路径(并将框架添加到应用程序包中)。我使用了它,并且在日志文件中,QLibraryInfo 告诉我正确的修改路径。但是当我将其发送到另一台计算机时,我仍然看到“/Users/MyUserName/QtSDK/the_rest_of_the_path”的错误,告诉我找不到 qt 框架。
我想也许我也应该添加框架的 .la 文件,然后认为我必须修改它等等,但我尝试了一切,但没有任何效果。
I'm having the following situation:
I have built a Qt application on my Mac (it uses certain Qt libraries, like QtSql - it links to them dynamically). The problem is that when I ship the application to another computer (or perhaps it is only "other user"), the application won't execute because of an error, which says that QtSql.framework is missing.
The most annoying thing is that the expected path is /Users/MyUserName/QtSDK/path_to_the_lib_folder. I've gotten to the point where I don't know what I can do anymore to fix it.
I've heard that I can change the default hardcoded paths using a qt.conf file (and added the frameworks into the application bundle). I used it, and in a log file, the QLibraryInfo tells me the correct, modified path. But when I ship it to another computer, I still see the error with "/Users/MyUserName/QtSDK/the_rest_of_the_path" that tells me that the qt framework was not found.
I thought that perhaps I should add the .la file of the framework too, and then thought that I must modify it, etc. but everything I tried, nothing worked.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在 Mac 上部署时需要执行额外步骤:
http://doc.qt .nokia.com/stable/deployment-mac.html
并使用 qtdeploy 脚本:
http://labs.qt.nokia。 com/2007/08/23/deploying-mac-applications-without-the-hassle/
You need to do extra steps when deploying for the Mac:
http://doc.qt.nokia.com/stable/deployment-mac.html
and using the qtdeploy script:
http://labs.qt.nokia.com/2007/08/23/deploying-mac-applications-without-the-hassle/