mac book pro macOS10.13.3安装qt、qt creator C++开发环境,qt5.11.1,并解决cmake构建:qt mac this file is not part of any project the code

摘要:
然后,您需要检查配置。我指的是网上支票。如果您不喜欢qtcreator的自动配置,可以安装您喜欢的版本,然后在qtversions中找到qt安装路径。

因为之前在Ubuntu下使用的是qtcreator开发,现在想在mac上装一个系统,因为许久未装了,还是花了点时间,不如写个博客,下次就更快安装了。在Mac OS X下使用Qt开发,需要配置Qt库和编译器。编译器只能使用苹果公司自主研发的Clang。

首先是:

下载:Command_Line_Tools_macOS,我的是macOS10.13.3:

https://download.developer.apple.com/Developer_Tools/Command_Line_Tools_macOS_10.13_for_Xcode_10_Beta_3/Command_Line_Tools_macOS_10.13_for_Xcode_10_Beta_3.dmg

然后,下载:Xcode_9.4.1,

https://download.developer.apple.com/Developer_Tools/Xcode_9.4.1/Xcode_9.4.1.xip

上面两个安装都很简单,双击默认就行。

然后,安装qt和qtcreator,网上很多是分开安装的,但是qt5.11.1里面是有qtcreator的,下载qt5.11.1:

https://mirrors.tuna.tsinghua.edu.cn/qt/archive/qt/5.11/5.11.1/qt-opensource-mac-x64-5.11.1.dmg

双击,进入下图:

 mac book pro macOS10.13.3安装qt、qt creator C++开发环境,qt5.11.1,并解决cmake构建:qt mac this file is not part of any project the code第1张

mac book pro macOS10.13.3安装qt、qt creator C++开发环境,qt5.11.1,并解决cmake构建:qt mac this file is not part of any project the code第2张

mac book pro macOS10.13.3安装qt、qt creator C++开发环境,qt5.11.1,并解决cmake构建:qt mac this file is not part of any project the code第3张

mac book pro macOS10.13.3安装qt、qt creator C++开发环境,qt5.11.1,并解决cmake构建:qt mac this file is not part of any project the code第4张

 基本组件如下,macos要选择,否则,在后面qt version中没有value(就是找不到qmake)

mac book pro macOS10.13.3安装qt、qt creator C++开发环境,qt5.11.1,并解决cmake构建:qt mac this file is not part of any project the code第5张

后面就是漫长的安装。。。  然后,需要检查配置,我是参考网上的检查,如果是自己不喜欢它自动配置qt creator可以自己安装自己喜欢的版本,然后再在qt versions那边找到你qt安装的路径就可以了。后面,主要参考:https://blog.csdn.net/libaineu2004/article/details/46234079

配置Qt

(1)运行Qt Creator。进入“菜单","Qt Creator","偏好设置"。可以看到,”编译器“和”调试器“,已经默认设置好了。

 mac book pro macOS10.13.3安装qt、qt creator C++开发环境,qt5.11.1,并解决cmake构建:qt mac this file is not part of any project the code第6张

mac book pro macOS10.13.3安装qt、qt creator C++开发环境,qt5.11.1,并解决cmake构建:qt mac this file is not part of any project the code第7张

2)用户需要手动配置Qt版本,记住,这里版本路径是找到qmake,如果上面qt安装没有勾选☑️macOS是不会安装qmake的,一般使用默认qtcreator,会自动给你配置好

mac book pro macOS10.13.3安装qt、qt creator C++开发环境,qt5.11.1,并解决cmake构建:qt mac this file is not part of any project the code第8张

 至此,qt qtcreator已经安装好,可以用了,但是我一般喜欢使用cmake构建,所以在新建 非qt工程->c++ 选择cmake 构建时,报错

         this file is not part of any project the code......

 其实,是我本机没有装cmake:

$ brew install cmak

 就可以了,如果还不行,需要在qt creator上重新build一下,(之前没有cmake,build不成,所以导致debug和run按钮都是灰的)

mac book pro macOS10.13.3安装qt、qt creator C++开发环境,qt5.11.1,并解决cmake构建:qt mac this file is not part of any project the code第9张

免责声明:文章转载自《mac book pro macOS10.13.3安装qt、qt creator C++开发环境,qt5.11.1,并解决cmake构建:qt mac this file is not part of any project the code》仅用于学习参考。如对内容有疑问,请及时联系本站处理。

上篇JS判断鼠标移入元素的方向System.AccessViolationException,尝试读取或写入受保护的内存。这通常指示其他内存已损坏。下篇

宿迁高防,2C2G15M,22元/月;香港BGP,2C5G5M,25元/月 雨云优惠码:MjYwNzM=

相关文章

NX二次开发-Ufun C函数例子目录【更新日期2020.7.5】

外部开发模式exe(不打开NX进行后台操作)以及封装exe传参调用 https://www.cnblogs.com/nxopen2018/p/12386103.html 图为张弛每天幻想开车 飞驰人生-张弛一段很励志的话:当拉力赛车在我身边呼啸而过,我知道!这将是我的一生热爱,我将为此一直奋斗! UF公共类型 1 UF_beg...

(转)postman安装及简单使用

Postman安装与使用 Postman一款非常流行的API调试工具。其实,开发人员用的更多。因为测试人员做接口测试会有更多选择,例如Jmeter、soapUI等。不过,对于开发过程中去调试接口,Postman确实足够的简单方便,而且功能强大。 官方网站:https://www.getpostman.com/ 安装: 1、Postman最早是作用chro...

【hbase】【windows】安装及启动

参考文章:https://www.jianshu.com/p/db33aaa566cd 由于担心这么好的文章可能被删除等原因,所有一下基本都复制内容过来 1、环境、安装包等 JDK1.8.0_192(下载地址:https://www.oracle.com/java/technologies/javase/javase8-archive-downloads....

解决Chrome浏览器访问https提示“您的连接不是私密连接”的问题

安装fiddler后,使用Chrome访问https网站时,可能会出现以下错误,本文说明如何解决此类问题: “您的连接不是私密连接”、“NET::ERR_CERT_AUTHORITY_INVALID”、“ERR_CERT_COMMON_NAME_INVALID”或“NET::ERR_CERT_WEAK_SIGNATURE_ALGORITHM” Step...

ThinkPad X1 Carbon 2016 (4th)安装黑苹果MacOS High Sierra(10.13)

原文参考:https://forum.51nb.com/forum.php?mod=viewthread&tid=1808874&extra=page=1&page=1 不同的是,maj的配置是i7,我的是i5,主板芯片组也不一样。他的EFI大部分能通用。 安装镜像:黑果小兵(macOS High Sierra 10.13.1(17...

GreenPlum 提取数据表信息

参考: https://www.alberton.info/postgresql_meta_info.html https://my.oschina.net/Kenyon/blog/226600 列信息: greenplum: https://www.alberton.info/postgresql_meta_info.html 系统表: greenpl...