Posted on 2009-09-05 17:20
S.l.e!ep.¢% 閱讀(325)
評論(0) 編輯 收藏 引用 所屬分類:
VC
IDE: VS2008
用VS2008創建了一個工程,具體是啥忘記了,
編譯時出現
fatal error C1083: 無法打開預編譯運行頭文件:“Debug\xxxx.pch”: No s.........
Method1,rebuild? all
Method2,項目-〉屬性-〉C/C++ -〉預編譯頭,修改 創建/使用預編譯頭 為 創建預編譯頭.
VC.net中:修改:項目->屬性->C/C++ ->預編譯頭->不使用預編譯頭
謝謝,我重新生成后,這個Error就沒有了
謝謝各位朋友指點
VC默認在編譯StdAfx.cpp時生成預編譯頭文件,編譯其它cpp時使用預編譯頭文件,先編譯一下StdAfx.cpp即可.
---------------
后來又出現
C2857
Compiler Error C2857
'#include' statement specified with the /Ycfilename command-line option was not found in the source file
The /Yc command-line option specified the name of an include file, but that file was not included in the source file being compiled.
Make sure that the filename specified in the /Yc command-line option corresponds to an include file specified in an #include statement in the current source file.
This error can be caused by having the #include statement in a conditional compilation block that is not compiled.
在對應的CPP加 #include "stdafx.h" 就編譯通過了