【问题标题】:SDL_Init fails with 'SDL_Error: Failed to connect to the Mir Server'SDL_Init 失败并显示“SDL_Error:无法连接到 Mir 服务器”
【发布时间】:2017-10-26 14:29:05
【问题描述】:

我目前正在浏览该网站的 SDL 教程:
(http://lazyfoo.net/tutorials/SDL/01_hello_SDL/linux/index.php),

使用 Windows 10 上的 Bash 作为平台。我已经使用
apt-get install libsdl2-dev
安装了 SDL 包 并能够编译课程源代码 (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。有谁知道这个问题的解决办法吗?

【问题讨论】:

标签: c++ sdl sdl-2 windows-subsystem-for-linux


【解决方案1】:

Windows Subsystem for Linux:

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

See also.

【讨论】:

    猜你喜欢
    • 2013-02-17
    • 1970-01-01
    • 2018-03-22
    • 1970-01-01
    • 1970-01-01
    • 2018-12-29
    • 1970-01-01
    • 1970-01-01
    • 2016-04-05
    相关资源
    最近更新 更多