ArticleDirectory
- Forcereceivdes
- References
In VC programming, the VC compiler provides the pre-compilation function to accelerate compilation. That is, in CPPCodeIncluding stdafx. H, you can use the pre-compilation.
As follows:
# Include"Stdafx. H"ClassDemo{Public:Demo(Void);~Demo(Void);};
Note: # include "stdafx. h" is manually written. It is not available by default.
Therefore, sometimes this will always happen, And the compiler will report an error at this time:
Error 1 fatal error c1010: unexpected end of file while looking for precompiled header. Did you forget to add' # include "stdafx. H" 'to your source? D: \ 3_code \ Vc \ forceincludedemo \ demo. cpp 11
It would be nice if stdafx. h could be pre-compiled.
Forcereceivdes
After some searches, I found that a/FI (name forced include file) option is provided in the compiler.
This option can be used to avoid such a situation.
This parameter is set in the "properties" dialog box of the project, specifically the force nodes attribute in advanced under C ++.
References
/FI (name forced include file)
Http://msdn.microsoft.com/en-us/library/8c5ztk84.aspx