C ++ DLL构建时间(仅发布)异常长。 [英] C++ DLL build time(only release) is abnormally long.
问题描述
有没有办法减少构建时间?
Is there any ways to reduce build time?
- 此问题仅发生在发布版本建立在窗口上。
- 从vs2013到vs2017都发生了这个问题。
- 在linux上的发布版本中没有发生这个问题。
完整重建时间
- 发布 - 13分8秒。
- 调试 - 1分2秒。 (linux版本的构建时间类似。)
最耗时的部分是生成lib& exp文件。
The most time consuming part is generating lib & exp files.
推荐答案
感谢您在此发帖。
>> C ++ DLL构建时间(仅发布)异常长。 ;
>>C++ DLL build time(only release) is abnormally long.
对于这种情况,我建议你尝试以下方法。
For this case, I suggest you try these ways below.
- 使用
预编译标题 - 使用
/ MP编译器设置 - 使用
增量链接 - 使用
/ debug:fastlink linker setting
- Use Precompiled Headers
- Use /MP compiler setting
- Use Incremental linking
- Use /debug:fastlink linker setting
以下是一些文件供您参考。
Here are some documents for you as references.
< a href ="https://blogs.msdn.microsoft.com/vcblog/2016/10/26/recommendations-to-speed-c-builds-in-visual-studio/"> https://blogs.msdn。 microsoft.com/vcblog/2016/10/26/recommendations-to-speed-c-builds-in-visual-studio/
https://blogs.msdn.microsoft.com/vcblog/2014/ 11/12 /加速 - 增量 - 开发 - 构建 - 场景/
希望这可以为您提供帮助。
Hope this could be help of you.
最诚挚的问候,
Sera Yu
这篇关于C ++ DLL构建时间(仅发布)异常长。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!