I am writing a simple c program (nothing fancy, just a simple console input/output program) that I am writing on windows. I always use gcc to compile it to an exe, but I also want to compile it for MacOS so I can run it on my friend’s macbook. How would I go about doing that?
To compile I use command gcc main.c -o testprogram.exe
Chat gpt told me to use x86_64-apple-darwin20.0.0-gcc main.c -o testprogram
However, when I do it all I get is that it is not recognized as an internal or external command or operable batch file.