首页 文章

SDL_Init失败,'SDL_Error: Failed to connect to the Mir Server'

提问于
浏览
2

我是关于SDL的'm currently going through this website's教程:
http://lazyfoo.net/tutorials/SDL/01_hello_SDL/linux/index.php),

在Windows 10上使用Bash作为平台 . 我已经安装了SDL包
apt-get install libsdl2-dev
并能够编译课程源代码(http://lazyfoo.net/tutorials/SDL/01_hello_SDL/01_hello_SDL.zip
使用 g++ 01_hello_SDL.cpp -w -lSDL2 -o 01_hello_SDL .

但是,当我使用 ./01_hello_SDL 运行可执行文件时,程序打印出 SDL could not initialize! SDL_Error: Failed to connect to the Mir Server . 有谁知道解决这个问题?

1 回答

  • 5

    Windows Subsystem for Linux

    该子系统无法运行所有Linux软件,例如某些使用图形用户界面(GUI)或需要未实现的Linux内核服务的软件 . [7]但是,可以通过使用外部X服务器(如VcXsrv或Xming)运行图形化X Window System应用程序来缓解这种情况 .

    See also.

相关问题