当前位置:网站首页>1217_ Generating target files using scons
1217_ Generating target files using scons
2022-04-23 17:36:00 【grey_ csdn】
All learning summary : GitHub - GreyZhang/g_SCons: A new member in my toolbox, looking forward to replacing make tool later.
In the use of Makefile When , Generate executable files 、 In fact, there is not much difference in syntax between binary file and generated object file , All to be generated target. The difference is that the execution of rules is different , After all, different commands and even different tools are called .
stay SCons in ,target Such a form of idea has been changed , It seems that this tool is more focused on sub processes when managing the construction process . and , Even the official manual , It seems that the generation of the target file is also separated into a separate small chapter .
such , Repeat this process according to the above example . Adopted hello.c It's used in previous tests , The content is also simple , Don't list .
create profile SConstruct, And write it down . function scons, The effect is as follows :
This is Anyang , You can see the effect of running , The difference from the above tips is that the default compiler is different . Actually , In the process of running, a dblite file , Look, the name should be a database file . You can list hidden files and see :
On the construction of compilation environment , I also considered using database to replace Makefile The way , I wrote my blog notes in my impression .
It is worth noting that , There is no executable file generated in this run . According to the document , Using different compiler tools on different platforms may have different effects , Generally used to illustrate Windows The compilers used in the platform are VS. In my own work projects ,VS Use less , More or similar POSIX This usage of .
I painted two key words in the document yellow , There is a reference to builder The concept of , More accurately, it should be builder method. This time to generate object Of documents Object Is a typical representative , Used to Program It should be . Count as sSCons A term in , I think it may be some meta operations in this tool system , Later, I need to master the accumulation of similar elements .
By the way, I would like to add a little knowledge that I haven't summarized before , That's it make clean Peer to peer operations . stay SCons The equivalent operation in is scons -c, The specific effects are as follows :
This function is already supported in the above simple configuration , It's more convenient . You can see that , In the initial starting process scons comparison Makefile There are still some advantages of simplicity .
Add a piece of knowledge : You can see from the screenshot of the previous compilation scons When compiling, a lot of prompt information is output , How to reduce such information output ? It can be executed scons -Q,-Q The parameters of can reduce the output information .
版权声明
本文为[grey_ csdn]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204231728376121.html
边栏推荐
- 470. 用 Rand7() 实现 Rand10()
- Signalr can actively send data from the server to the client
- Tdan over half
- Using quartz under. Net core -- a simple trigger of [7] operation and trigger
- 209. 长度最小的子数组-滑动窗口
- Shell-入门、变量、以及基本的语法
- 958. Complete binary tree test
- Conversion between hexadecimal numbers
- ASP. NET CORE3. 1. Solution to login failure after identity registers users
- 198. Looting - Dynamic Planning
猜你喜欢
常用SQL语句总结
STM32 entry development board choose wildfire or punctual atom?
Summary of common SQL statements
Matlab / Simulink simulation of double closed loop DC speed regulation system
Exercise: even sum, threshold segmentation and difference (two basic questions of list object)
JVM class loading mechanism
Using quartz under. Net core -- job attributes and exceptions of [4] jobs and triggers
470. 用 Rand7() 实现 Rand10()
快时钟同步慢时钟域下的异步控制信号slow clk to fast clk
2021长城杯WP
随机推荐
Shell-sed命令的使用
How to change input into text
Change Oracle to MySQL
Net standard
41. The first missing positive number
198. Looting - Dynamic Planning
Learning record of uni app dark horse yougou project (Part 2)
1217_使用SCons生成目标文件
matlab如何绘制已知公式的曲线图,Excel怎么绘制函数曲线图像?
2.Electron之HelloWorld
Ring back to origin problem - byte jumping high frequency problem
Excel quickly and automatically fills the contents of a row on a blank cell
122. The best time to buy and sell stocks II - one-time traversal
[二叉数] 二叉树的最大深度+N叉树的最大深度
Using quartz under. Net core - [1] quick start
C# Task. Delay and thread The difference between sleep
958. Complete binary tree test
Ouvrir des contrats à terme, ouvrir des comptes en nuage ou faire confiance aux logiciels des sociétés à terme?
For the space occupation of the software, please refer to the installation directory
Seven cattle upload pictures (foreground JS + background C API get token)