I use Ubuntu 20.04.3 WSL on Windows 10. I compiled my c++ program (which uses the SDL2 library) into an executable file named "main".
g++ -o main main.cpp CApp.cpp -lSDL2 -std=c++17
When I try to run the executable with the following command:
./main
it returned:
error: XDG_RUNTIME_DIR not set in the environment.