vc编译问题,初学

来源:百度知道 编辑:UC知道 时间:2024/05/31 05:55:34
Compiling...
sy.cpp
e:\c and c++\sy\sy.cpp(4) : fatal error C1083: Cannot open precompiled header file: 'Debug/sy.pch': No such file or directory
执行 cl.exe 时出错.

sy.obj - 1 error(s), 0 warning(s)
双击错误时,错误的标识箭头指向mainfrm.cpp的#include "stdafx.h",
这个文件是系统自动增加的,如何解决!
补充:
网上说:在工程的属性里:
使用选项Use Precompiled Header (/Yu)
请问在哪,我没找到?vc6.0

我告诉你
每个cpp文件的第一行都是 #include"stdafx.h"
估计sy.cpp是没有这一行 没有要加上
先双击stdafx.cpp 打开这个文件
点编译 点链接
是不是没有Cannot open precompiled header 这个错误了?