c++ - What does #pragma hdrstop without parameter do when used in multiple files? -


Practical value of entering

#pragma hdrstop ("what it does") (no filename Parameters) in some sources (CPP) files?

Note that these (once again) are clear to me as mud.

Edit / Note: I am asking this because, and links to this article suggest this but I do not understand that different for each compilation unit What is the advantage of a pch file?

In short.

  • Put #pragma hdrstop in a source file that is' / Yc is not compiled with / u.
  • If you have a file / u To set up the HDROP compiler, you need to throw the compiler first before the line on which the HDRPS appears and click on the top that is already inserted.
  • If the file has been set / yank, then the HDRPP means that to protect all the compiled state from all the lines that HDRSP appears as precompiled headers.

    The invoice is using the optional header file name / yc and / u; Just check the 'Use' or 'Make' radio button and leave the 'header' edit box blank (or edit the project file ...).

    So you have 1 file, possibly precompiled header CPP which includes the headers that you want to include in the precompiled header and which contains the #pragma hdrstop at the end of the list of files, this file is a / UC Has been compiled with.

    Then you have all your other CPP files with #pragma hdrstop after files included in the precompiled header, these files have been compiled with all / U.

    The result is in precompiledder CPPP (in this example) to create a single PC file and all files of other PD files.

    The advantage to doing this is that there is no need to include any 'global' precompiled header building header file - so any stdafx.h or whatever it means You can set up a build configuration without creating a precompiled header, where all the #pragma hdrstop lines are ignored only

    This is "good" because it means that you have A 'no precompump' build config Can not be a session that lets you grow quickly (you can change a header and not force the world to rebuild) and other "normal" configurations that use precompiled headers.

Comments

Popular posts from this blog

mysql - BLOB/TEXT column 'value' used in key specification without a key length -

c# - Using Vici cool Storage with monodroid -

python - referencing a variable in another function? -