Posted on 2009-09-05 17:20
S.l.e!ep.¢% 阅读(321)
评论(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" 就编译通过了