VC中头文件编译错误:fatal error C1010:“unexpected end of file while looking for precompiled header directive"
2010-10-18 19:52
537 查看
如何解决:"fatal error C1010:VC++6.0中常出现的"unexpected end of file while looking for
precompiled header directive"的问题?
我想大家在VC6.0中经常回遇到这样的问题,如何解决呢?
1、看看是否缺少“;”,“}”
隐藏得深的是宏、.h文件的问题就要费点心思了
2、一定是你在类的部分定义被删除了,M$在每个类中定义一些特殊的常量,是成对的,如下:
.h:
#if
!defined(AFX_CHILDFRM_H__54CA89DD_BA94_11D4_94D7_0010B503C2EA__INCLUDED_)
#define AFX_CHILDFRM_H__54CA89DD_BA94_11D4_94D7_0010B503C2EA__INCLUDED_
.......
//{{AFX_INSERT_LOCATION}}
// Microsoft
Visual C++ will insert additional declarations immediately before
the previous line.
#endif //
!defined(AFX_MAINFRM_H__54CA89DB_BA94_11D4_94D7_0010B503C2EA__INCLUDED_)
你可以新建一个类,然后把这些拷贝过去或补上就可以了。
3、在头部加入 #include "stdafx.h"
4、在CPP文件第一行加上#include "stdafx.h"。
或者Rebuild All.
5、
(1). [Project] - [Settings] - [C/C++] - [Category]
(2). 选择 [Precomplied
Headers]
(3). 单选 [Not Using Precomplied Headers]
(4). [OK]
第5个方法比较高效。
precompiled header directive"的问题?
我想大家在VC6.0中经常回遇到这样的问题,如何解决呢?
1、看看是否缺少“;”,“}”
隐藏得深的是宏、.h文件的问题就要费点心思了
2、一定是你在类的部分定义被删除了,M$在每个类中定义一些特殊的常量,是成对的,如下:
.h:
#if
!defined(AFX_CHILDFRM_H__54CA89DD_BA94_11D4_94D7_0010B503C2EA__INCLUDED_)
#define AFX_CHILDFRM_H__54CA89DD_BA94_11D4_94D7_0010B503C2EA__INCLUDED_
.......
//{{AFX_INSERT_LOCATION}}
// Microsoft
Visual C++ will insert additional declarations immediately before
the previous line.
#endif //
!defined(AFX_MAINFRM_H__54CA89DB_BA94_11D4_94D7_0010B503C2EA__INCLUDED_)
你可以新建一个类,然后把这些拷贝过去或补上就可以了。
3、在头部加入 #include "stdafx.h"
4、在CPP文件第一行加上#include "stdafx.h"。
或者Rebuild All.
5、
(1). [Project] - [Settings] - [C/C++] - [Category]
(2). 选择 [Precomplied
Headers]
(3). 单选 [Not Using Precomplied Headers]
(4). [OK]
第5个方法比较高效。
相关文章推荐
- VC中头文件编译错误:fatal error C1010:“unexpected end of file while looking for precompiled header directive"
- VC中头文件编译错误:fatal error C1010:“unexpected end of file while looking for precompiled header directive"
- 编译错误 fatal error C1010: unexpected end of file while looking for precompiled header directive
- 一个编译错误 fatal error C1010: unexpected end of file while looking for precompiled header directive
- fatal error C1010: unexpected end of file while looking for precompiled header directive 错误
- unexpected end of file while looking for precompiled header directive 错误
- 【VC++】如何解决unexpected end of file while looking for precompiled header directive
- VC++6.0中常出现的"unexpected end of file while looking for precompiled header directive"的问题
- 新添h/cpp的错误:unexpected end of file while looking for precompiled header directive
- vc++6.0 编译时报错Fatal Error C1010 unexpected end of file while looking for precompiled header directive
- VC++6.0中常出现的"unexpected end of file while looking for precompiled header directive"的问题?
- vc开发-fatal error C1010: unexpected end of file while looking for precompiled header directive
- unexpected end of file while looking for precompiled header directive错误
- VC++6.0中常出现的"unexpected end of file while looking for precompiled header directive"的问题解决方法
- VC++6.0中"unexpected end of file while looking for precompiled header directive"的解决方法
- fatal error C1010: unexpected end of file while looking for precompiled header directive 错误
- fatal error C1010: unexpected end of file while looking for precompiled header directive 头文件设置
- fatal error C1010: unexpected end of file while looking for precompiled header directive 错误解决办法
- fatal error C1010: unexpected end of file while looking for precompiled header directive
- fatal error C1010: unexpected end of file while looking for precompiled header directive