在编译VS时候,出现fatal error C1010: unexpected end of file while looking for precompiled head。

 解决错误 fatal error C1010: unexpected end of file while looking for precompiled head

 

问题详细解释:致命错误C1010,在寻找预编译指示头文件时,文件未预期结束。就是没有找到预编译指示信息的问文件。

顾名思义就是预编译因为缺少了预编译文件而失败。解决方法显然可以取消预编译,或者帮助编译器找到预编译文件。

故解法:

1.右键单击项目工程中的cpp文件,在菜单Project->XXXproperties->C/C++->Precompile Header,设置为第一项:Not using precompile headers。

2.在.cpp文件开头添加包含文件stdafx.h。 #include"stdafx.h"

相关文章:

  • 2021-11-16
  • 2022-12-23
  • 2021-09-12
  • 2021-12-19
  • 2022-12-23
  • 2021-07-08
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-06-11
  • 2021-06-03
  • 2021-10-14
  • 2021-05-18
相关资源
相似解决方案