VOGONS


First post, by TelaKeppi

User metadata
Rank Newbie
Rank
Newbie

I'm having problems compiling CVS version (also 0.72) on OS X 10.5.5. Compiling with:

./configure --enable-core-inline --disable-sdltest --with-sdl-prefix=/opt/local --prefix=/opt/local
make

gives me:

g++ -DHAVE_CONFIG_H -I. -I../..  -I../../include -I/opt/local/include/SDL -D_GNU_SOURCE=1 -D_THREAD_SAFE  -g -O2  -MT sdl_mapper.o -MD -MP -MF .deps/sdl_mapper.Tpo -c -o sdl_mapper.o sdl_mapper.cpp
sdl_mapper.cpp:313: error: 'SDLK_WORLD_0' was not declared in this scope
sdl_mapper.cpp:316: error: 'SDLK_EQUALS' was not declared in this scope
sdl_mapper.cpp:317: error: 'SDLK_RIGHTBRACKET' was not declared in this scope
sdl_mapper.cpp:317: error: 'SDLK_LEFTBRACKET' was not declared in this scope
sdl_mapper.cpp:319: error: 'SDLK_SEMICOLON' was not declared in this scope
sdl_mapper.cpp:320: error: 'SDLK_BACKSLASH' was not declared in this scope
sdl_mapper.cpp:320: error: 'SDLK_COMMA' was not declared in this scope
sdl_mapper.cpp:320: error: 'SDLK_SLASH' was not declared in this scope
sdl_mapper.cpp:321: error: 'SDLK_PERIOD' was not declared in this scope
sdl_mapper.cpp:326: error: 'SDLK_LMETA' was not declared in this scope
sdl_mapper.cpp:357: error: 'SDLK_RMETA' was not declared in this scope
sdl_mapper.cpp: In function 'Bitu GetKeyCode(SDL_keysym)':
sdl_mapper.cpp:413: error: 'SDLK_WORLD_95' was not declared in this scope
sdl_mapper.cpp: At global scope:
sdl_mapper.cpp:1995: error: 'SDLK_EQUALS' was not declared in this scope
sdl_mapper.cpp:1997: error: 'SDLK_LEFTBRACKET' was not declared in this scope
sdl_mapper.cpp:1997: error: 'SDLK_RIGHTBRACKET' was not declared in this scope
sdl_mapper.cpp:1998: error: 'SDLK_SEMICOLON' was not declared in this scope
sdl_mapper.cpp:1999: error: 'SDLK_BACKSLASH' was not declared in this scope
sdl_mapper.cpp:2001: error: 'SDLK_COMMA' was not declared in this scope
sdl_mapper.cpp:2002: error: 'SDLK_PERIOD' was not declared in this scope
sdl_mapper.cpp:2002: error: 'SDLK_SLASH' was not declared in this scope
sdl_mapper.cpp:2016: error: 'SDLK_WORLD_0' was not declared in this scope
sdl_mapper.cpp: In function 'void CreateBindGroups()':
sdl_mapper.cpp:2213: error: 'SDLK_LAST' was not declared in this scope
make[3]: *** [sdl_mapper.o] Error 1
make[2]: *** [all-recursive] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2

SDL headers are in '/opt/local/include/SDL'. 'sdl-config --cflags' gives
'-I/opt/local/include/SDL -D_GNU_SOURCE=1 -D_THREAD_SAFE'. Seems like this is because my current keyboard layout (fi_FI). Also this looks like a similar problem http://lists.libsdl.org/pipermail/sdl-libsdl. … ber/066875.html. Any help would be appreciated.

Reply 1 of 13, by Qbix

User metadata
Rank DOSBox Author
Rank
DOSBox Author

hmm try figuring out where those keys are defined (in which sdl file.) easiest to do this is

cd /opt/local/include
egrep -Ir SDLK_LAST *

for example at my place (with sdl in /usr/include/SDL)

qbix@laptop:/usr/include$ egrep -Ir SDLK_LAST *
SDL/SDL_keysym.h: SDLK_LAST

if you don't have this file then maybe your sdl instalation is messed up.

Water flows down the stream
How to ask questions the smart way!

Reply 2 of 13, by TelaKeppi

User metadata
Rank Newbie
Rank
Newbie

Yes, i have that file, but after quick looktrough, it doesn't have any of those. It seems people at SDL has changed something, this is the new SDK_keysym.h http://svn.libsdl.org/trunk/SDL/include/SDL_keysym.h. I was able to fix some of those errors, by substituting right scancodes from SDL_scancode.h to SDL_mapped.cpp, but my c skills are limited 😒 A patch would be nice... seems like it wouldn't be that hard.

g++ -DHAVE_CONFIG_H -I. -I../..  -I../../include -I/opt/local/include/SDL -D_GNU_SOURCE=1 -D_THREAD_SAFE  -g -O2  -MT sdl_mapper.o -MD -MP -MF .deps/sdl_mapper.Tpo -c -o sdl_mapper.o sdl_mapper.cpp
sdl_mapper.cpp:313: error: 'SDLK_WORLD_0' was not declared in this scope
sdl_mapper.cpp: In function 'Bitu GetKeyCode(SDL_keysym)':
sdl_mapper.cpp:413: error: 'SDLK_WORLD_95' was not declared in this scope
sdl_mapper.cpp: At global scope:
sdl_mapper.cpp:2016: error: 'SDLK_WORLD_0' was not declared in this scope
sdl_mapper.cpp:2022: error: expected `}' before ';' token
sdl_mapper.cpp:2022: error: too many initializers for '<anonymous struct>'
sdl_mapper.cpp: In function 'void CreateBindGroups()':
sdl_mapper.cpp:2213: error: 'SDLK_LAST' was not declared in this scope
make[3]: *** [sdl_mapper.o] Error 1
make[2]: *** [all-recursive] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2

I have no idea what to use for 'SDLK_WORLD_0' and 'SDLK_WORLD_95' and that 'too many initializers' came out from no where, i wasn't anywhere near that line 😀