SDL_mixer icon indicating copy to clipboard operation
SDL_mixer copied to clipboard

Compile on Emscripten ?

Open siteswapv4 opened this issue 3 months ago • 2 comments

I was able to compile SDL3, SDL3_image and SDL3_ttf for emscripten, but SDL3_mixer fails with a lot of errors coming from SDL_mixer_internal.h :

/home/siteswap/Downloads/SDL_mixer-main/src/SDL_mixer_internal.h:139:23: error: 
      expected parameter declarator
  139 |     float SDL_ALIGNED(16) position3d[4];   // we only need the X, Y, and Z coords...
      |                       ^
/home/siteswap/Downloads/SDL_mixer-main/src/SDL_mixer_internal.h:139:23: error: 
      expected ')'
/home/siteswap/Downloads/SDL_mixer-main/src/SDL_mixer_internal.h:139:22: note: 
      to match this '('
  139 |     float SDL_ALIGNED(16) position3d[4];   // we only need the X, Y, and Z coords...
      |                      ^

Is this an issue on my side ?

siteswapv4 avatar Sep 19 '25 11:09 siteswapv4

Are you using SDL3 from git? The SDL 3.2.x releases are missing crucial functionality, and is also a major cause SDL3_mixer is not yet released.

madebr avatar Sep 19 '25 12:09 madebr

Oh right my bad I was using the old one, built SDL3 from source and it compiled successfully for Emscripten. I had to disable mpg123 though because of this error :

/home/siteswap/Documents/SDL3_Emscripten_From_Source/SDL_mixer-main/src/decoder_mpg123.c:28:10: fatal error: 
      'mpg123.h' file not found
   28 | #include <mpg123.h>

Thanks for helping

siteswapv4 avatar Sep 19 '25 12:09 siteswapv4