我需要安装什么才能获得Windows Server 2012 R2 Standard上运行的C ++ hello world .exe的x64调试版本?

问题描述 投票:0回答:1

我使用Visual Studio 2019中的模板创建了C ++控制台应用程序。

#include <iostream>
int main()
{
    std::cout << "Hello World!\n";
}

当我将.exe复制到服务器时,>>

  1. 调试x64版本产生错误(缺少VCRUNTIME140_1d.dll)
  2. 发布x64构建作品
  3. 服务器是:Windows Server 2012 R2 Standard,64位

读取this question / answer表示不允许重新分发调试DLL。

我需要在服务器上调试,并且我已经支付了所有许可证的费用。

我需要安装什么才能在服务器上运行调试版本?例如完整的Visual Studio,Windows SDK,vc_redist.x64.exe?

比较开发机器和服务器上已安装的程序时:服务器上未安装Windows SDK。

我使用Visual Studio 2019中的模板创建了一个C ++控制台应用程序。#include int main(){std :: cout <] >>

我需要安装什么才能获得C ++ hello world的x64调试版本在Windows Server 2012 R2 Standard上运行的.exe?

第一

,感谢汉斯的所有帮助。

您可以尝试以下步骤:

Step

[1)exe文件迁移到新服务器时,应将VCRUNTIME140_1d.dll中的C:\Program Files (x86)\Microsoft Visual Studio\2019\xxx(VS version)\VC\Redist\MSVC\14.xx.xxx\debug_nonredist\x64\Microsoft.VC142.DebugCRT与exe文件放在一起。

例如,将VCRUNTIME140_1d.dll复制到存在hello world.exe文件的Debug

文件夹中,然后将整个Debug文件夹迁移到新服务器中。

[2)或仅在服务器上安装vc_redist.x64.exe

更多内容可以参考this link

c++ windows debugging visual-studio-debugging
1个回答
0
投票

我需要安装什么才能获得C ++ hello world的x64调试版本在Windows Server 2012 R2 Standard上运行的.exe?

最新问题
© www.soinside.com 2019 - 2025. All rights reserved.