VC++中解決“在查找預編譯頭使用時跳過”的方法


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文件

注意:#include "stdafx.h" 一定要添加到cpp文件的第一行,不能放在如”#include <iostream>“行等的后面,否則還是會出現類似錯誤!

 

原文鏈接:http://blog.163.com/anitaxhq@126/blog/static/407238262012112193519198/

     http://jingyan.baidu.com/article/cbcede07cb81e302f40b4d83.html


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM