mismatched #if/#endif pair in file遇到这个该如何解决

会织网的蚂蚁 2004-06-30 02:37:36
错误提示:d:\用户登录模块\demo01\stdafx.h(25) : fatal error C1070: mismatched #if/#endif pair in file 'd:\用户登录模块\demo01\stdafx.h'

全部内容:
// stdafx.h : include file for standard system include files,
// or project specific include files that are used frequently, but
// are changed infrequently
//

#include <afxdb.h>
#if !defined(AFX_STDAFX_H__6AA8F573_9F97_4EFB_82E7_D7BBA3BC301B__INCLUDED_)
#define AFX_STDAFX_H__6AA8F573_9F97_4EFB_82E7_D7BBA3BC301B__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
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_STDAFX_H__6AA8F573_9F97_4EFB_82E7_D7BBA3BC301B__INCLUDED_)
...全文
1426 3 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
Kudeet 2004-06-30
  • 打赏
  • 举报
回复
#if !defined(AFX_STDAFX_H__EE13EA90_AC32_4714_B46E_7E3E47776832__INCLUDED_)
#define AFX_STDAFX_H__EE13EA90_AC32_4714_B46E_7E3E47776832__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 <afxdb.h> // MFC ODBC database 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 // happyparrot(快乐鹦鹉) 说的对,少了这里
快乐鹦鹉 2004-06-30
  • 打赏
  • 举报
回复
#endif // !defined(AFX_STDAFX_H__6AA8F573_9F97_4EFB_82E7_D7BBA3BC301B__INCLUDED_)
这句之前,缺少一个#endif,用来和#ifndef _AFX_NO_AFXCMN_SUPPORT对应
#ifndef _AFX_NO_AFXCMN_SUPPORT
#include <afxcmn.h> // MFC support for Windows Common Controls
#endif // _AFX_NO_AFXCMN_SUPPORT
#endif // !defined(AFX_STDAFX_H__6AA8F573_9F97_4EFB_82E7_D7BBA3BC301B__INCLUDED_)
Kudeet 2004-06-30
  • 打赏
  • 举报
回复
#include <afxdb.h> 你换一下位置放到后面的头文件一起

4,017

社区成员

发帖
与我相关
我的任务
社区描述
VC/MFC 数据库
社区管理员
  • 数据库
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧