kreax
Posts: 2
Joined: Tue Jul 26, 2016 2:43 pm

CROSS-COMPILING SDL2 for rpi3 - no audio.

Wed Jun 13, 2018 12:07 pm

Hello, I'm trying to cross compile my program that uses SDL2 as a library for audio. I already cross-compiled my program and SDL2 as a static library. and the program run fine on rpi3 except is as no sound.

I'm using the crosstool-ng toolchain configured with rpi3 sample.

the error given by the SDL at runtime is :
Couldn't open audio device: No such device
it appears that my SDL library is not compiled with ALSA support.
so I tried to compile SDL 2 on my raspberry, it compiles and found ALSA as an audio driver but I have an error when linking with my program :
undefined reference to 'vc_dispmanx_rect_set'
and many other errors in rpimouse.h for example.

I'm using the ./configure make install procedure.

I tried to cross-compile alsa on my laptop and put it in my sysroot, but it doesn't found alsa when configuring.

I do not know what to do, if someone knows how to solve the undefined reference, or to include alsa in cross-compiling, it would be the best day for me.

Return to “C/C++”

Who is online

Users browsing this forum: Bing [Bot] and 5 guests