No available video devices?

Hi all, me again.

I wrote (copied, actually) the simplest SDL program I could to test out my
install. It works under Win32 but not under Linux. Here is the error
message:
Unable to init SDL: No available video device

And here is the program:

#include <stdlib.h>
#include "SDL.h"
main(int argc, char *argv[])
{
if ( SDL_Init(SDL_INIT_AUDIO|SDL_INIT_VIDEO) < 0 ) {
fprintf(stderr, “Unable to init SDL: %s\n”, SDL_GetError());
exit(1);
}
atexit(SDL_Quit);
return 0;
}

Anyone got any ideas? Do I have to do something special to my X server under
linux to allow it to be accesses? I’m running the latest stable Debian,
woody, under KDE (the default for Deb). Help!

Are you running it as the same user that is running X? Are you
compiling with gcc in.cpp -o out sdl-config --cflags --libs ?

— Brenden wrote:> Hi all, me again.

I wrote (copied, actually) the simplest SDL program I could to
test out my
install. It works under Win32 but not under Linux. Here is
the error
message:
Unable to init SDL: No available video device

And here is the program:

#include <stdlib.h>
#include "SDL.h"
main(int argc, char *argv[])
{
if ( SDL_Init(SDL_INIT_AUDIO|SDL_INIT_VIDEO) < 0 ) {
fprintf(stderr, “Unable to init SDL: %s\n”,
SDL_GetError());
exit(1);
}
atexit(SDL_Quit);
return 0;
}

Anyone got any ideas? Do I have to do something special to my
X server under
linux to allow it to be accesses? I’m running the latest
stable Debian,
woody, under KDE (the default for Deb). Help!


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


Do you Yahoo!?
New and Improved Yahoo! Mail - 100MB free storage!
http://promotions.yahoo.com/new_mail

jake b wrote:

Are you running it as the same user that is running X?

Pretty sure, yes. I’m just compiling at a term window from KDE so I’d
have to be the same user. There’s only one person logged in, me, and I
didn’t switch users or anything.

Now if you’re talking about the real and effecvite user ID of the server
itself, I have no idea. I could check though.

Are you
compiling with gcc in.cpp -o out sdl-config --cflags --libs ?

Yes, that’s almost exactly my compile command, just in.c and out renamed
differently.

Brenden wrote:

Hi all, me again.

I wrote (copied, actually) the simplest SDL program I could to test out my
install. It works under Win32 but not under Linux. Here is the error
message:
Unable to init SDL: No available video device

And here is the program:

#include <stdlib.h>
#include "SDL.h"
main(int argc, char *argv[])
{
if ( SDL_Init(SDL_INIT_AUDIO|SDL_INIT_VIDEO) < 0 ) {
fprintf(stderr, “Unable to init SDL: %s\n”, SDL_GetError());
exit(1);
}
atexit(SDL_Quit);
return 0;
}

Anyone got any ideas? Do I have to do something special to my X server under
linux to allow it to be accesses? I’m running the latest stable Debian,
woody, under KDE (the default for Deb). Help!

That message means your SDL install is not configured with support for
your current setup, or you are forcing the backend by using the
SDL_VIDEODRIVER env variable. So :

  • did you do the ./configure ; install yourself for SDL, or is this a
    packaged version ? If it is packaged, which version is it ?
  • does “echo $SDL_VIDEODRIVER” say something ?

Stephane

That message means your SDL install is not configured with support for
your current setup, or you are forcing the backend by using the
SDL_VIDEODRIVER env variable. So :
?- did you do the ./configure ; install yourself for SDL, or is this a

./configure; make; make install

Just like that, except on different lines (ie manually).

  • does “echo $SDL_VIDEODRIVER” say something ?

Nope, just a blank line.

B.

Brenden wrote:

That message means your SDL install is not configured with support for
your current setup, or you are forcing the backend by using the
SDL_VIDEODRIVER env variable. So :

  • did you do the ./configure ; install yourself for SDL, or is this a

./configure; make; make install

Just like that, except on different lines (ie manually).

Ok, so you didn’t compile support for video backends supported on your
current configuration.
You should either use the debian SDL package (which usually works well,
at least it worked last time I used debian) or compile it again after
installing the necessary development libraries (x11 devel and probably
others on which SDL relies to get videou output).

Stephane

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Le dimanche 20 Juin 2004 22:01, Brenden a ?crit :

That message means your SDL install is not configured with support for
your current setup, or you are forcing the backend by using the
SDL_VIDEODRIVER env variable. So :
?- did you do the ./configure ; install yourself for SDL, or is this a

./configure; make; make install

Just like that, except on different lines (ie manually).

  • does “echo $SDL_VIDEODRIVER” say something ?

Nope, just a blank line.

I have the Debian testing package of SDL, everything runs very well but that
command writes just a blank line too… this means not much.

For your information :

  • sdl-config output :
    chucky at meg:~$ sdl-config --prefix
    /usr
    chucky at meg:~$ sdl-config --exec-prefix
    /usr
    chucky at meg:~$ sdl-config --version
    1.2.7
    chucky at meg:~$ sdl-config --cflags
  • -I/usr/include/SDL -D_REENTRANT
    chucky at meg:~$ sdl-config --libs
  • -lSDL -lpthread
    chucky at meg:~$ sdl-config --static-libs
  • -lSDL -lpthread -lm -ldl -lasound -L/usr/X11R6/lib -lX11 -lXext -lvga -laa
  • SDL packages installed and their version :
    chucky at meg:~$ dpkg -l | grep ii | grep SDL
    ii libsdl-console 1.3-3 console that
    can be added to any SDL application
    ii libsdl-image1.2-dev 1.2.3-2 development
    files for SDL 1.2 image loading libray
    ii libsdl-mixer1.2-dev 1.2.5-5 development
    files for SDL1.2 mixer library
    ii libsdl-net1.2-dev 1.2.5-3 Development
    files for SDL network library
    ii libsdl-ttf2.0-dev 2.0.6-5 development
    files for SDL ttf library (version 2.0)
    ii libsmpeg-dev 0.4.5+cvs20030824-1 SDL MPEG
    Player Library - development files
    ii libsmpeg0 0.4.5+cvs20030824-1 SDL MPEG
    Player Library - shared libraries

I hope this helps

B.


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


Michel Nolard
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFA1v7pyAKwOMHoSb0RAv5eAJ4zv3awf9lDTFJwReThy3RM+hPXvQCeNqfU
oWw7kqIEI1Xn4mXrMXHf8Yk=
=SDRu
-----END PGP SIGNATURE-----