2

I'm currently going through this website's tutorial on SDL:
(http://lazyfoo.net/tutorials/SDL/01_hello_SDL/linux/index.php),

using Bash on Windows 10 as the platform. I've installed the SDL package using
apt-get install libsdl2-dev
and was able to compile the lesson source code (http://lazyfoo.net/tutorials/SDL/01_hello_SDL/01_hello_SDL.zip)
using g++ 01_hello_SDL.cpp -w -lSDL2 -o 01_hello_SDL.

However, when I ran the executable using ./01_hello_SDL, the program printed out SDL could not initialize! SDL_Error: Failed to connect to the Mir Server. Does anyone know a fix for this?

Spikatrix
  • 19,653
  • 7
  • 38
  • 77

1 Answers1

5

Windows Subsystem for Linux:

This subsystem cannot run all Linux software such as some using a graphical user interface (GUI) or those in need of unimplemented Linux kernel services.[7] It is, however, possible to mitigate this by running graphical X Window System applications with an external X server such as VcXsrv or Xming.

See also.

genpfault
  • 49,394
  • 10
  • 79
  • 128