I tryed to build on Linux.
Both running:
The-Great-Escape-in-C/platform/generic$ gcc -I../../include sdlmain.c -o tge
or
The-Great-Escape-in-C/platform/generic$ make -f SDL.mk build
it stop with this error:
sdlmain.c: In function ‘key_handler’:
sdlmain.c:102:41: error: incompatible type for argument 2 of ‘zxkeyset_for_port’
102 | return zxkeyset_for_port(port, state->keys);
| ~~~~~^~~~~~
| |
| zxkeyset_t
In file included from sdlmain.c:19:
../../include/ZXSpectrum/Keyboard.h:99:56: note: expected ‘const zxkeyset_t *’ but argument is of type ‘zxkeyset_t’
99 | int zxkeyset_for_port(uint16_t port, const zxkeyset_t *keystate);
| ~~~~~~~~~~~~~~~~~~^~~~~~~~
sdlmain.c: In function ‘sdl_key_pressed’:
sdlmain.c:221:32: error: incompatible type for argument 1 of ‘zxkeyset_setchar’
221 | *keys = zxkeyset_setchar(*keys, k->keysym.sym);
| ^~~~~
| |
| zxkeyset_t
../../include/ZXSpectrum/Keyboard.h:104:35: note: expected ‘zxkeyset_t *’ but argument is of type ‘zxkeyset_t’
104 | void zxkeyset_setchar(zxkeyset_t *keystate, int c);
| ~~~~~~~~~~~~^~~~~~~~
sdlmain.c:223:34: error: incompatible type for argument 1 of ‘zxkeyset_clearchar’
223 | *keys = zxkeyset_clearchar(*keys, k->keysym.sym);
| ^~~~~
| |
| zxkeyset_t
../../include/ZXSpectrum/Keyboard.h:109:37: note: expected ‘zxkeyset_t *’ but argument is of type ‘zxkeyset_t’
109 | void zxkeyset_clearchar(zxkeyset_t *keystate, int c);
| ~~~~~~~~~~~~^~~~~~~~
sdlmain.c: In function ‘main’:
sdlmain.c:326:21: error: incompatible types when assigning to type ‘zxkeyset_t’ from type ‘long long unsigned int’
326 | state.keys = 0ULL;
| ^~~~
I tryed to build on Linux. Both running: The-Great-Escape-in-C/platform/generic$ gcc -I../../include sdlmain.c -o tge or The-Great-Escape-in-C/platform/generic$ make -f SDL.mk build it stop with this error: