<pre id= "best-content-1299104064" mb-10 "=" "style=" FONT-SIZE:14PX; line-height:28px; > The error is because when the. cpp and. c files are mixed in the project, the compiler takes a different approach to compiling them (mainly because the function declaration is handled differently).
Therefore, you cannot share a precompiled header file. In VC + +, the default precompiled header file is for C + + (StdAfx.h and Stdafx.cpp), and of course you can create a precompiled header for C.
Method: It is more balanced to set a small number of different class files to not use precompiled headers, by right-clicking on the. c (or. cpp) file in FileView for vc++6.0 to cancel the precompiled header.
Select Settings, select the category precompiled headers on the right of the popup dialog box, and then set the option to not using ... ;
(For VS2010, right-click the corresponding file point in the Solution Explorer, select Properties, under Precompiled Headers key, set the not using ... Can. If you need to set multiple files,
You can press and hold the Ctrl key again to select the files and set them)
PS: Explain the following click on the item click on Properties and select C + + precompiled Header precompiled header does not use precompiled header
(Solution Explorer-right-click the C or CPP file that you want to exclude--pop-up Properties menu-expand c/c++-Precompiled Header-Create/Use precompiled header-choose not to apply precompiled header)
Error C1853: "debug\bigbuffer.pch" The precompiled header file comes from an earlier version of the compiler, or the precompiled header is C + + and uses it in C (or vice versa)