我在哪里可以得到WINDOWS.H for Mac吗? [英] Where can I get windows.h for Mac?

查看:3856
本文介绍了我在哪里可以得到WINDOWS.H for Mac吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图编译MacOSX上一个程序,我原来写在Windows操作系统。该项目是一个大型C ++程序与除其他外的OpenGL API,共计很多目录和文件。

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 many directories and files.

在第一次编译过程必须用OpenGL为Mac一个问题,所以我下载了所有的OpenGL的命令行实用程序为它工作。但是,正如你可能想象的,OpenGL的下载中的每个C文件中有许多preprocessors,每个我又不得不下载的依赖关系。

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

不过,我剩下的一个关键的一步:我收到一个致命的错误说WINDOWS.H文件未找到。这似乎固有到Windows系统的东西(文件Windows.h是无处在节目我的目录巨大的名单中找到),和Mac似乎并没有对WINDOWS.H等效(的 http://cboard.cprogramming.com/c-programming/96087-windows-h- mac.html )。

However, I have remaining one critical step: I receive a fatal error saying that windows.h file is not found. This seems something inherent to the Windows system (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 an equivalent for windows.h (http://cboard.cprogramming.com/c-programming/96087-windows-h-mac.html).

我是运气尝试编译这个程序在Mac或东西可以捞回?

Am I out of luck trying to compile this program for the Mac or can something be salvaged?

推荐答案

有一件事情你能做的就是创建一个名为虚拟文件 WINDOWS.H 来满足的#include 指令,然后一个接一个通过查看编译器错误日志追查失踪的typedef,#定义等。

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 是铁板一块,其中包括大约一百个其他Windows头,但是你的程序是不会需要所有这些定义。这是假设你不直接使用Windows API,只用简单的事情,像 DWORD 。如果你的软件使用像GLUT或GLFW这是完全有可能的框架,但如果你直接与WGL界面,你将有很多工作要做你建造的。

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.

这篇关于我在哪里可以得到WINDOWS.H for Mac吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆