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?

Neon
  • 453
  • 1
  • 4
  • 7
  • 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? – Chuck Walbourn Jul 22 '15 at 07:01
  • @Chuck Walbourn - Win32 Console Application. Yes, I have. The ipdb files end up in the Output folder. – Neon Jul 22 '15 at 11:43

4 Answers4

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

James McNellis
  • 348,265
  • 75
  • 913
  • 977
8

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.

Milos Ljumovic
  • 403
  • 4
  • 16
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.

Drind51
  • 31
  • 4
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)

Hossein
  • 24,202
  • 35
  • 119
  • 224
dss539
  • 6,804
  • 2
  • 34
  • 64
  • A link to a solution is welcome, but please ensure your answer is useful without it: [add context around the link](//meta.stackexchange.com/a/8259) 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.](//stackoverflow.com/help/deleted-answers) – Marco Bonelli Aug 05 '20 at 22:13
  • 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. – dss539 Aug 06 '20 at 11:47
  • As luck would have it, 16.7 was released a few hours after I posted this. Find it here: https://visualstudio.microsoft.com/downloads/ – dss539 Aug 06 '20 at 13:17
  • 1
    This problem seems to still exist on 16.8.3... was it ever really fixed? Or is it a regression? – user541686 Jan 26 '21 at 14:10
  • This still happens in 16.8.4 as well! – Hossein Apr 28 '21 at 06:26
  • Seems it's finally fixed in 16.9 – Hossein Apr 28 '21 at 06:55