当前位置:网站首页>Sublime text 3 configuring the C language running environment
Sublime text 3 configuring the C language running environment
2022-06-30 07:24:00 【Three stinky ginger】
Sublime Text 3 To configure C Language environment
List of articles
Preface
Because I found some tutorials before , Follow the tutorial to configure , Never succeeded , If you succeed this time, record your complete process , Hope to help more people .
1. Download and install MinGW
Simply speaking ,MinGW yes windows Under the gcc Tools , We all know gcc yes Linux The next compilation tool .
download :
① To the official website https://osdn.net/projects/mingw/ download :
Click the content in the box above and you will automatically download a exe file :
② Double-click on the run exe file .
Then you can see :
③ After modifying the path, click continue, Proceed to the next step to install , The following screen will appear :
At this point, some things are being automatically installed , We can wait . wait until 100% Then click continue The following screen will appear :
④ Check the box below , choice Mark for Installation.
⑤ Click on the menu bar Installation, choice Apply changes.

And then there will be :
Wait for the installation to complete . During this period, you may encounter the problem that some components fail to install , We can install it manually later .
After installation, the following contents will appear :

choice close Can be closed .
2. To configure MinGw Environment variables of
Open environment variable , System variables ->Path-> newly build , Add our previously selected path :
3. Check that the environment is installed successfully
open cmd Command line , Input :gcc -v You can see the following output :
Description installation successful .
4. stay Sublime Middle configuration C Language environment
Sublime The installation of is omitted . You can download and install the Chinese version directly here :https://sublimetextcn.com/3/
1️⃣ open Sublime, Select from the menu bar “ Tools ”->“ Compiling system ”->“ New compilation system ”.
2️⃣ Enter the following and save as C.( It is recommended to copy directly )
{
"cmd": ["gcc","-Wall", "${file}", "-o", "${file_path}/${file_base_name}"],
"file_regex": "^(..[^:]*):([0-9]+):?([0-9]+)?:? (.*)$",
"working_dir": "${file_path}",
"selector": "source.c, source.c++",
"encoding":"cp936",
"variants":
[
{
"name": "Run",
"cmd": ["cmd", "/c", "gcc", "-Wall","${file}", "-o", "${file_path}/${file_base_name}", "&&", "cmd", "/c", "${file_path}/${file_base_name}"]
},
{
"name": "RunInCommand",
"cmd": ["cmd", "/c", "gcc", "-Wall","${file}", "-o", "${file_path}/${file_base_name}", "&&", "start", "cmd", "/c", "${file_path}/${file_base_name} & echo.&pause"]
},
{
"name": "RunInShell",
"shell_cmd": " start cmd /c \"\"${file_path}/${file_base_name}\"&pause\" "
}
]
}

3️⃣ Later on Sublime I'll build a new one test.c file , Type in the following and save :
#include<stdio.h>
int main(int argc, char const *argv[])
{
printf("hello world!\n");
return 0;
}

4️⃣ Select... In the menu bar : Tools – Compiling system –C
5️⃣ Also select... In the menu bar : Tools – Compile now . If you haven't seen the output yet, continue to select... In the menu bar : Tools – function . You should see the output at the bottom :
thus , Configuration complete .
Reference link
1.http://c.biancheng.net/view/8077.html
2.https://blog.csdn.net/apple_2333/article/details/79300639
3.https://zhuanlan.zhihu.com/p/215841527
边栏推荐
- Binary tree traversal
- Starting MySQL ERROR! Couldn‘t find MySQL server (/usr/local/mysql/bin/mysqld_safe)
- Qdebug small details
- 线程池——C语言
- Daemon and user threads
- Network security ARP protocol and defense
- 嵌入式测试流程
- Raspberry pie trivial configuration
- Linux server installation redis
- Basic knowledge of system software development
猜你喜欢

Test enumeration types with STM32 platform running RT thread

What if I don't know what to do after graduating from university?

Raspberry pie trivial configuration

我今年毕业,但我不知道我要做什么

QT generate random number qrandomgenerator

系统软件开发基础知识

动态内存管理

Stm32g0 porting FreeRTOS

1285_ Expand macros defined by AUTOSAR functions and variables with scripts to improve readability

Win10 step pit - power on 0xc0000225
随机推荐
Matter protocol
線程池——C語言
QT msvc2015 compiler reports an error: error: lnk1158: unable to run "rc.exe"
将本地电脑文件复制到虚拟机系统中详细方法
QT signal slot alarm QObject:: connect:cannot connect (null)
Detailed analysis of message signals occupying multiple bytes and bits
模拟接口没声明异常抛出异常
【SemiDrive源码分析】【X9芯片启动流程】33 - Display模块 相关概念解析
Variable storage unit and pointer
Calculation and parameter quantity of neural network
RT thread kernel application development message queue experiment
Essence of signal slot macros signal and slot
Introduction to go language pointer
[resolved] MySQL exception: error 1045 (28000): unknown error 1045, forgetting the initial password
Lt268 the most convenient TFT-LCD serial port screen chip in the whole network
Install go language development tools
Class templates and friends
Out of class implementation of member function of class template
How crazy are young people in sideline industry: 3000 monthly salary and 3W sideline income
社招两年半10个公司28轮面试面经