[SDL] Problem : undefined symbol: DPMSDisable
Gael Goinvic
insomniak.fr at gmail.com
Sat Sep 15 08:23:22 PDT 2007
2007/9/15, Jacob Meuser <jakemsr at sdf.lonestar.org>:
> On Sat, Sep 15, 2007 at 02:59:32PM +0200, Gael Goinvic wrote:
> > Hello =)
> >
> > I have a problem with SDL... Here is my code, in D Language (but it
> > does not change anything with C++... ) :
> >
> > void init()
> > {
> > DerelictSDL.load();
> >
> > assert((SDL_Init(SDL_INIT_VIDEO) < 0), ("Unable to init SDL : " ~
> > SDL_GetDError()));
> >
> > assert((SDL_SetVideoMode(640, 480, 24, SDL_HWSURFACE|SDL_DOUBLEBUF) is
> > null), ("Unable to set SDL_VideoMode : " ~ SDL_GetDError()));
> > }
> >
> > I compile nice, but when i run the program :
> >
> > Unable to init SDL : Failed loading DPMSDisable: /usr/lib/libX11.so.6:
> > undefined symbol: DPMSDisable
> >
> > :-/
> >
> > Can someone help me to fix it ?
>
> you need to find where DPMSDisable comes from. try something like:
>
> $ cd /usr/X11R6/lib
> $ grep DPMSDisable *
> Binary file libXext.so.10.0 matches
> $
>
> so, in this case, DPMSDisable is probably in libXext.so.10.0, let's
> check:
>
> $ nm libXext.so.10.0 | grep DPMSDisable
> 00003ed0 T DPMSDiable
> $
>
> which, according to my nm manual, means DPMSDisable is a text
> segment symbol with a value of 00003ed0.
>
> so, to provide this symbol, DPMSDisable, I would have to also link
> in libXext.
>
> >
> > Thank you in Advance.
>
> hope that helped.
>
> --
> jakemsr at sdf.lonestar.org
> SDF Public Access UNIX System - http://sdf.lonestar.org
> _______________________________________________
> SDL mailing list
> SDL at lists.libsdl.org
> http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
>
MMmh... I have found where DPMSDisable come from, it's in libXext.a.
So, i link Xext by typing this :
gael at Kubuntu:-$ rebuild main.d -L-lXext -clean
gcc ./_main.o ./detris.engine.o ./nmd_gcstats.o ./detris.defines.o -o
main -m32 -Xlinker --start-group -lphobos -lSDD-derelict-sdl
-lSDD-derelict-util -ldl -lSDD-derelict-util -lXext -lphobos -lpthread
-lm
But i still get the error... :(
More information about the SDL
mailing list