Yup, you’re basically taking a chunk of Linux code (not specifically OpenGL code, this is OS-level stuff - at the level that OpenGL interacts with the OS) and trying to compile it on Windows. No way is that going to work.
OpenGL may well have a reputation for being “easy”, but it’s not that easy I’m afraid; you do need to know a bit about how to build regular apps for your environment first, and you do need to know a bit about how your environment interacts with OpenGL too.
They have about 30 tutorials, all of them way outdated such as using glaux to read a bmp file and using immediate mode, fixed pipeline. But, it is a starting point.