环境:VS2010
微软官方解释:
Visual C++ Concepts: Building a C/C++ ProgramCompiler Warning (level 1) C4627Error Message
”: skipped when looking for precompiled header use
While searching for the location where a precompiled header is used, the compiler encountered an #include directive for the include file. The compiler ignores the #include directive, but issues warning C4627 if the precompiled header does not already contain
the include file.
解决方案:
1、去掉预编译头
项目->属性->配置属性->c/c++->预编译头->创建使用预编译头->不使用预编译头
2、将包含文件加到预编译头stdafx.h文件中
3、在每个.cpp中包含预编译头stdafx.h文件
本文详细介绍了如何解决在使用Visual Studio 2010进行C/C++编程时遇到的编译警告C4627问题。提供了三种解决方案:去除预编译头、将包含文件加入预编译头文件中、确保每个.cpp文件包含预编译头文件。这些方法有助于提高代码的维护性和效率。
1380

被折叠的 条评论
为什么被折叠?



