Problem compiling with sdl under suse 8.2

While using sdl in programs on my laptop (slackware) I had no problems. Then
I went and installed sdl and the development packages on this comp which is
running Suse 8.2 and I get plenty of errors.

I’m no pro at programming and am just learning to use SDL so go easy. The
simplest programs that just initialize sdl error out quite badly. Here’s a
sample of the errors…

: undefined reference to XGetModifierMapping' /usr/lib/gcc-lib/i486-suse-linux/3.3/../../../libSDL.a(SDL_x11events.lo)(.text+0xe8f): In functionget_modifier_masks’:
: undefined reference to XKeycodeToKeysym' /usr/lib/gcc-lib/i486-suse-linux/3.3/../../../libSDL.a(SDL_x11events.lo)(.text+0xf17): In functionget_modifier_masks’:
: undefined reference to XFreeModifiermap' /usr/lib/gcc-lib/i486-suse-linux/3.3/../../../libSDL.a(SDL_x11events.lo)(.text+0x1038): In functionX11_KeyToUnicode’:
: undefined reference to XKeysymToKeycode' /usr/lib/gcc-lib/i486-suse-linux/3.3/../../../libSDL.a(SDL_x11events.lo)(.text+0x10e7): In functionX11_KeyToUnicode’:
: undefined reference to XLookupString' /usr/lib/gcc-lib/i486-suse-linux/3.3/../../../libSDL.a(SDL_x11events.lo)(.text+0x1144): In functionX11_SetKeyboardState’:
: undefined reference to XQueryKeymap' /usr/lib/gcc-lib/i486-suse-linux/3.3/../../../libSDL.a(SDL_x11events.lo)(.text+0x119a): In functionX11_SetKeyboardState’:
: undefined reference to XQueryPointer' /usr/lib/gcc-lib/i486-suse-linux/3.3/../../../libSDL.a(SDL_x11gamma.lo)(.text+0x123): In functionX11_SetGammaNoLock’:
: undefined reference to XSync' /usr/lib/gcc-lib/i486-suse-linux/3.3/../../../libSDL.a(SDL_x11gl.lo)(.text+0x63): In functionX11_GL_GetVisual’:
: undefined reference to `XGetWindowAttributes’

The list scrolls on and on. Any suggestions are appreciated. I was using SDL
1.2.6 and then installed the latest CVS version and the errors are the
same.

thanks!

Art-

Looks to me that either the X11 libraries did’nt get linked in, or far
more likely you don’t have the X11 dev packages installed. If you’re
not planning on using X11 for your display then you probably need to
rebuild your SDL libraries without it.

Wesley Poole
AKA Phoenix Kokido
kokido.sf.net
@Wes_Poole

Arthur Dodd wrote:

While using sdl in programs on my laptop (slackware) I had no problems.
Then
I went and installed sdl and the development packages on this comp which is
running Suse 8.2 and I get plenty of errors.

I’m no pro at programming and am just learning to use SDL so go easy. The
simplest programs that just initialize sdl error out quite badly. Here’s a
sample of the errors…

: undefined reference to `XGetModifierMapping’

/usr/lib/gcc-lib/i486-suse-linux/3.3/…/…/…/libSDL.a(SDL_x11events.lo)(.text
+0xe8f):

In function get_modifier_masks': : undefined reference toXKeycodeToKeysym’

/usr/lib/gcc-lib/i486-suse-linux/3.3/…/…/…/libSDL.a(SDL_x11events.lo)(.text
+0xf17):

In function get_modifier_masks': : undefined reference toXFreeModifiermap’

/usr/lib/gcc-lib/i486-suse-linux/3.3/…/…/…/libSDL.a(SDL_x11events.lo)(.text
+0x1038):

In function X11_KeyToUnicode': : undefined reference toXKeysymToKeycode’

/usr/lib/gcc-lib/i486-suse-linux/3.3/…/…/…/libSDL.a(SDL_x11events.lo)(.text
+0x10e7):

In function X11_KeyToUnicode': : undefined reference toXLookupString’

/usr/lib/gcc-lib/i486-suse-linux/3.3/…/…/…/libSDL.a(SDL_x11events.lo)(.text
+0x1144):

In function X11_SetKeyboardState': : undefined reference toXQueryKeymap’

/usr/lib/gcc-lib/i486-suse-linux/3.3/…/…/…/libSDL.a(SDL_x11events.lo)(.text
+0x119a):

In function X11_SetKeyboardState': : undefined reference toXQueryPointer’

/usr/lib/gcc-lib/i486-suse-linux/3.3/…/…/…/libSDL.a(SDL_x11gamma.lo)(.text+
0x123):

In function X11_SetGammaNoLock': : undefined reference toXSync’

/usr/lib/gcc-lib/i486-suse-linux/3.3/…/…/…/libSDL.a(SDL_x11gl.lo)(.text+0x6
3):

In function X11_GL_GetVisual': : undefined reference toXGetWindowAttributes’

The list scrolls on and on. Any suggestions are appreciated. I was using
SDL> 1.2.6 and then installed the latest CVS version and the errors are the
same.

thanks!

Art-


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl

Hey everyone,

I actually have the problem fixed now. SUSE doesn’t install sdl_sound by
default for some reason. Stupid error on my part but ran their install
program and it fixed it.

Arthur Dodd

Arthur Dodd wrote:

While using sdl in programs on my laptop (slackware) I had no problems.
Then I went and installed sdl and the development packages on this comp
which is running Suse 8.2 and I get plenty of errors.

I’m no pro at programming and am just learning to use SDL so go easy. The
simplest programs that just initialize sdl error out quite badly. Here’s a
sample of the errors…

: undefined reference to `XGetModifierMapping’

/usr/lib/gcc-lib/i486-suse-linux/3.3/…/…/…/libSDL.a(SDL_x11events.lo)(.text+0xe8f):

In function get_modifier_masks': : undefined reference toXKeycodeToKeysym’

/usr/lib/gcc-lib/i486-suse-linux/3.3/…/…/…/libSDL.a(SDL_x11events.lo)(.text+0xf17):

In function get_modifier_masks': : undefined reference toXFreeModifiermap’

/usr/lib/gcc-lib/i486-suse-linux/3.3/…/…/…/libSDL.a(SDL_x11events.lo)(.text+0x1038):

In function X11_KeyToUnicode': : undefined reference toXKeysymToKeycode’

/usr/lib/gcc-lib/i486-suse-linux/3.3/…/…/…/libSDL.a(SDL_x11events.lo)(.text+0x10e7):

In function X11_KeyToUnicode': : undefined reference toXLookupString’

/usr/lib/gcc-lib/i486-suse-linux/3.3/…/…/…/libSDL.a(SDL_x11events.lo)(.text+0x1144):> In function `X11_SetKeyboardState’:

: undefined reference to `XQueryKeymap’

The list scrolls on and on. Any suggestions are appreciated. I was using
SDL 1.2.6 and then installed the latest CVS version and the errors are the
same.

thanks!

Art-