c++ - 使用 Visual Studio 生成的 exe 在其他电脑上创建 dll 错误

标签 c++ windows visual-studio dll visual-studio-2017

我用 Visual Studio 编写了一个程序,我想与一些 friend 分享。但是,当获取包含包含我的 .exe 文件的调试文件夹的完整文件夹并将其发送给 friend 时,它会抛出 3 个错误:
缺少 vcruntime140.dll
缺少 MSVCP140D.dll
缺少 urctbased.dll
(顺序可能不正确) 我们尝试在 this 上重新安装/更新 Microsoft Visual C++ Redistributable 2017 x64页面,但没有任何积极的结果。
我正在使用 SDL2 库,这可能是个问题吗?我将 SDL2.lib 复制到他们的 Syswow64 文件夹和 system32 文件夹中,这消除了特定的 .dll 错误,但使其他错误首先出现。

最佳答案

在构建项目之前选择 Realese 选项,然后将整个 Release 文件夹发送给您的 friend 应该可以解决此问题。

关于c++ - 使用 Visual Studio 生成的 exe 在其他电脑上创建 dll 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48621682/

相关文章:

c++ - Clang++ 3.5.0-rdynamic

c++ - 赋值运算符改变赋值对象的值

c++ - 替换失败有时是一个错误

windows - 如何获得音频驱动程序的 native 采样率 (Windows)

visual-studio - Visual Studio 2010 : "value does not fall within expected range" when trying to create a content type

c++ - 在 Rcpp (C++) 中的同一代码中多次声明一个变量

c++ - 模拟后从映射的驱动器号获取 UNC 路径

c - Winsock 编程中的超时

c++ - 如何在顶部栏中的VS中设置 “Start without debugging”

visual-studio - Visual Studio 如何在 "solution folder"中查找文件