我在哪里可以获得 afx...h 文件? [英] Where can I get afx...h files?

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

问题描述

我正在使用 API 进行开发,该 API 需要 afxsock.h 以及其他 afx... 标头.网上搜索了一下,好像我的VS Express还不够用,于是找了微软的产品.不幸的是,它是 700 美元,作为一个初级程序员,我把它放在一个我用来自学 C++ 的项目上是没有意义的.(即我仍然不知道我是否想用 C++ 或其他语言进行长期编程).

无论如何,我想知道是否有某种解决方法来获取 afx(或更恰当地说是 MFC)文件?

请注意,我有 Windows 8、Visual Studio 2012,并且我已经下载了适用于 Windows 8 的 Windows 开发工具包,但由于缺少 afx 错误,仍然无法编译.

解决方案

AFX前缀代表A应用Framework Ex张力,这是 MFC 的原始名称(Microsoft Foundation Classes)库.文件名在改名为 MFC 之前就已经确定了,现在改已经来不及了.

因此,您需要 MFC 才能使用这些标头.不幸的是,Visual Studio 的 Express 版本不包括 MFC(或 ATL).您只能使用标准版、专业版或更高版本的 Visual Studio 开发 MFC 应用程序.

如果您是学生,您有几个不错的选择:

  • 您可以加入 Microsoft 的 DreamSpark 计划,该计划对学生免费,您可以免费下载一些很棒的软件,包括 VS 2012 Professional、VS 2010 Professional 和 Windows 的最新服务器版本.
  • 或者,您可以以极低的成本加入 IEEE.这IEEE 学生会员授权您下载许多 Microsoft 工具,包括 Visual Studio Ultimate 版本.有关详细信息,请参阅此页面.(虽然该页面提到了 VS 2010,但实际上 VS 2012 可用.)

否则,您将不得不直接购买 Visual Studio Standard/Professional,或者加入 MSDN..p>

或者,您可以使用 winsock2 API,它是 Windows SDK 的一部分,而不是 MFC.开始使用文档此处.当您下载Windows 8 的 Windows 开发工具包"时,您将获得 Windows SDK.它包括链接到本机 Win32 库所需的一切,但不包括 MFC 框架.

I'm developing with an API and the API requires the afxsock.h among other afx... headers. After searching online, it seems that my VS Express isn't enough, so I looked to purchase the product at microsoft. Unfortunately it's 700$ and as a beginning programmer, it makes no sense for me to drop that on 1 project which I am using to teach myself c++. (I.e. I still don't know if I want to program long term in C++ or another language).

In any case, I was wondering if there was some sort of work around to get the afx (or more appropriately the MFC) files?

Note that I have Windows 8, Visual Studio 2012, and I've downloaded the Windows Development Kit for Windows 8, but still can't compile because I'm getting missing afx errors.

解决方案

The AFX prefix stands for Application Framework Extensions, which was the original name for the MFC (Microsoft Foundation Classes) libraries. The file names were set in stone before the name was changed to MFC, and it was too late to change them.

So you need MFC in order to use those headers. Unfortunately, the Express versions of Visual Studio do not include MFC (or ATL). You can only develop MFC applications using the Standard, Professional, or higher editions of Visual Studio.

If you are a student, you have a couple of great options:

  • You can can join Microsoft's DreamSpark program, which is free to students and entitles you to some great free downloads, including VS 2012 Professional, VS 2010 Professional, and recent server versions of Windows.
  • Alternatively, you can join the IEEE for a very low cost. The IEEE student membership entitles you to download many Microsoft tools, including the Ultimate editions of Visual Studio. See this page for more information. (Although that page mention VS 2010, VS 2012 is actually available.)

Otherwise, you will have to either buy Visual Studio Standard/Professional outright, or join MSDN.

Alternatively, you could use the winsock2 API, which is part of the Windows SDK rather than MFC. Get started with the documentation here. The Windows SDK is what you're getting when you downloaded the "Windows Development Kit for Windows 8". It includes everything you need to link to native Win32 libraries, but it does not include the MFC framework.

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

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