Any possible replacements for <windows.h> for macOS?

Viewed 56

This is such a silly question, but i'm a beginner programmer, and I was following along a youtube tutorial on how to make a digital clock in the C language, and before the main() function there was #include<windows.h>. My computer had an error and after looking it up, I found out that is a file specific to windows? I saw some others said there are ways to "replace" the file or something, but i'm not really sure what to do. Anything helps. Thanks for your time.

1 Answers

Windows and macOS have very different interfaces. Apples uses a generic tool for all its platforms, thus there's no exact equivalent for windows.h in macOS. The closest equivalent I could find was Cocoa. (I'm not an Apple developer, I work mostly on Windows and Linux)

Use the official documentation as a starting point for developing apps on a specific or generic Apple platform. As it is a widely used platform, I expect you will find support on most issues you will encounter given your experience level, on the apple forum.

Also I found this nice tutorial that gives a basic introduction on Apple API's.

Related