alexej
November 3, 2009, 12:59pm
1
Hi.
Can anybody help me to install SDL on Angstrom?
I use an Angstrom Image from the “http://www.angstrom-distribution.org/
narcissus/“page (it’s like the demo image) and would like to use SDL.
If I include "#include <SDL.h>" the gcc can't find the library.
Is it possible to install SDL with opkg? I can use internet and I can
cross-compile it with “open embedded”.
How should I install SDL?
hi,
you can install SDL using opkg. i am not sure of the exact command but
what does
'opkg list | grep sdl' give as output?
-D
alexej
November 11, 2009, 3:00pm
3
Thank you Deepak Narayan.
After running:
opkg list | grep libsdl
I saw the packages I had to install.
I can compile programs using the SDL library.
Now I have other problems.
I can run the SDL program on the x11-image but not on the console-
image.
Source code:
#include <stdlib.h>
#include <SDL.h>
int main(int argc, char *argv[])
{
//Deklaration
SDL_Surface *screen;
//Initialisierung
if( SDL_Init(SDL_INIT_VIDEO) == -1)
{
printf("Can't init SDL: %s\n", SDL_GetError());
exit(1);
}
atexit(SDL_Quit);
screen = SDL_SetVideoMode(1024, 768, 0,0);
if( screen == NULL )
{
printf("Can't set videomode: %s\n", SDL_GetError() );
exit(1);
}
SDL_Delay( 3000 );
SDL_Quit();
return 0;
}
I have no compiler errors or warnings.
If I try to run it, it tells me “Can’t set videomode: No Videomode
large enough for 1204x720”.
With an x11-image I can run this program and open a bmp- or png-image.
If anyone can run SDL software with console-image please help me.
Thanks and regards,
Alexej
Jesse
November 11, 2009, 8:09pm
4
try
screen = SDL_SetVideoMode(0, 0, 0,0);
to let SDL select the best resolution. Since the graphics driver
(framebuffer) under the
console image does not support changing resolutions at run time (as
far as I know),
you should use the resolution that the driver is using (set in u-boot
boot args)
-Jesse
alexej
November 12, 2009, 7:39am
5
Hi
I tried to run screen = SDL_SetVideoMode(0, 0, 0,0); but I have the
same error:
Can't set video mode: No video mode large enough for 1204x720
Do you have other ideas what kind of problem it is?