I use fpc 3.2.2 for using own classes that are similar to Qt 5 Framework.
I use fpc with gnu c++ 20, to get a code base that can be use from fpc, and g++.
The original idea was, to bundle VCL with g++, to form g++ in a C++ Builder like Compiler.
But I could use Com+.
But this is Windows depend, and I am not a fan of Com+.
So I do experiment for cross-development.
You can follow the process at my
https://github.com/paule32/fpc-qt account.