龙空技术网

超详细windows安装配置WSL2(ubuntu20.04)步骤

锦鲤与梨 168

前言:

如今看官们对“ubuntui686下载”大致比较关注,咱们都想要分析一些“ubuntui686下载”的相关内容。那么小编也在网上收集了一些关于“ubuntui686下载””的相关文章,希望你们能喜欢,朋友们一起来学习一下吧!

mingw-w64

1 下载

下载链接为

2 安装

2.1 双击打开安装程序

Version:gcc版本,选择最高的即可Architecture:64位选择x86_64,32位电脑选择i686Threads:操作系统接口协议,开发windows程序选择win32Exception:异常处理模型一般选择较新的sehBuild revision

2.2 选择完成之后即可开始安装

3 配置环境变量

3.1 我的电脑——属性——高级系统设置——环境变量选择系统变量中的path单击编辑

3.2 将Mingw-w64的安装路径加入path中,我这里安装路径是C:\Program Files\mingw-w64\x86_64-8.1.0-win32-seh-rt_v6-\rev0\mingw64\bin

4 测试

win+r打开cmd输入gcc -v检查是否安装成功

sublime text

1 配置C

1.1 打开sublime text

1.2 Tool——Build System——New Build System

1.3 填入以下代码,保存命令为C.sublime-build

{"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\" "}]}

配置C++

打开sublime textTool——Build System——New Build System填入以下代码,保存命令为C++.sublime-build

{"cmd": ["g++","-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", "g++", "-Wall","${file}", "-o", "${file_path}/${file_base_name}", "&&", "cmd", "/c", "${file_path}/${file_base_name}"]},{"name": "RunInCommand","cmd": ["cmd", "/c", "g++", "-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\" "}]}

测试

输出hello world成功

#include<iostream>using namespace std;int main(){	cout<<"hello world!";	return 0;}

标签: #ubuntui686下载