Where can I get windows.h for Mac?

后端 未结 3 1812
一生所求
一生所求 2020-12-11 02:16

I\'m trying to compile a program on MacOSX that I originally wrote on a Windows OS. The program is a large C++ program with the OpenGL API among other things, totaling very

相关标签:
3条回答
  • 2020-12-11 02:48

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

    0 讨论(0)
  • 2020-12-11 03:05

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

    Windows.h is monolithic and includes about a hundred other Windows headers, but your program is not going to need all of those definitions. This assumes you are not using the Windows API directly, and only using simple things like DWORD. If your software is built using a framework like GLUT or GLFW that is entirely possible, but if you directly interface with WGL, you are going to have a lot of work ahead of you.

    0 讨论(0)
  • 2020-12-11 03:14

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

    You need to rewrite the program to not use Windows APIs.
    Good luck.

    0 讨论(0)
提交回复
热议问题