How do YOU reduce compile time, and linking time for Visual C++ projects (native C++)?

前端 未结 12 1171
深忆病人
深忆病人 2020-11-29 21:46

How do YOU reduce compile time, and linking time for VC++ projects (native C++)?

Please specify if each suggestion applies to debug, release, or both.

12条回答
  •  攒了一身酷
    2020-11-29 22:05

    With Visual C++, there is a method, some refer to as Unity, that improves link time significantly by reducing the number of object modules.

    This involves concatenating the C++ code, usually in groups by library. This of course makes editing the code much more difficult, and you will run into namespace collisions unless you use them well. It keeps you from using "using namespace foo";

    Several teams at our company have elaborate systems to take the normal C++ files and concatenate them at compile time as a build step. The reduction in link times can be enormous.

提交回复
热议问题