While compiling SDL 2.0 under Linux Mint you may get an error, containing something like
conflicting types for 'XextAddDisplay' In file included from src/video/x11/SDL_x11dyn.h
Quick googling reveals this post on Arch Linux forums, which says that after upgrading to libXext 1.3.1 XextAddDisplay function argument type has changed from “char*” to “const char*”. Function is defined in SDL_x11sym.h.
My libXext version is 1.2.1, but nevertheless I looked into the SDL_x11sym.h file. There are the following lines:
#if SDL_VIDEO_DRIVER_X11_CONST_PARAM_XEXTADDDISPLAY SDL_X11_SYM(XExtDisplayInfo*,XextAddDisplay,(XExtensionInfo* a,Display* b,_Xconst char* c,XExtensionHooks* d,int e,XPointer f),(a,b,c,d,e,f),return) #else SDL_X11_SYM(XExtDisplayInfo*,XextAddDisplay,(XExtensionInfo* a,Display* b,char* c,XExtensionHooks* d,int e,XPointer f),(a,b,c,d,e,f),return) #endif
After changing “char* c” to “_Xconst char* c” on the line after #else, everything compiled just fine. As you see, those 2 lines vary only with “_Xconst char*” being put instead of “char*”. It seems like although SDL_VIDEO_DRIVER_X11_CONST_PARAM_XEXTADDDISPLAY was not true for some reason, it probably should had been