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 😀

Reply 3 of 13, by wd

User metadata
Rank DOSBox Author
Rank
DOSBox Author

remove the --disable-sdltest and assure that SDL is correctly detected (meaning install the dev package or whatever is available)

Reply 4 of 13, by TelaKeppi

User metadata
Rank Newbie
Rank
Newbie

Gives exactly the same error message as in my first post.

checking for sdl-config... /opt/local/bin/sdl-config
checking for SDL - version >= 1.2.0... yes

Reply 5 of 13, by wd

User metadata
Rank DOSBox Author
Rank
DOSBox Author

what sdl version?

Reply 6 of 13, by TelaKeppi

User metadata
Rank Newbie
Rank
Newbie

CVS version.

Reply 7 of 13, by wd

User metadata
Rank DOSBox Author
Rank
DOSBox Author

which one

Reply 8 of 13, by TelaKeppi

User metadata
Rank Newbie
Rank
Newbie

Oh, sorry, it seems there is two branches 😀 i have 1.3

Last edited by TelaKeppi on 2008-12-06, 17:57. Edited 1 time in total.

Reply 9 of 13, by wd

User metadata
Rank DOSBox Author
Rank
DOSBox Author

That's the problem.

Reply 10 of 13, by TelaKeppi

User metadata
Rank Newbie
Rank
Newbie

Yes, obviously, since there seems to be differences in keyboard handling between 1.2 and 1.3. Is this going to be issued sometime in the future 😀 ?

Reply 11 of 13, by wd

User metadata
Rank DOSBox Author
Rank
DOSBox Author

No, why? SDL1.3 is far from being released, changes a very lot of things,
and does not offer anything too useful that 1.2 already has.

Reply 12 of 13, by TelaKeppi

User metadata
Rank Newbie
Rank
Newbie

No reason, i just assumed it's the latest and was not aware of any incompabilities. I'll just roll back to 1.2.x then.

Reply 13 of 13, by wd

User metadata
Rank DOSBox Author
Rank
DOSBox Author

It's a different interface thus you can't mix sdl 1.2 and sdl 1.3