[SDL] Problem : undefined symbol: DPMSDisable

Ryan C. Gordon icculus at icculus.org
Sat Sep 15 15:08:22 PDT 2007


> assert((SDL_Init(SDL_INIT_VIDEO) < 0), ("Unable to init SDL : " ~
> SDL_GetDError()));

You are asserting that SDL_Init() failed, right? You're basically saying:

   if (SDL_Init() doesn't report failure) { abort("Unable to init..."); }

So that should be:

     assert((SDL_Init(SDL_INIT_VIDEO) == 0), "Unable to...")

SDL_Init() returning -1 means it failed.

> Unable to init SDL : Failed loading DPMSDisable: /usr/lib/libX11.so.6:
> undefined symbol: DPMSDisable

This is an error message that the X11 target generates when loading 
non-essential symbols (even though ultimately everything works out). 
Everything up to SDL 1.2.12 will report this if you ask for the last 
error message after SDL_Init() when SDL_Init() didn't actually fail. We 
have fixed this in Subversion to clear the error message if all the 
essential symbols are found to reduce unnecessary bug reports.

Fix your assertion, though, and your problem should go away.

--ryan.



More information about the SDL mailing list