在 Xcode 中开发 QT 应用程序?
我选择的 Mac IDE(至少对于 C++ 和 Objective-C 开发)是 Xcode。我有一台安装了 OS X Lion 的 64 位 Intel Mac,并从 Mac App Store 下载了 Xcode 版本 4.2。
我的问题是 Qt 显然与 Xcode 4 不兼容(启动 qmake 生成的项目时会崩溃),所以我基本上是在问如何将 Qt 与 Xcode 集成。我不必能够从 Xcode 运行和调试项目,只需构建它即可。
所以我认为这可能是在 Xcode 中使用 qmake 作为外部构建系统的解决方案,问题是我不知道如何将 qmake 设置为我的构建系统,以便我可以在 Xcode 4 中开发我的 Qt 应用程序。< br> 请帮我! :)
My IDE of choice for the Mac (at least for C++ and Objective-C development) is Xcode. I have a 64-bit Intel Mac with OS X Lion installed, and Xcode version 4.2 downloaded from the Mac App Store.
My problem is that Qt is apparently not compatible with Xcode 4 (it crashes when launching projects generated by qmake), so I'm basically asking how I can integrate Qt with Xcode. I don't have to be able to run and debug the project from Xcode, just build it.
So I thought it might be a solution to use qmake as an external build system within Xcode, the problem is that I have no idea how to set up qmake as my build system, so that I can develop my Qt applications in Xcode 4.
Please help me! :)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
Google 显示了很多页面,但是这个
Qt4 with Xcode页面第一眼就出现了成为相当明确的资源。不过,最后一次更改是在 2006 年。请查看:
http:// /qt-project.org/doc/qt-5/macosx.html有一个更新的Qt 开发者网络论坛帖子 似乎有里面有很好的信息。具体来说,2011 年 8 月 19 日的回复 给出了完整的食谱。
2016 年 5 月 25 日更新:
前两个链接现已失效,并且由于
robots.txt
的原因未存档。不过,我已经更新了论坛帖子的链接。
这是埃米格尔的答案的副本。现在已经5年了,所以我不知道它现在还如何。
最后,有关在 Xcode 中构建 Qt 的最新信息可在 Qt for OS 中找到X - 太长了,无法复制到这里,将由 Qt 维护和更新......
Google shows up many pages, but this
Qt4 with Xcodepage appeared at first glance to be a fairly definitive resource. However, it was last changed in 2006.Please check out:
http://qt-project.org/doc/qt-5/macosx.htmlThere is a much more recent Qt Developer Network forum post that seems to have good info in it. Specifically, this reply from August 19, 2011 gives a complete recipe.
Update 25/05/2016:
The first two links are now dead, and not archived due to
robots.txt
.However, I've updated the link to the forum post.
And here's a copy of emiguel's answer. It is now 5 years old, so I don't know how current it still is.
Finally, current information on building Qt in Xcode is available in Qt for OS X - which is too long to copy here, and will be maintained and updated by Qt...