当前位置:网站首页>Cmake qmake simple knowledge
Cmake qmake simple knowledge
2022-04-23 03:36:00 【Crispy eggplant strips】
CMake(Cross platform Make) It is an open source cross platform automatic construction tool , It can generate all kinds of... Across platforms makefile perhaps project file , Support the use of various compilation tools to generate executable programs or link libraries .
CMake Don't compile the program yourself , It's equivalent to using your own build script CMakeLists.txt, Call various compilation toolsets to generate executable programs or link libraries .
Generally used to compile programs makefile The files are complicated , It's more troublesome to write by yourself , And the use of CMake , You can write relatively simple CMakeLists.txt , from CMake according to CMakeLists.txt Automatic generation makefile, And then you can use it make Generate executable programs or link libraries .
qmake by QT Project building tools , Can generate cross platform .pro Project documents , It can generate corresponding files according to different operating systems and compiling tools Makefile, Used to build executable programs or link libraries .
Qt Use .pro Document management project ;
VC++ Then use .vcproj As a project file .
Integrated development environments are usually based on project documents (.pro/.vcproj) Manage and build projects .
Makefile
That is, generate script , Although you can call the compiler directly, such as g++ compiler , But if there are more code files in the project , Which code files have been updated and need to be recompiled , Which code has not been changed and does not need to be recompiled, etc , It's troublesome to rely on the programmer's own memory , What other code needs to be preprocessed or linked to which library files , These are complicated processes . In order to standardize the compilation and generation process of the program , Generated a standardized generation script , Namely Makefile, generator make According to the standard Makefile Automatically generate target program or library files .
To put it simply , Is to define Makefile , Let programmers just focus on how to write code , And all the dirty work in the process of generating the program is handed over to make Program .
Now? Makefile There are usually tools to automatically generate , Such as qmake Tools , This greatly reduces the burden on programmers .
Makefile
That is, generate script , Although you can call the compiler directly, such as g++ compiler , But if there are more code files in the project , Which code files have been updated and need to be recompiled , Which code has not been changed and does not need to be recompiled, etc , It's troublesome to rely on the programmer's own memory , What other code needs to be preprocessed or linked to which library files , These are complicated processes . In order to standardize the compilation and generation process of the program , Generated a standardized generation script , Namely Makefile, generator make According to the standard Makefile Automatically generate target program or library files . To put it simply , Is to define Makefile , Let programmers just focus on how to write code , And all the dirty work in the process of generating the program is handed over to make Program .
Now? Makefile There are usually tools to automatically generate , Such as qmake Tools , This greatly reduces the burden on programmers .
Linux/Unix The extension of static library in the system is generally .a, The dynamic library extension is generally .so .Windows In the system VC The static library extension used by the compiler is generally .lib, The dynamic library extension is generally .dll .
windeployqt yes Qt Provided Windows Platform packaging tool , It can find StuInfoFile.exe All dynamic link libraries required for executable files , And copy them to the current folder .
版权声明
本文为[Crispy eggplant strips]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204220602451602.html
边栏推荐
- Punch in: 4.23 C language chapter - (1) first knowledge of C language - (12) structure
- MySQL zip installation tutorial
- Websites frequented by old programmers (continuously updated)
- C-11 problem I: find balloon
- Applet - WXS
- On the principle of concurrent programming and the art of notify / Park
- 2022 团体程序设计天梯赛 模拟赛 L2-3 浪漫侧影 (25 分)
- [microservices] (x) -- Unified gateway
- Leetcode punch in diary day 01
- Super easy to use asynchronous export function of Excel
猜你喜欢

Common auxiliary classes

2022 团体程序设计天梯赛 模拟赛 L2-3 浪漫侧影 (25 分)

PyMOL usage

STM32 advanced timer com event

The art of concurrent programming (2): synchronized usage scenarios

C interface

Development record of primary sensitive word detection

Unity knowledge points (ugui)

Software testing process

Translation of l1-7 matrix columns in 2022 group programming ladder Simulation Competition (20 points)
随机推荐
String input problem
2022 group programming ladder game simulation L2-4 Zhezhi game (25 points)
Visual programming -- how to customize the mouse cursor
Wechat applet canvas draws a simple asymptotic color of the dashboard
深度學習筆記(二)——激活函數原理與實現
Activity supports multi window display
Super easy to use [general excel import function]
QT learning summary
7-3 poly width
C-11 problem h: treasure chest 2
On the principle of concurrent programming and the art of notify / Park
STM32 advanced timer com event
Identificateur, mot - clé, type de données
Scenario Title: how does system a use the page of system B
Test questions (2)
L3-011 direct attack Huanglong (30 points)
Design and implementation of redis (4): what is the event driver of redis
There is no index in the database table. When inserting data, SQL statements are used to prevent repeated addition (Reprint)
第四次作业
ThreadLocal test multithreaded variable instance