打开windows feature,安装功能后,电脑可能需要重启
打开powershell安装WSL,命令WSL --update(图片是安装后的提示,第一次安装提示不同)
下载对应image和导入工具
https://cloud-images.ubuntu.com/wsl/
WSL管理工具
https://github.com/bostrot/wsl2-distro-manager
用工具解压image完成安装
可以用管理工具启动 或者 xshell启动
下载代码后就可以正常编译
因为使用windows+linux,需要注意文件格式,编译前设置文件格式和权限
sudo apt install dox2unix
find . -type f -exec dos2unix {} \;
sudo chmod 777 -R *