编译错误 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
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
VC6.0在編譯的時候出現這種錯誤
fatal error C1010: unexpected end of file while looking for precompiled header directive
?
問題詳細解釋:
致命錯誤C1010,在尋找預編譯指示頭文件時,文件未預期結束。就是沒有找到預編譯指示信息的頭文件。
?
問題一般發生在:
通過添加文件的方式,添加了一些cpp文件到一個MFC的程序,但該cpp文件并不是MFC,是標準C++的。
?
解決方案1:
右鍵點擊項目工程中的該cpp文件,在菜單Project 》Settings里C++頁面的Precomplie Header,設置為第一項:Not using precompiled headers。
?
解決方案2:
在.cpp文件開頭添加包含文件stdafx.h。
#include "stdafx.h"
總結
以上是生活随笔為你收集整理的编译错误 fatal error C1010: unexpected end of file while looking for precompiled header directive的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: VC中按钮控件的启用(enable)和禁
- 下一篇: 开始学习缓冲区溢出