Which compiler are you using? On 32 bit Haiku the default compiler is the very old gcc 2.95. To switch to the modern gcc (version 13 at the moment) you have to type “setarch x86”
And the development packages are separate too. For gcc 13 you need the ones with x86 at the end of the name.
Hope that helps.
Oh, and one more thing: If possible please post compiler output as text instead of a screen photo. It’s much more pleasant to read.