Windows 001

  • WSL

旧版 WSL 的手动安装步骤 | Microsoft Learn

WSL 的基本命令 | Microsoft Learn

  • MSYS2 Fortran

msys2 | 镜像站使用帮助 | 清华大学开源软件镜像站 | Tsinghua Open Source Mirror

Terminals - MSYS2

Pending Package Updates - MSYS2 Packages

1
2
3
msys2 -ucrt64
msys2 -defterm -here -no-start -msys
msys2 -defterm -here -no-start -ucrt64
cd /home/Qiao
cd /c/Users/Qiao/Documents/MSYS2
1
2
3
4
pacman -Suy
pacman -S mingw-w64-ucrt-x86_64-toolchain
pacman -S mingw-w64-ucrt-x86_64-gcc-fortran
gfortran --version
msys2 -defterm -here -no-start -mingw64
1
2
3
4
pacman -S git mingw-w64-x86_64-gcc-fortran mingw-w64-x86_64-fpm
pacman -S mingw-w64-x86_64-fortran-stdlib
pacman -S mingw-w64-x86_64-toolchain
pacman -S python-pip
# WSL 安装 SageMath;mamba安装可能会出现sage.all错误
conda create -y -n sage sage -c conda-forge
  • 配置 Modern Fortran
# 在conda base环境下
pip install fortls fprettify

Fortran › Linter: Compiler Path C:\Users\Qiao\scoop\apps\msys2\current\mingw64\bin\gfortran.exe

Fortran › Formatting: Formatter fprettify

Fortran › Formatting: Path C:\Users\Qiao\miniforge3\Scripts\fprettify.exe

Fortran › Fortls: Path C:\Users\Qiao\miniforge3\Scripts\fortls.exe