Your code looks right I guess (been a long time since I've done C lol) so probably this means something in the build chain is broken. If you scroll to the bottom that page they compare vs for Mac with the windows version so you can see how they compare.
Sorry but that’s one of the things it’s can’t do. Can I create Windows Form with my Mac M1?