当前位置:网站首页>1215_ Hello world used by scons
1215_ Hello world used by scons
2022-04-23 02:36:00 【grey_ csdn】
All learning summary : https://github.com/GreyZhang/g_SCons
Try to understand earlier SCons When , With the help of seeing FAQ I have constructed a according to my own understanding hello world Routine for . Why add another one this time ? Because this time I see what is mentioned in the document “ The orthodox ” The way . I've tried the routine , Just take this opportunity to analyze SCons Several default behaviors .
The code example is still very simple , Use C Language of a file can .
The configuration file used this time is no longer a python Program files , But a simple configuration file without suffix . Above hello.c Create in the directory where the file is located SConstruct file , Add the following configuration information :
such , You have implemented a waiting to run build The environment . First , Try to Windows Running in the system :
This operation failed , Tip: the relevant build tool cannot be found . It can be seen here , stay windows The compiler suite that tools on the platform are looking for by default is actually Microsoft's VS. With learning before makefile The experience of , This let me know that this process is linux It may be simpler . such , Transfer to WSL Medium test . Default installed scons The versions are not the same , But the basic routine operation should not affect .
Switch to the WSL in , The default example is built successfully . After compiling , The running program also runs successfully . From the prompt above , differ makefile By default, it looks for cc As the default compiler .scons stay linux below , It seems that the default behavior is to use gcc. I think this is also a good choice , Although now gcc Not necessarily the best compiler , But it is definitely one of the most widely used compilers .
This routine is not the same effect as what I tossed around , The parameters used are also different . About windows The reason for failure in the environment is also very clear , install VS Provide default compiler selection or modify environment variables $CC. No modification , If you do this, you will have the same effect as before .
The code involved :
hello.c
#include "stdio.h"
int main(void)
{
printf("hello world!\n");
return 0;
}
版权声明
本文为[grey_ csdn]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204220815135601.html
边栏推荐
- Tp6 Alibaba Cloud SMS Window message Curl Error 60: SSL Certificate Problem: Unable to get local issuer Certificate
- 001_ Redis set survival time
- Explain JS prototype and prototype chain in detail
- How big the program development of single chip microcomputer project can be, it represents your level of knocking code
- Global, exclusive and local routing guard
- Consider defining a bean of type ‘com.netflix.discovery.AbstractDiscoveryClientOptionalArgs‘
- arduino esp8266 网络升级 OTA
- PTA: 点赞狂魔
- They are all intelligent in the whole house. What's the difference between aqara and homekit?
- IAR embedded development stm32f103c8t6 Lighting LED
猜你喜欢
Want to experience homekit smart home? Why don't you take a look at this smart ecosystem
本地远程访问云服务器的jupyter
New book recommendation - IPv6 technology and application (Ruijie version)
【2019-CVPR-3D人体姿态估计】Fast and Robust Multi-Person 3D Pose Estimation from Multiple Views
定了,今日起,本号粉丝可免费参与网易数据分析培训营!
一、序列模型-sequence model
[XJTU计算机网络安全与管理]第二讲 密码技术
The 16th day of sprint to the big factory, noip popularization Group Three Kingdoms game
This is how the power circuit is designed
Usage of vector common interface
随机推荐
leetcode 烹饪料理
JVM运行时数据区(一)
JSP page nesting
Real math problems in 1958 college entrance examination
【ValueError: math domain error】
002_ Redis_ Common operation commands of string type
If you want to learn SQL with a Mac, you should give yourself a good reason to buy a Mac and listen to your opinions
Usage of vector common interface
First day of rhcsa
小程序 读取文件
[chrome extender] content_ Cross domain problem of script
Understanding process (multithreading primary)
Hyperscan -- 2 compilation
IAR embedded development stm32f103c8t6 Lighting LED
The 16th day of sprint to the big factory, noip popularization Group Three Kingdoms game
Explain JS prototype and prototype chain in detail
十六、异常检测
Flink real-time data warehouse project - Design and implementation of DWS layer
每日一题(2022-04-21)——山羊拉丁文
013_ Analysis of SMS verification code login process based on session