智慧屏 安装 app如何提升家庭娱乐与教育体验的关键工具
698
2022-08-27
【QT】Create subdirs project with qt creator
本文例子是在《foundations of Qt Development》p462的 Building Complex Projects with QMake小节的基础上建立起来的,本次实验在Mac上进行的,前面的几张截图是在Win7上得来的,不必在意。
最终想要得到的目录结构:
step1 create root directory
step 2 create app directory
step3 create src directory
step 4 write content for src pro file
TARGET = baseVERSION = 0.1.0CONFIG = staticDESTDIR = ../libINCLUDEPATH += ../includeDEPENDPATH += . ../includeSOURCES += base.cppHEADERS += base.h
The difference of DEPENDPATH and INCLUDEPATH: INCLUDEPATH is used to search header files, DEPENDPATH is important for recompile. Relative discussion link: is used during compilation to find included header files. DEPENDPATH is used to resolve dependencies between header and source files, eg. which source files need to be recompiled when certain header file changes. If you modify a header file in folder foo/ and foo/ is not listed in DEPENDPATH, nothing gets recompiled. If foo/ is listed in DEPENDPATH, source files depending on that header will get recompiled. Paths can be relative to the .pro file or absolute paths.
clang: error: invalid deployment target for -stdlib=libc++ (requires OS X 10.7 or later):
我们可以在pro file中人为设定deploy的version
QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.13message( "This is a message about deploy target: " )message( $$QMAKE_MACOSX_DEPLOYMENT_TARGET )
在MacOS升级到10.14后,QT build工程的时候一直有10.14SDK没有被QT测试的警告信息:
我们可以加上:CONFIG += sdk_no_version_check 屏蔽这些烦人的警告。
查看build的东西:
运行程序:
工程上传于:https://github.com/theArcticOcean/qtLib/tree/master/complex
版权声明:本文内容由网络用户投稿,版权归原作者所有,本站不拥有其著作权,亦不承担相应法律责任。如果您发现本站中有涉嫌抄袭或描述失实的内容,请联系我们jiasou666@gmail.com 处理,核实后本网站将在24小时内删除侵权内容。
发表评论
暂时没有评论,来抢沙发吧~