如何留下 Visual Studio 2013 dll 依赖项? [英] How to leave Visual Studio 2013 dlls dependencies behind?

查看:27
本文介绍了如何留下 Visual Studio 2013 dll 依赖项?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的应用程序在其他计算机上打开时会出现缺少 msvcr"something".dll 的错误,我发现要解决此问题,他们需要安装以下内容:http://www.microsoft.com/en-us/download/details.aspx?id=40784

My application when opened in others computer will give an error missing msvcr"something".dll, I found out that to fix this they need to install the following: http://www.microsoft.com/en-us/download/details.aspx?id=40784

适用于 Visual Studio 2013 的 Visual C++ 可再发行包.

Which is Visual C++ Redistributable Packages for Visual Studio 2013.

我想用可执行文件中的 dll 编译程序,这可能吗?

I would like to compile the program with the dlls in the executable already, is such thing possible?

如果不可能,我在哪里可以得到所有的 dll 放在编译的项目文件夹中?

If not possible, where can I get all the dlls to put in the compiled project folder?

推荐答案

项目设置中尝试将/MT设置为Release,将/MTd设置为Debug->C/C++->代码生成.这将使您的程序不依赖于 Visual Studio 库.但请注意,您将链接的所有库/项目也应该在那里具有相同的选项,否则您会遇到令人讨厌的链接器错误.

Try to set /MT for Release and /MTd for Debug in Project Settings->C/C++->Code Generation. This will make your program not dependent on Visual Studio libraries. But beware that all the libraries/ projects you will link with should also have the same option there, otherwise you'll get nasty linker errors.

您可能还希望在 General->Platform Toolset 中选择 v120_xp 使您的程序能够在 Windows XP 上运行

You may also wish to select v120_xp in General->Platform Toolset for your program to be able to run on Windows XP

这篇关于如何留下 Visual Studio 2013 dll 依赖项?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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