链接步冻结。 [英] Link step freezes.

查看:106
本文介绍了链接步冻结。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Hello Folks:

Hello Folks:

  在Win 10 Pro,VS 2015社区,C ++上开发。

   Developing on Win 10 Pro, VS 2015 Community, C++.

  我的100K + C ++代码行的链接步骤在输出窗口中冻结:

   The link step on my 100K + lines of C++ code is freezing with this in the output window:

< Over 200 lines snipped>


3> c:\program files(x86)\windows kits \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ d:\work\\\
et_results\code\\\
et_results_includes \personal_note.h(492):警告C4996:'strdup':不推荐使用此项目的POSIX名称。而是使用符合ISO C和C ++的名称:_strdup。详细信息请参见在线帮助。
3> c:\program files(x86)\windows kits \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ d:\work\\\
et_results\code\\\
et_results_includes \personal_note.h(562):警告C4996:'strdup':不推荐使用此项目的POSIX名称。而是使用符合ISO C和C ++的名称:_strdup。详细信息请参见在线帮助。
3> c:\program files(x86)\windows kits \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ d:\work\\\
et_results\code\\\
et_results_includes\player_record.h(1172):警告C4244:'=':从'int'转换为'float',可能丢失数据
3>生成代码...
3> LINK:警告LNK4068:/ MACHINE未指定;默认为X86
3> net_results_library.vcxproj - > D:\work\\\
et_results\code\\\
et_results\Debug\\\
et_results_library.lib

3> c:\program files (x86)\windows kits\10\include\10.0.10240.0\ucrt\string.h(346): note: see declaration of 'strncpy' 3>d:\work\net_results\code\net_results_includes\personal_note.h(492): warning C4996: 'strdup': The POSIX name for this item is deprecated. Instead, use the ISO C and C++ conformant name: _strdup. See online help for details. 3> c:\program files (x86)\windows kits\10\include\10.0.10240.0\ucrt\string.h(552): note: see declaration of 'strdup' 3>d:\work\net_results\code\net_results_includes\personal_note.h(562): warning C4996: 'strdup': The POSIX name for this item is deprecated. Instead, use the ISO C and C++ conformant name: _strdup. See online help for details. 3> c:\program files (x86)\windows kits\10\include\10.0.10240.0\ucrt\string.h(552): note: see declaration of 'strdup' 3>d:\work\net_results\code\net_results_includes\player_record.h(1172): warning C4244: '=': conversion from 'int' to 'float', possible loss of data 3> Generating Code... 3>LINK : warning LNK4068: /MACHINE not specified; defaulting to X86 3> net_results_library.vcxproj -> D:\work\net_results\code\net_results\Debug\net_results_library.lib

  这就是它死的地方。 我让它坐在那里半小时,就是这样。 

   And that's where it dies.  I've let it sit there for 1/2 hour, that's it. 

  错误列表为空,并在"输出"窗口中搜索"错误"。也是空的。 

   The error list is empty, and searches of the Output window for "error" also comes up empty. 

  其他项目没有问题。 

   Other projects build without problems. 

  尝试停止构建会导致将其添加到输出窗口:

   Attempts to stop the build cause this to be added to the output window:

16>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppCommon.targets(356,5): warning MSB4220: Waiting for the currently executing task "CL" to cancel.

  构建不会停止。 

   The build won't stop. 

  在发生这种情况时尝试使用File - Exit停止Visual Studio会导致弹出此窗口:

   Attempts to stop Visual Studio with File - Exit while this is happening cause this window to pop up:




  我必须通过任务管理器关闭Visual Studio。 

   I have to shut down Visual Studio through the Task Manager. 

  调试和发布版本都会发生这种情况。 

   This happens in both debug and release builds. 

  我可以构建其他应用程序,所以我认为这可能与这个非常大的应用程序的属性有关。 

   I can build other applications, so I think this might be associated with the properties of this very large application. 

  这个应用程序所依赖的数十个库中有数百个源文件。 

   There are hundreds of source files in dozens of libraries this application depends on. 

  我怀疑重新创建"解决方案",复制源文件,设置属性和重新构建可能会解决所有问题,但这是一个很大的项目。 我宁愿不这样做。 


   I suspect a re-creation of the "solution", copying source files, setting up the properties and re-building might fix everything, but this is a big project.  I'd rather not do that. 

  有没有人建议让当前的设置进行?

   Does anybody have any suggestions on getting the current setup going?

     谢谢你
      Larry

      Thanks
      Larry







推荐答案

你好a_unique_name,

Hi a_unique_name,

感谢您在这里发帖。

对于您的情况,我建议您尝试以下步骤。

For your case, I suggest you try these steps below.

1。为高频率使用的头文件使用预编译的标头。

2。将项目设置 - >常规 - >整个程序优化设置为使用链接时间代码生成。

2. Set Project Settings->General->Whole Program Optimization into Use Link Time Code Generation.

3。 在项目设置 - > C / C ++ - >优化。选择最大化速度(/ O2)或完全优化(/ Ox)。

3. On the Project Settings->C/C++->Optimizations. Choose Maximize Speed (/O2) or Full Optimization (/Ox).

4。添加/调试:FastLink和/ Zc:编译器命令行中的内联支持。  

4. Adding /Debug:FastLink and /Zc:inline support in your compiler command lines.  

有关改善链接时间的详细信息,请参阅这些文档。

For more information to improve your link time, pleas refer to these documents.

https://blogs.msdn.microsoft.com/vcblog/2013/10/ 29 / the-visual-c-linker-best-practices-developer-iteration /

https://blogs.msdn.microsoft.com/vcblog/2014/11/12/speeding-up-the- incremental-developer-build-scenario /

http://www.codeproject.com/Articles/304848/How-to-Improve-VCplusplus-Project-Build-Time

Hope这可能是你的帮助。

Hope this could be help of you.

最好的问候,

Sera Yu

Best Regards,
Sera Yu


这篇关于链接步冻结。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆