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

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

问题描述

我正在使用API​​进行开发,并且该API在其他afx...标头中还需要afxsock.h.在网上搜索后,似乎我的VS Express不够用,所以我打算在Microsoft购买该产品.不幸的是,它的价格是700美元,作为一名初学者,对我来说,将其放在我用来自学c ++的一个项目上没有任何意义. (即,我仍然不知道我是否想使用C ++或其他语言进行长期编程.)

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).

无论如何,我想知道是否需要采取某种措施来获取afx(或更合适的是MFC)文件?

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

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

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.

推荐答案

AFX前缀代表 A 复制 F Ramework E x 张力,它是 MFC ( M icrosoft F ounding C lass)库.在将文件名更改为MFC之前,文件名是用石头固定的,现在更改文件为时已晚.

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.

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

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:

  • 您可以加入 Microsoft的DreamSpark程序,该程序对学生免费,并授予您一些不错的免费下载功能,包括VS 2012 Professional ,VS 2010 Professional和Windows的最新服务器版本.
  • 或者,您可以以非常低的成本加入IEEE.这 IEEE学生会员资格使您可以下载许多Microsoft工具,包括Visual Studio的 Ultimate 版本.有关更多信息,请参见此页面. (尽管该页面提到了VS 2010,但实际上提供了VS 2012.)
  • 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.)

否则,您将必须直接购买Visual Studio Standard/Professional,或加入 MSDN .

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

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

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天全站免登陆