WSL2 now supports gui applications!
Since I was quite annoyed by visual studio, I decided to use WSL2 and make as a dev environnement. I've read it works on win10 not only win11.
Installing WSL is pretty straightforward, I'll let you do it. I reinstalled my WSL image and added the WSL kernel update provided by microsoft.
sudo apt install libsfml-dev
works.
My make script builds fine.
I'm now getting:
Failed to open X11 display; make sure the DISPLAY environment variable is set correctly
Aborted
I tried
export DISPLAY=:0
and other things, I installed vcxsrv.exe, and I still get the error.
Then you must do
export DISPLAY=$(awk '/nameserver / {print $2; exit}' /etc/resolv.conf 2>/dev/null):0
export LIBGL_ALWAYS_INDIRECT=0
In your WSL terminal.
Then run xlaunch.exe and tick the right boxes like in the linked image.
It works!