Possible to stop generating *.ipdb *.iobj files by VIsual Studio 2015?
Asked Answered
C

4

35

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?

Christmastide answered 22/7, 2015 at 5:30 Comment(2)
What kind of project are you building exactly? Have you tried setting the Output Directory and Intermediate Directory in the project settings to different folders? Do the ipdb files end up in the Output or Intermediate?But
@Chuck Walbourn - Win32 Console Application. Yes, I have. The ipdb files end up in the Output folder.Christmastide
M
44

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).

Misfeasor answered 22/7, 2015 at 14:28 Comment(1)
Do you know why these files end up in output folder instead of intermediate one?Meaghan
S
9

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.

Sleepless answered 10/5, 2019 at 18:52 Comment(1)
If you do this is it no longer "fast", as in it's slower?Obadiah
S
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.

Shiny answered 22/7, 2015 at 7:0 Comment(2)
Yeah, the recompilation depends on their existence.Christmastide
It isn't useful for it to end up in the output directory.Funky
B
2

Visual Studio 2019 version 16.7 16.9 should fix this behavior according to the bug report and discussion here: Intermediate ilk, iobj and ipdb files end up in $(OutDir) instead of $(IntDir)

Bandoline answered 5/8, 2020 at 20:18 Comment(6)
A link to a solution is welcome, but please ensure your answer is useful without it: add context around the link so your fellow users will have some idea what it is and why it’s there, then quote the most relevant part of the page you're linking to in case the target page is unavailable. Answers that are little more than a link may be deleted.Gossamer
I'm not sure you understood what I wrote. There is a bug in the compiler. Microsoft will fix it... That's the solution: update your Visual Studio after the fix is released. I felt this was pretty clear from the text I wrote. The link merely exists as reference material to prove the accuracy of my statement.Bandoline
As luck would have it, 16.7 was released a few hours after I posted this. Find it here: visualstudio.microsoft.com/downloadsBandoline
This problem seems to still exist on 16.8.3... was it ever really fixed? Or is it a regression?Burnsides
This still happens in 16.8.4 as well!Wilmerwilmette
Seems it's finally fixed in 16.9Wilmerwilmette

© 2022 - 2024 — McMap. All rights reserved.