简体   繁体   English

对于qt-creator缺少一个mac的qmake

[英]qmake on a mac missing for qt-creator

I am working on Mac OS X at the moment, and wanted to start building apps using Qt Creator . 我目前正在使用Mac OS X,并希望使用Qt Creator开始构建应用程序。 Unfortunately i can't build any applications as it gives me an error saying that qmake's path is not found or qmake is missing . 不幸的是我无法构建任何应用程序,因为它给我一个错误,说没有找到qmake的路径或缺少qmake

I tried using netbeans, which works perfectly with simple c/c++ programs, but for qt apps it then gives me the same error. 我尝试使用netbeans,它与简单的c / c ++程序完美配合,但对于qt应用程序,它会给我同样的错误。 My version of Xcode 4 works perfectly and builds without any problems. 我的Xcode 4版本运行完美,构建没有任何问题。

Any ideas? 有任何想法吗?

Thanks :) 谢谢 :)

仅下载Qt Creator是不够的,您需要下载完整的sdk: http//qt.nokia.com/downloads (几乎1GiB)

My Macbook is no longer my primary computer. 我的Macbook不再是我的主要计算机。 But, when it was, I found out through painful experiences that it was best to install software from MacPorts whenever what you wanted was available from http://www.macports.org/ 但是,当它出现时,我通过痛苦的经历发现,最好是从MacPorts安装软件,只要你想要的东西可以从http://www.macports.org/获得

Even more important, I also discovered that when software was not offered from MacPorts, it was invariably because that particular software did not install without some sort of tweaking on a Mac. 更重要的是,我还发现,当MacPorts没有提供软件时,它总是因为没有在Mac上进行某种调整而没有安装特定的软件。 Hence, since Macports does not currently offer Qt v5, and I had problems installing the qt-project.com Qt v5.2.1 SDK on my Macbook, I would advise to go with the MacPort for Qt v4.8.5 [qt4-mac] which includes qmake. 因此,由于Macports目前没有提供Qt v5,而且我在Macbook上安装qt-project.com Qt v5.2.1 SDK时出现问题,我建议使用MacPort for Qt v4.8.5 [qt4-mac]包括qmake。 Qt Creator is available as a separate MacPort [qt4-creator-mac]. Qt Creator可作为单独的MacPort [qt4-creator-mac]使用。

Here is how I successfully installed Qt v4.8.5 [with qmake] and Qt Creator on my Macbook: 以下是我在Macbook上成功安装Qt v4.8.5 [与qmake]和Qt Creator的方法:

1) 'sudo port install qt4-mac' 1)'sudo port install qt4-mac'

2) 'sudo port install qt4-creator-mac' 2)'sudo port install qt4-creator-mac'

3) I used Finder to run Qt Creator which was in the /Applications/MacPorts/Qt4 folder. 3)我使用Finder运行Qt Creator,它位于/ Applications / MacPorts / Qt4文件夹中。

4) When I first ran Qt Creator, its Preferences dialog listed the auto-installed Desktop kit, but that kit had no Qt version, no qmake, and no debugger. 4)当我第一次运行Qt Creator时,其首选项对话框列出了自动安装的桌面套件,但该套件没有Qt版本,没有qmake,也没有调试器。

5) Manually added a second kit. 5)手动添加第二个工具包。

6) Configured kit's Qt version for /opt/local/bin/qmake, which is where qt4-mac installed qmake. 6)配置套件的/ opt / local / bin / qmake的Qt版本,这是qt4-mac安装qmake的地方。 This was enough for the kit to now discover Qt v4.8.5 which had been installed by qt4-mac. 这足以让套件现在发现由qt4-mac安装的Qt v4.8.5。

7) Used kit's auto-detect feature to now discover the debugger. 7)使用套件的自动检测功能现在发现调试器。

8) Configured that kit to be the default kit. 8)将该套件配置为默认套件。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM