2013-08-27 95 views
1

我编译时张贴这个问题, 道歉,我得到一个错误致命错误C1083“afxwin.h”

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_) 
+1

您是否使用Express版的Visual Studio? –

+0

是的,Microsoft visual C++ 2010 Express – yasso

+0

所以看看我的回答:) –

回答

2

afxwin.hMFC和MFC不包含在免费版本的VC++(Express Edition)中。

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

2

的Visual Studio Express不包括MFC类。

您将无法使用Visual Studio Express构建此应用程序。

0

增加对谁从谷歌在这里绊倒其他人的详细信息:

对我来说,在我安装Visual Studio它所编译MFC就好了,然后停止突然。结果发现我的projectname32v5.vcproj文件被破坏了(这个文件包含了这个项目特有的包含路径)。从我的版本控制系统恢复此文件的以前版本修复了构建。