Sdl 1.1.6?

Hi…

has someone else problems with the new release ? After compiling and
installing it, I wanted to run this little cpp program to find out, whether
everything is working fine:

#include <SDL/SDL.h>

int main () {
SDL_SURFACE *screen;
SDL_Init (SDL_INIT_VIDEO);
screen = SDL_SetVideoMode (640,480,16,SDL_SWSURFACE);
SDL_Quit ();
return 0;
}

It seems the programm is running in a neverending loop, so I do have not
output at all, no screen setup … maybe there is a recursion in it ?–
Sascha G?nther
(@Sascha_Gunther)

LINUX - Power for nothing and bits for free…

While I thought it might be an error how I compiled the SDL tarball, I tried
again, but the same error occurs, when I call SDL_Init my programm starts an
infinite loop doing something (I don’t know what it is doing).

This is how I compiled SDL:

root at SDL-1.1:
./configure --prefix=/usr --enable-video-svga=yes
–> There where no errors

make
–> Same: no errors, but some warnings here about unused variables (MMX) but
I didn’t care…

make install
–> No problems with the make install, checked manually whether the files are
there and they where in usr/include /usr/lib and /usr/bin

So I started a new project with kdevelop (c++)
I added -lpthread -L/usr/lib -lSDL to the Linker-Options

I wrote the program :

#include <SDL/SDL.h>

int main () {
SDL_Init (SDL_INIT_VIDEO);
SDL_Quit ();
return 0;
}

While debugging I found myself in end infinite loop while calling SDL_Init.
No one else with this problem ? Or does anyone see, what I did wrong ? I am
running X-Free 4, KDE2, KDevelop 1.2…–
Sascha G?nther
(@Sascha_Gunther)

LINUX - Power for nothing and bits for free…

This is what happens, if I run the applications in “test” related to
x-windows:

X-lib : connection to “:0.0” refused by server
X-lib : Client is not authorized to connect to Server
X-lib : connection to “:0.0” refused by server
X-lib : Client is not authorized to connect to Server
Couldn’t initialize SDL: No available video-device.

(I had the X-Server definitly running as I called e.g. ./graywin in an
x-terminal…–
Sascha G?nther
(@Sascha_Gunther)

LINUX - Power for nothing and bits for free…

OK… I solved it now… for a stupid reason I cannot reproduce the X-Server
could only be accessed by root. I do not know why this was, but it occured
after installing XFree 4.0. So I deinstalled 4.0, installed a stable version,
cleaned my SDL compilation and rebuild everything … voila … it works.

Thanks for the answers… :)On Sunday 29 October 2000 14:51, you wrote:

This is what happens, if I run the applications in “test” related to
x-windows:

X-lib : connection to “:0.0” refused by server
X-lib : Client is not authorized to connect to Server
X-lib : connection to “:0.0” refused by server
X-lib : Client is not authorized to connect to Server
Couldn’t initialize SDL: No available video-device.

(I had the X-Server definitly running as I called e.g. ./graywin in an
x-terminal…


Sascha G?nther
(@Sascha_Gunther)

LINUX - Power for nothing and bits for free…

This is what happens, if I run the applications in “test” related to
x-windows:

X-lib : connection to “:0.0” refused by server
X-lib : Client is not authorized to connect to Server
X-lib : connection to “:0.0” refused by server
X-lib : Client is not authorized to connect to Server
Couldn’t initialize SDL: No available video-device.

(I had the X-Server definitly running as I called e.g. ./graywin in an
x-terminal…

A few things:

are you still root running these sdl progs? Seems like these lines are are
telling you you’re running X as a normal user, and some other user (prob.
root) tries to use the x screen.

Isn’t the other (never ending loop) the same error we got with SuSe 7.0?
Can’t remember what the fix was though, and shouldn’t that fix be in 1.1.6?
Never got time to test this… :frowning:

And didn’t you use sdl-config --cflags and sdl-config --libs to comiple
and link the sdl prog?
otherwise you should not forget to set the -D_REENTRANT directive for
pthreads.

JohnOn Fri, 27 Oct 2000 20:02:09 Sascha G?nther wrote: