Find SDL2 shared library version
This is a very simple program that lets you find the version of a SDL2 shared library.
Compile: gcc `sdl2-config --libs --cflags` find_version.c -o find_version
Run against a specific shared library (example): LD_PRELOAD=./libSDL2-2.0.so.0 ./find_version
Output:
Compiled against SDL version: 2.0.20
Linking against SDL version: 2.0.14
The first line is the SDL2 version this program was compiled against. This is just for comparison. The second line is the SDL2 version of the shared library you specified in LD_PRELOAD.