问题
In Visual Studio Community 2015, a Visual C++ project generates a *.ipdb file and a *.iobj file in its Release folder.
Now in Visual Studio Community 2013, I've never seen these files generated in project Release folder and so I'd like to know -
Is it possible to stop generating them?
回答1:
These files are produced when Incremental Link-Time Code Generation (LTCG) is enabled. This is a new feature in Visual C++ 2015.
If you disable Incremental LTCG, the linker will stop producing these files. But then you lose the benefits of Incremental LTCG.
To disable Incremental LTCG, modify your project properties: Under Linker => Optimization change "Link Time Code Generation" to something other than "Use Fast Link Time Code Generation (/LTCG:incremental)" (this is the default for Release builds).
回答2:
I believe it allow you to generate the project faster, when it prints that kind of message in the console:
2 of 3 functions (66.7%) were compiled, the rest were copied from previous compilation.
1> 2 functions were new in current compilation
1> 0 functions had inline decision re-evaluated but remain unchanged
1> Finished generating code
I don't think you can remove it, but it is an useful tool This is because the PDB generation takes a large portion of the compilation time. You can consider it as "precompiled sources" I believe.
回答3:
You don't need to disable incremental linking. Since VS 2015 default under Linker/Optimization for Release build is "Fast Link Time Code Generation" (/LTCG:incremental). You just need to change it to "Link Time Code Generation" (/LTCG) and you will have incremental linking and VS will stop producing *.iobj and *ipdb files.
来源:https://stackoverflow.com/questions/31554559/possible-to-stop-generating-ipdb-iobj-files-by-visual-studio-2015