Where can I get windows.h for Mac?

I am trying to compile a program on MacOSX that I originally wrote on Windows. The program is a large C ++ program with the OpenGL API, including many directories and files.

The compilation process first had a problem with OpenGL for Mac, so I downloaded all the OpenGL command-line utilities for it to work. But, as you could imagine, there were many preprocessors in each C file in the OpenGL download, each of which, in turn, had to load dependencies.

However, I have one important step: I get a fatal error stating that the windows.h file was not found. This seems like something inherent to Windows (the windows.h file is nowhere to be found in my huge list of directories for the program), and the Mac does not seem to have the equivalent for windows.h ( http://cboard.cprogramming.com/c- programming / 96087-windows-h-mac.html ).

Am I fortunate to try to compile this program for Mac or can I save something?

+6
source share
3 answers

One thing you can do is create a dummy file called windows.h to satisfy the #include directive and then track for missing typedefs, #defines, etc. one by one, looking at the compiler error log.

windows.h is monolithic and includes about a hundred other Windows headers, but your program will not need all these definitions. It is assumed that you are not using the Windows API directly and are only using simple things like DWORD . If your software is built using a structure such as GLUT or GLFW, which is entirely possible, but if you interact directly with WGL, you will have a lot of work ahead.

+8
source

windows.h provided by the Windows SDK and is implemented by the Windows OS itself.

You need to rewrite the program in order not to use the Windows API.
Good luck.

+1
source

You cannot get Windows.h for Mac, it depends on the Windows OS.
There are many alternatives to the functions used in Windows.h, on the other hand.

0
source

Source: https://habr.com/ru/post/977318/


All Articles