当前位置:网站首页>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
边栏推荐
- Metaprogramming, proxy and reflection
- Change Oracle to MySQL
- Understanding and small examples of unity3d object pool
- 双闭环直流调速系统matlab/simulink仿真
- Using quartz under. Net core -- operation transfer parameters of [3] operation and trigger
- 48. Rotate image
- JS to find the character that appears three times in the string
- SiteServer CMS5. 0 Usage Summary
- Input file upload
- Solution of Navicat connecting Oracle library is not loaded
猜你喜欢

Qt error: /usr/bin/ld: cannot find -lGL: No such file or directory

XTask与Kotlin Coroutine的使用对比

Detailed explanation of C webpai route

Webapi + form form upload file

练习:求偶数和、阈值分割和求差( list 对象的两个基础小题)

Double pointer advanced -- leetcode title -- container with the most water

JS, entries(), keys(), values(), some(), object Assign() traversal array usage

Simulation of infrared wireless communication based on 51 single chip microcomputer
![[WPF binding 3] listview basic binding and data template binding](/img/2e/fbdb4175297bb4964a8ccfd0b909ae.png)
[WPF binding 3] listview basic binding and data template binding

RPC核心概念理解
随机推荐
Header built-in object
48. Rotate image
Simulation of infrared wireless communication based on 51 single chip microcomputer
[ES6] promise related (event loop, macro / micro task, promise, await / await)
C语言函数详解
ClickHouse-数据类型
.Net Core3. 1 use razorengine NETCORE production entity generator (MVC web version)
Flash project cross domain interception and DBM database learning [Baotou cultural and creative website development]
Low code development platform sorting
Why do some people say SCM is simple and I have to learn it so hard?
Baidu Map 3D rotation and tilt angle adjustment
Webapi + form form upload file
RPC核心概念理解
双指针进阶--leetcode题目--盛最多水的容器
剑指 Offer 22. 链表中倒数第k个节点-快慢指针
Self use learning notes - connectingstring configuration
Shell-sort命令的使用
Shell-awk命令的使用
If you start from zero according to the frame
node中,如何手动实现触发垃圾回收机制