Posted on 2009-09-05 17:20
S.l.e!ep.¢% 閱讀(338)
評(píng)論(0) 編輯 收藏 引用 所屬分類:
VC
IDE: VS2008
用VS2008創(chuàng)建了一個(gè)工程,具體是啥忘記了,
編譯時(shí)出現(xiàn)
fatal error C1083: 無法打開預(yù)編譯運(yùn)行頭文件:“Debug\xxxx.pch”: No s.........
Method1,rebuild? all
Method2,項(xiàng)目-〉屬性-〉C/C++ -〉預(yù)編譯頭,修改 創(chuàng)建/使用預(yù)編譯頭 為 創(chuàng)建預(yù)編譯頭.
VC.net中:修改:項(xiàng)目->屬性->C/C++ ->預(yù)編譯頭->不使用預(yù)編譯頭
謝謝,我重新生成后,這個(gè)Error就沒有了
謝謝各位朋友指點(diǎn)
VC默認(rèn)在編譯StdAfx.cpp時(shí)生成預(yù)編譯頭文件,編譯其它c(diǎn)pp時(shí)使用預(yù)編譯頭文件,先編譯一下StdAfx.cpp即可.
---------------
后來又出現(xiàn)
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.
在對(duì)應(yīng)的CPP加 #include "stdafx.h" 就編譯通過了