Menu

#3 Cannot build against SDL2

v1.0 (example)
open
None
2
2017-09-13
2017-09-13
No

I'm attempting to build the source on Linux Mint 17.2. Initially, make errored, unable to find SDL/SDL_video.h, which it apparently expects in /usr/includes/SDL/. I installed SDL2_dev, but that went into /usr/includes/SD2. So I downloaded SDS1.2 and copied the contents of its include/ to /usr/includes/SDL.

Then make died with:

gcc -c ../main.c -o main.o  -g 
In file included from /usr/include/SDL/SDL_config.h:42:0,
                 from /usr/include/SDL/SDL_stdinc.h:30,
                 from /usr/include/SDL/SDL_main.h:26,
                 from /usr/include/SDL/SDL.h:30,
                 from ../main.c:48:
/usr/include/SDL/SDL_config_minimal.h:38:22: error: conflicting types for ‘size_t’
 typedef unsigned int size_t;
                      ^
In file included from /usr/include/string.h:32:0,
                 from ../main.c:46:
/usr/lib/gcc/x86_64-linux-gnu/4.8/include/stddef.h:212:23: note: previous declaration of ‘size_t’ was here
 typedef __SIZE_TYPE__ size_t;
                       ^
make: *** [main.o] Error 1

So instead I symlinked SDL to SDL2. This time make died with:

../trs_sdl_gui.c:1856:20: warning: passing argument 1 of ‘SDL_JoystickName’ makes pointer from integer without a cast [enabled by default]
                    SDL_JoystickName(i));
                    ^
In file included from /usr/include/SDL/SDL_events.h:36:0,
                 from /usr/include/SDL/SDL.h:76,
                 from ../trs_sdl_gui.c:30:
/usr/include/SDL/SDL_joystick.h:102:37: note: expected ‘struct SDL_Joystick *’ but argument is of type ‘int’
 extern DECLSPEC const char *SDLCALL SDL_JoystickName(SDL_Joystick * joystick);
                                     ^
make: *** [trs_sdl_gui.o] Error 1

I am not a developer, and that's the extent of my troubleshooting skills.

How can I build sdltrs?

--nathanael

Discussion


Log in to post a comment.