The Windows Subsystem for Linux is an alternative way to setup a complete development environment on Windows. It offers a Linux environment with a seamless bridge to the Windows world. We recommend this setup for Windows developers.
You can use the native Windows Visual Studio Code IDE (VS Code) for developing in the WSL. It offers code completion, CMake integration, an integrated debugger, git integration and more.
sudo apt update && sudo apt install -y ninja-build gdb.
code .. This will open the source code in VS Code.
GCC 9.3.0as the CMake kit.
ogsas the debug target.
The filesystem of the WSL is not inside your regular user directories. You can find it by running
explorer.exe . inside the WSL shell. It should be something like
You can also run OGS inside the WSL with benchmarks located in your regular Windows directories. You regular filesystem can be accessed inside WSL with the
/mnt/c/-prefix. E.g. to run an OGS benchmark:
bin/ogs -o _out /mnt/c/Users/[username]/ogs-src/Tests/Data/Elliptic/square_1x1_SteadyStateDiffusion/square_1e0.prj