I used the video/procedures mentioned at this “QuickStart” post and I did not have any problem at all with an RPi-4B. I did compile both for C and C++, although so far, I only used C++.
I used the above procedures in this project which worked out OK for me (I did use C++ though).