How to speed up c++ linking time

后端 未结 4 706
自闭症患者
自闭症患者 2021-02-04 05:17

Is there any way, to optimalize linking time in MS Visual studio C++ (2005) ? We\'re using Xoreax Incredibuild for compilation speed up, but nothing for link.

Currently

4条回答
  •  -上瘾入骨i
    2021-02-04 05:46

    I'm not aware of any parallel linking tools; I do know that Incredibuild does not allow it.

    The biggest tool in your toolbox for avoiding link times is the appropriate level of abstraction. If your link times are long, it may be because objects know too much about other objects. Decoupling them is then the key -- through abstract interfaces (perhaps using the PIMPL paradigm), or though other methods such as event passing.

    The overhead for linking projects through Project Dependencies is also quite high. If your target platform is Win32 only, or primarily, you may consider using a header to link your dependent libraries via #pragma comment(lib, "pathToLib").

提交回复
热议问题