SDL_Init(SDL_INIT_VIDEO) not intializing with SDL_GetError() returns nothing | UBUNTU 24.04.1

I have been using SDL3 for creating basic 2D games before. I have formatted and installed a fresh Ubuntu 24.04.1 today and SDL3 seems to have issues initializing SDL_INIT_VIDEO.


I get the error

Unable to initialize SDL:
SDL_GetError() returns nothing. I am in Ubuntu24.04.1 and using Nvidia 560.35.03 driver.
Any help is greatly appreciated. Thanks in advance.

They recently changed a lot of functions to return bool instead of int. SDL_Init now returns true on success and false on failure.

2 Likes

Awesome. It works. Thanks a ton. I forgot to check the API for SDL_Init, because I have been writing in SDL3 for few months now, I was so confident, I read the SDL_Init thoroughly. Thanks again for taking your time.

This is the danger of using unstable libraries. Once SDL 3.2 is released you should no longer see breaking changes of this magnitude.