"afxwin.h"的致命错误 c1083

Fatal error c1083 "afxwin.h"

本文关键字:c1083 致命错误 afxwin      更新时间:2023-10-16

我很抱歉发布此问题,当我编译时,我得到一个错误

fatal error C1083: Cannot open include file : 'afxwin.h' : No such file or directory

如果你能帮忙的话,非常感谢。

代码:

#if !defined(AFX_STDAFX_H__39403C06_D7D2_4132_9BC8_80C5C886FB8B__INCLUDED_)
#define AFX_STDAFX_H__39403C06_D7D2_4132_9BC8_80C5C886FB8B__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#define VC_EXTRALEAN        // Exclude rarely-used stuff from Windows headers
#include <afxwin.h>         // MFC core and standard components
#include <afxext.h>         // MFC extensions
#include <afxdisp.h>        // MFC Automation classes
#include <afxdtctl.h>       // MFC support for Internet Explorer 4 Common Controls
#ifndef _AFX_NO_AFXCMN_SUPPORT
#include <afxcmn.h>         // MFC support for Windows Common Controls
#endif // _AFX_NO_AFXCMN_SUPPORT
#include <afxsock.h>        // MFC socket extensions
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_STDAFX_H__39403C06_D7D2_4132_9BC8_80C5C886FB8B__INCLUDED_)

afxwin.h是MFC,免费版本的VC++(速成版)中不包含MFC。

构建此应用程序的唯一解决方案是传递专业版。

Visual studio Express不包括MFC类。

您将无法使用Visual Studio学习版生成此应用程序。

为其他从谷歌这里绊倒的人添加更多信息:

对我来说,在安装Visual Studio时,它编译MFC很好,然后突然停止了。事实证明,我的projectname32v5.vcproj文件被currupt了(该文件包含特定于该项目的include路径等)。从我的版本控制系统还原此文件的早期版本修复了生成。