kichikuou / xsystem35-sdl2

Multi-platform implementation of AliceSoft's System3.x game engine.
https://kichikuou.github.io/web/
GNU General Public License v2.0
57 stars 8 forks source link

Build failure with SDL_mixer < 2.0.2 #7

Closed nunuhara closed 5 years ago

nunuhara commented 5 years ago

MIX_INIT_FLUIDSYNTH was renamed to MIX_INIT_MID in SDL_mixer 2.0.2, leading to this error message:

midi.sdlmixer.c: In function ‘midi_initilize’:
midi.sdlmixer.c:66:15: error: ‘MIX_INIT_MID’ undeclared (first use in this function)
  if (Mix_Init(MIX_INIT_MID) != MIX_INIT_MID)
               ^~~~~~~~~~~~

SDL_mixer < 2.0.2 is still packaged in Debian stretch, Ubuntu LTS releases, etc. Probably the cleanest way to fix this is to add a check in the build system and add -DMIX_INIT_MID=MIX_INIT_FLUIDSYNTH to CFLAGS if SDL_mixer < 2.0.2 is detected.

kichikuou commented 5 years ago

Thanks. https://github.com/kichikuou/xsystem35-sdl2/commit/b587cea679c3d96ce23aa57419f3ae558c49d75e should fix this, while I haven’t tested.