简体   繁体   中英

Fatal error c1083 “afxwin.h”

I apologize for posting this question, When I compile, I get an error

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

Thanks very much if you can give a hand.

code:

#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_)

Visual studio Express does not include the MFC classes.

You won't be able to build this application using Visual Studio Express.

afxwin.h is MFC and MFC is not included in the free version of VC++ (Express Edition).

The only solution to build this application would be to pass on a Professional edition.

Adding more info for other people who stumble here from Google:

For me on my install of Visual Studio it was compiling MFC just fine, then stopped all of a sudden. Turns out that my projectname32v5.vcproj file got currupted (this file contains, among other things, the include paths specific to this project). Restoring a previous version of this file from my version control system fixed the build.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM