gosu / gosu

2D game development library for Ruby and C++
https://www.libgosu.org/
Other
2.01k stars 173 forks source link

Could not initialize SDL video error #554

Closed mintyjones closed 3 years ago

mintyjones commented 3 years ago

I have been searching online for a solution to this problem when I try an initialize a window with gosu. I am running ruby through WSL. Is it maybe a problem with dependencies - I just can't seem to find much talk about this particular error.

Could not initialize SDL Video: No available video device (RuntimeError)
cyberarm commented 3 years ago

I've had this issue before when trying to use Gosu headless (without a display), does your WSL environment have a display? You can try this: https://wiki.ubuntu.com/WSL#Running_Graphical_Applications Or try searching: "wsl SDL: No available video device"

mintyjones commented 3 years ago

Thanks so much, @cyberarm! From that link you provided, I downloaded VcXsrv Windows X Server, ran it, and was suddenly able to initialise a window! That is very exciting!

jlnr commented 3 years ago

Thanks for the pointer @cyberarm! I've added a link to this issue to the Windows wiki page: https://github.com/gosu/gosu/wiki/Getting-Started-on-Windows