Problems with using SDL

Dear all,

I am a newbie in using SDL. I’ve just bought John Hall’s book
"Programming Linux Games" and I am trying to play around with
SDL. However,
after compiling SDL-1.2.3 and trying to run the testing programs, there is
a problem when it tries to initialize the video, more specifically, it
gives the error message: “No available video device”. I am not sure how
this happens. Could you tell me how I can fix it or where I can find
information about trouble-shooting? I am running Mandrake 7.0 on my
laptop “Omnibook 2100”. The X-window and other X-application runs well.

BTW, is there a search engine for the SDL list so that I can search if the
question has been answered before I bug all of you?

Thanks
Kevin

after compiling SDL-1.2.3 and trying to run the testing programs, there is
a problem when it tries to initialize the video, more specifically, it
gives the error message: “No available video device”. I am not sure how

Are you running the SDL application as the same user that is running the X
server? That is, you didn’t switch over to the root user or anything, did
you?

–ryan.

Are you running the SDL application as the same user that is running theX
server? That is, you didn’t switch over to the root user or anything, did
you?

No, I didn’t switch over to root user. I compiled SDL using the tarball
as root, then switch to normal user and try to run the test programs but
it fails to initialize the video.

Kevin

No, I didn’t switch over to root user. I compiled SDL using the tarball
as root, then switch to normal user and try to run the test programs but
it fails to initialize the video.

Could it be that X support didn’t get compiled in to your version of SDL?
Look through the output from the configure script and see if it didn’t
include X11 support.

If you’re feeling brave, you could try stepping through SDL_Init() in the
debugger and see what’s happening (Function to watch for is
X11_Available(), in src/video/x11/SDL_x11video.c).

–ryan.

— Chi Wai Lai wrote:

Dear all,

BTW, is there a search engine for the SDL list so that I can
search if the
question has been answered before I bug all of you?

Thanks
Kevin

search on google.com using
site:libsdl.org keywords=====
Dave Brondsema
dave at brondsema.net
http://www.brondsema.net


Do You Yahoo!?
Yahoo! Sports - live college hoops coverage
http://sports.yahoo.com/

Could it be that X support didn’t get compiled in to your version of SDL?
Look through the output from the configure script and see if it didn’t
include X11 support.

Oh, it turns out that the configure.log file indicates some failure of X

configure:3775: checking for X configure:3842: gcc -E conftest.c>/dev/null 2>conftest.out
configure:3838: X11/Intrinsic.h: No such file ordirectory
configure: failed program was: #line 3837 “configure” #include
"confdefs.h"
#include <X11/Intrinsic.h>

and there are a couple other errors in the config.log file too.

I put a copy of the config.log file at my home page

http://www.physics.ubc.ca/~cwlai/config.log

could anyone tell me how to fix the problem?

Many thanks.

Kevin