当前位置:网站首页>Compile and build, from the bottom to the top
Compile and build, from the bottom to the top
2022-07-06 17:38:00 【Wzzzzzzx】
In ancient times
In the beginning , We only have one on hand gcc. No matter what you do, you have a shuttle , Call directly gcc To compile a project . When there are not many project documents, it can really meet the needs . But many people work together , When the project gets bigger , This method is extremely easy to cause confusion , And the workload is too large .
Feudal period
Then we have make and makefile. This is a fully automated solution , It can be based on the rules we define , Automatically compile and build . A project will have different functions , modular , Put all kinds of source code files in categories by type and other methods , Resource file , The temporary file . and makefile The job is to define the Compilation Rules of the whole project . These rules indicate which files need to be compiled first , Which can be post compiled . Besides ,makefile It can effectively describe the dependencies between project files and process commands , When only individual files are modified, only necessary processing needs to be performed , You don't have to recompile the whole project , Greatly improved development efficiency .
however make There are two problems . One is when the project is big ,makefile It will be very difficult to write and understand , Maintainability is not strong . The second is the problem of cross platform , Every time I change the platform , All need to be revised makefile.
the Republic of China era
Then there is CMake The era of the , Although it is in the period of the Republic of China in this article , but CMake It should be right now C/C++ The factual standard of how the project is built .CMake Is a cross platform compilation tool , My understanding is that it defines a compilation abstraction layer , Be able to generate all kinds of makefile/project For different platforms make Use . All we need to do is write it manually CMakeLists.txt file .
modern society
about Conan The cognitive , I think this is a higher level , Support different platforms / compiler / Building tools / Solution of construction mode . Although it is a package manager , But we can use its scripted operation to build packaging , Download upload package , Solve the problem of dependence .Conan It needs to be used with various construction tools , However, these build scripts do not need to consider various specific configurations when implementing, such as Debug still Release,64 A still 32 position , Static library or dynamic link library , Even the package installation can be ignored ,Conan Can be completed with the help of scripts , Specific usage can refer to This blog . secondly ,Conan It also solves the problem of dependency , When building, it can automatically pull the corresponding dependency Library .
边栏推荐
- 华为认证云计算HICA
- Xin'an Second Edition: Chapter 24 industrial control safety demand analysis and safety protection engineering learning notes
- JVM garbage collector part 1
- mysql的列的数据类型详解
- 复盘网鼎杯Re-Signal Writeup
- C# WinForm中DataGridView单元格显示图片
- Xin'an Second Edition; Chapter 11 learning notes on the principle and application of network physical isolation technology
- Distributed (consistency protocol) leader election (dotnext.net.cluster implements raft election)
- 【MySQL入门】第四话 · 和kiko一起探索MySQL中的运算符
- 远程代码执行渗透测试——B模块测试
猜你喜欢

信息与网络安全期末复习(基于老师给的重点)

轻量级计划服务工具研发与实践

The NTFS format converter (convert.exe) is missing from the current system

Learn the wisdom of investment Masters

PySpark算子处理空间数据全解析(4): 先说说空间运算

Program counter of JVM runtime data area

02 personal developed products and promotion - SMS platform
![[reverse primary] Unique](/img/80/9fcef27863facc9066e48f221c6686.png)
[reverse primary] Unique

04 products and promotion developed by individuals - data push tool

Huawei certified cloud computing hica
随机推荐
JVM garbage collector part 1
Total / statistics function of MySQL
Case: check the empty field [annotation + reflection + custom exception]
集成开发管理平台
2021-03-22 "display login screen during recovery" can't be canceled. The appearance of lock screen interface leads to the solution that the remotely connected virtual machine can't work normally
自动化运维利器ansible基础
Flink analysis (II): analysis of backpressure mechanism
mysql的列的数据类型详解
JVM 垃圾回收器之Serial SerialOld ParNew
Precipitated database operation class - version C (SQL Server)
Program counter of JVM runtime data area
Automatic operation and maintenance sharp weapon ansible Playbook
DataGridView scroll bar positioning in C WinForm
Flink analysis (I): basic concept analysis
分布式(一致性协议)之领导人选举( DotNext.Net.Cluster 实现Raft 选举 )
华为认证云计算HICA
Interpretation of Flink source code (II): Interpretation of jobgraph source code
Wu Jun's trilogy experience (VII) the essence of Commerce
BearPi-HM_ Nano development environment
07 personal R & D products and promotion - human resources information management system