Question: Missing SDL_Fpoint on some builds?

Hi. I do some test project to learn C++/SDL2. Have been working on it for some time on Ubuntu, using the distro build.
Then I wanted to check will it run on my Raspberry, so I checked there is almost the same version available from the distro repository:

Raspberry:
libsdl2-2.0-0/testing,now 2.0.9+dfsg1-1+rpt1 armhf [installed,automatic]
libsdl2-dev/testing,now 2.0.9+dfsg1-1+rpt1 armhf [installed]
libsdl2-ttf-2.0-0/stable,now 2.0.15+dfsg1-1 armhf [installed,automatic]
libsdl2-ttf-dev/stable,now 2.0.15+dfsg1-1 armhf [installed]

Ubuntu:
libsdl2-2.0-0/focal,now 2.0.10+dfsg1-3 amd64 [installed,automatic]
libsdl2-dev/focal,now 2.0.10+dfsg1-3 amd64 [installed]
libsdl2-ttf-2.0-0/focal,now 2.0.15+dfsg1-1 amd64 [installed,automatic]
libsdl2-ttf-dev/focal,now 2.0.15+dfsg1-1 amd64 [installed]

More less the same versions used, but when I build my project I get the error saying it does not know the SDL_FPoint though it does on the Ubuntu build.
So I check in /usr/include/SDL2/SDL_rect.h it does have: typedef struct SDL_FPoint
And on Raspberry build it does not, only SDL_Point but that one has integer type position values, so can’t be used in my case.
Right now I’m building from source, but this takes time and I’m curious what’s the reason for such a difference?

include/UNGGeometry.h:15:22: error: ‘SDL_FPoint’ does not name a type; did you mean ‘SDL_Point’?
float distance(const SDL_FPoint*, const SDL_FPoint*);
^~~~~~~~~~

I think SDL_FPoint has been introduced in SDL 2.0.10, but your Raspberry package still is at 2.0.9

Apparently Raspbian stable/buster has SDL 2.0.9 (like Debian stable/buster), but testing/bullseye should have 2.0.12.
If you don’t want to switch to testing you could try if the testing package also works on stable, or you try to build SDL2 yourself (or you stick to the integer versions of SDL_Point and SDL_Rect that work in all SDL2 versions, in that works good enough for your project)

I did check the changelog, found no such information there, but might be you’re right.
Building from source, but this takes ages :slight_smile:

make sure to do sudo apt-get build-dep libsdl2-2.0-0 first so all needed SDL2 build dependencies are installed (otherwise it might still build but not properly work, like lacking sound or even graphical output)