PDA

View Full Version : SDL2 Update conflicts



oliveoil
2nd November 2017, 07:14 PM
Hi,

A system update happened last night, this included SDL2 updates. Now when building my SDL2 apps am getting re-declaration errors:


/usr/include/SDL2/SDL_stdinc.h:141:17: error: redeclaration of ‘SDL_FALSE’


I reran sdl-config to check for changes:


sdl2-config --cflags --libs


Uninstalled and reinstalled SDL2...


But still getting re-declaration errors from make, any ideas please? Thanks!

lsatenstein
3rd November 2017, 10:46 PM
In usr/include/SDL2/SDL_stdinc.h
edit the file to line 141 and put a comment (// pair) before the start of the line.

or on the line above 141 insert
#ifndef SDL_FALSE
and on the line following add
#endif

The compiler tests for the prior existence of SDL_FALSE
and if it was previously defined, will skip over the line

If the SDL_FALSE was not defined, it will be defined.