i’ve got SDL2-2.0.3.tar.gz
tar
cd SDL2-2.0.3 && mkdir build && cd build
…/configure --disable-pulseaudio --disable-esd --disable-video-mir --disable-video-wayland --disable-video-x11 --disable-video-opengl
make
sudo make install
all above is ok
sudo ldconfig
i’ve got SDL2-2.0.3.tar.gz
tar
cd SDL2-2.0.3 && mkdir build && cd build
…/configure --disable-pulseaudio --disable-esd --disable-video-mir
–disable-video-wayland --disable-video-x11 --disable-video-opengl
make
sudo make install
all above is ok
sudo ldconfig
now start my simple test.c
#include #include #include
int main (){
if (SDL_Init(SDL_INIT_EVERYTHING) !=0) {
printf(
"\nUnable to initialize SDL: %s\n",
SDL_GetError()
);
return 1;
}
SDL_Delay(1000);
SDL_Quit();
return 0;
}
compile
gcc -Wall -o test test.c -lSDL2
or if you want is the same
gcc -Wall -o test test.c sdl2-config --cflags --libs
compile with no error
//execute
./test
Unable to initialize SDL:no available video device
is the same with
sudo ./test
or if start
with sudo startx ./test
please someone once for all could explain to a idiot child like me
how compile SDL2 for use in raspberry
with OpenGL ES and X server
i’m very frustrating
and hope someone clear my mind after days of compile and recompile
with same effect
best regards
luigi
(forgive my bad English)
thanks Gabriel for your reply
i will do your advice this night (for me)
just tar .tar.xz file in a root?
please could you explain me why my compilation fail to run if all
is done in a right way?
i’ve already run sdl2 with x server bat is very slow
i’hope this way is faster than previous
best regards
yes and no.
i’ll try to explain
after a lot of trial, compile and recompile with advice above,
i was down.
the issue , i guess, were in dependencies installed and in configure
setting wrong .
i’ve followed all the advice above before used with success with b+ but with pi 2 doesn’t .
no one ,also in raspberry forum enlightened me.
so it’s better to get a precompiled build from https://buildbot.libsdl.org/sdl-builds/sdl-raspberrypi/?C=M;O=D
unpack in root but be carefull because it overwrites previous installation and makes a mess
it works but i don’t understand why i cannot build on my own sdl2 library with my raspberry pi 2.
i hope this help you.
I will be compiling SDL2 for raspberry pi2 this weekend, so if you aren’t
having any success still, I’ll report my findings.On 26 Feb 2015 02:58, “Scap_Pato” <luigi.taribo at gmail.com> wrote:
yes and no.
i’ll try to explain
after a lot of trial, compile and recompile with advice above,
i was down.
the issue , i guess, were in dependencies installed and in configure
setting wrong .
i’ve followed all the advice above before used with success with b+ but
with pi 2 doesn’t .
no one ,also in raspberry forum enlightened me.
so it’s better to get a precompiled build from https://buildbot.libsdl.org/sdl-builds/sdl-raspberrypi/?C=M;O=D
unpack in root but be carefull because it overwrites previous installation
and makes a mess
it works but i don’t understand why i cannot build on my own sdl2 library
with my raspberry pi 2.
i hope this help you.
Try adding --host=arm-raspberry-linux-gnueabihf when calling the configure script. Otherwise it won’t recognize the Pi2 correctly (and hence not enable the RPI video driver).> Am 11.02.2015 um 19:14 schrieb Scap_Pato <luigi.taribo at gmail.com>:
please help me
raspberry p2 and SDL2
before i’ve installed
(advice in ttps://solarianprogrammer.com/2015/01/22/raspberry-pi-raspbian-getting-started-sdl-2/)
i’ve got SDL2-2.0.3.tar.gz
tar
cd SDL2-2.0.3 && mkdir build && cd build
…/configure --disable-pulseaudio --disable-esd --disable-video-mir --disable-video-wayland --disable-video-x11 --disable-video-opengl
make
sudo make install
all above is ok
sudo ldconfig
now start my simple test.c
#include #include #include
int main (){
if (SDL_Init(SDL_INIT_EVERYTHING) !=0) {
printf(
"\nUnable to initialize SDL: %s\n",
SDL_GetError()
);
return 1;
}
SDL_Delay(1000);
SDL_Quit();
return 0;
}
compile
gcc -Wall -o test test.c -lSDL2
or if you want is the same
gcc -Wall -o test test.c sdl2-config --cflags --libs
compile with no error
//execute
./test
Unable to initialize SDL:no available video device
is the same with
sudo ./test
or if start
with sudo startx ./test
please someone once for all could explain to a idiot child like me
how compile SDL2 for use in raspberry
with OpenGL ES and X server
i’m very frustrating
and hope someone clear my mind after days of compile and recompile
with same effect
best regards
luigi
(forgive my bad English)
[quote=“Steffen Hein”]Try adding --host=arm-raspberry-linux-gnueabihf when calling the configure script. Otherwise it won’t recognize the Pi2 correctly (and hence not enable the RPI video driver).