Question

I have a large binary which is built of many static libs and standalone cpp files. It is configured to use incremental linking, all optimizations are disabled by /Od - it is debug build.

I noticed that if I change any standalone cpp file then incremental linking runs fast - 1 min. But if I change any cpp in any static lib then it runs long - 10 min, the same time as ordinary linking. In this case I gain no benefit from incremental linking. Is it possible to speedup it? I use VS2005.

Était-ce utile?

La solution

Set "Use Library Dependency Inputs" in the Linker General property page for your project. That will link the individual .obj files from the dependency .lib instead of the .lib, which may have some different side effects.

Autres conseils

I going to give you a different type of answer. Hardware.

What is your development environment? Is there anyway to get more RAM or to put your project onto an Solid State Drive? I found that using a SSD sped up my link times by an order of magnitude on my work projects. Helped a little for compile times, but the linking was huge. Getting a faster system of course also helped.

If I understand correctly (after using Visual Stuio for some years), the incremental linking feature does not work for object files that is part of static libraries.

One way to solve this is to restructure your solution so that your application project contains all source files.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top