[d1x/d2x linux] SDL2 support does not compile
When trying to compile using SDL2 support, I receive the following error in either d1x or d2x:

CXX d1x . similar/main/gamecntl.cpp
similar/main/gamecntl.cpp: In function ‘dcx::window_event_result d1x::HandleSystemKey(int)’:
similar/main/gamecntl.cpp:864:29: error: ‘MUSIC_TYPE_REDBOOK’ was not declared in this scope
    if (GameCfg.MusicType == MUSIC_TYPE_REDBOOK)
similar/main/gamecntl.cpp:867:18: error: ‘RBAEjectDisk’ was not declared in this scope
scons: *** [similar/main/.d1x-rebirth.gamecntl.o] Error 1
scons: building terminated because of errors.

occurs when compiling with following line:
scons sdl2=1
Again, please use code tags in your problem reports. Also, please provide or attach full output, from the command line you entered up to the next shell prompt.

Unlike your prior problem, I cannot reproduce this one. The failed symbols are expected to be absent in SDL2, but that absence is handled by wrapping them in #if DXX_USE_SDL_REDBOOK_AUDIO. In turn, DXX_USE_SDL_REDBOOK_AUDIO is defined as int(not sdl2). For me, and in theory for you, that should mean that the failed lines are preprocessed out. Somehow, they are not eliminated for you. Please show the full SCons output and attach the generated dxxsconf.h header.
This one is definitely my mistake. I assumed that changing passed parameters into scons, it would detect the changes and re-run the generation of dxxsconf.h. After removing dxxsconf.h, and running again, it worked perfectly.
That has always worked for me. I routinely flipped sdl2=1 / sdl2=0 when I was working on the SDL2 adjustments.

Forum Jump:

Users browsing this thread: 1 Guest(s)