Visual Studio 2015 Win64 在解决方案构建期间挂起 [英] Visual Studio 2015 Win64 hangs during solution build

查看:28
本文介绍了Visual Studio 2015 Win64 在解决方案构建期间挂起的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用 Visual Studio 2015 从源代码构建一些第三方库.我正在使用 cmake 3.2.3 创建解决方案文件,我正在使用 ExternalProject_add 模块.我之前在 32 位 Visual Studio 2012 中成功编译并构建了这个 cmake 代码,但没有在 64 位中成功.

I'm trying to build some third party libraries from source using Visual Studio 2015. I'm creating the solution file using cmake 3.2.3 and I'm using the ExternalProject_add module. I previously compiled and built this cmake code successfully in 32 bit Visual Studio 2012, but did not in 64 bit.

我现在正在尝试在 64 位 Visual Studio 2015 中构建它,并且在调试和发布构建的构建过程中,IDE 莫名其妙地挂起.有时构建进程仍在运行,例如 cl.exe,但没有任何进展,我必须进入任务管理器并结束与构建相关的所有进程.然后我尝试再次构建它,有时它会成功构建,而有时它会遇到相同的错误;冻结在代码中的不同行,具体取决于它在构建中的执行程度.

I'm now trying to build it in 64 bit Visual Studio 2015, and the IDE inexplicably hangs during the build process with both debug and release builds. Sometimes the build processes are still running, such as cl.exe, but nothing advances and I have to go into task manager and end all the processes associated with the build. I then try to build it again, and sometimes it builds successfully while other times it runs into the same error; freezing at different lines in the code depending on how far it got in the build.

在尝试以 32 位构建解决方案时,我也遇到了同样的挂起问题.

I've gotten the same hanging issue when trying to build the solution in 32 bit as well.

我不确定我的 Visual Studio 2015 安装是否有问题,或者是否是我的 cmake 代码的问题导致了这种挂起.我对 ExternalProject_add 之外的 cmake 知之甚少,因此非常感谢 cmake 或 Visual Studio 的任何帮助.

I'm not sure if there is an issue with my Visual Studio 2015 installation, or if it is an issue with my cmake code that is causing this hanging. I don't know much about cmake outside of ExternalProject_add, so any and all help with cmake or visual studio is much appreciated.

这是启动构建的外部项目代码:

Here's the external project code that initiates the build:

include(ExternalProject)

ExternalProject_Add(${3rdPartyLibraryName}
    DOWNLOAD_DIR ${3rdParty_CacheDir}
    URL ${3rdPartyURL}
    SOURCE_DIR ${3rdPartySourceDir}
    TMP_DIR ${3rdPartySourceDir}/${3rdPartyLibraryName}
    BUILD_COMMAND nmake /f makefile.vc MSVC_VER=${MSVC_VERSION} WIN64=YES INCDIR=${CMAKE_SOURCE_DIR}/../3rdParty/${3rdPartyLibraryName}/test/include
    BINARY_DIR ${3rdPartySourceDir}
    CMAKE_ARGS
      -DCMAKE_INSTALL_PREFIX:string=${3rdPartySourceDir}
    INSTALL_COMMAND ""
)

编辑

此外,我尝试从使用 VS 2015 环境设置的命令行构建它,并且遇到了同样的挂起问题.

Additionally, I've tried building this from the command line set up with the VS 2015 environment and have gotten the same hanging issue.

推荐答案

花了一些时间和一些研究,但我认为我已经重现了您的问题并找到了解决方案.我发现 cl.exe 似乎会挂起,但实际上有一个名为cvtres.exe"的进程正在挂起.当我终止该进程时,编译将继续.KB3118401 似乎修复了一个已知错误.我安装了这个补丁,从那以后我就没有遇到过这个问题.希望这会有所帮助!

It took a while and some research, but I think that I have reproduced your problem and found a solution. I found that cl.exe would seem to hang, but there was a process called "cvtres.exe" that was actually hanging. When I killed that process, the compilation would continue. There appears to be a known bug that KB3118401 seems to fix. I installed this patch and I haven't had the problem since. Hope this helps!

https://www.microsoft.com/en-us/download/details.aspx?id=51161

这篇关于Visual Studio 2015 Win64 在解决方案构建期间挂起的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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