错误:
1>CistCrypt\sha1.cpp(2): warning C4627: “#include "..\stdafx.h"”: 在查找预编译头使用时跳过
1> 将指令添加到“StdAfx.h”或重新生成预编译头1>CistCrypt\sha1.cpp(3): warning C4627: “#include "sha1.h"”: 在查找预编译头使用时跳过
1> 将指令添加到“StdAfx.h”或重新生成预编译头
1>CistCrypt\sha1.cpp(49): warning C4005: “GetData”: 宏重定义
1> CistCrypt\sha1.cpp(47) : 参见“GetData”的前一个定义
1>CistCrypt\sha1.cpp(249): fatal error C1010: 在查找预编译头时遇到意外的文件结尾。是否忘记了向源中添加“#include "StdAfx.h"”?
1>
1>生成失败。
1>
原因&&解决:
1、没有添加 #include "stdafx.h" ;
2、#include "stdafx.h" 必须添加到.cpp文件的第一行,不能在如:#include <iostream>的后面,必须在前面
3、每个.cpp文件都必须有#include "stdafx.h"
4、去掉预编译头:
项目->属性->配置属性->c/c++->预编译头->创建使用预编译头->不使用预编译头5、将包含文件加到预编译头stdafx.h文件中
注:必须将 “#include "..\stdafx.h"”换位#include "stdafx.h" ,尽管这样智能提示:找不到文件!