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

查看:62
本文介绍了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/zh-cn/download/details.aspx?id=51161

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

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