使用Visual Studio 2012并使用较旧的平台工具集进行编译? [英] Use Visual Studio 2012 and compile with older platform toolset?

查看:179
本文介绍了使用Visual Studio 2012并使用较旧的平台工具集进行编译?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

问题

我使用Visual Studio 2012开发C ++ DLL。在某些机器上,无法加载这些DLL,因为缺少设置为v110的平台工具集。

I'm using Visual Studio 2012 to develop C++ DLLs. On some machines these DLLs can not be loaded, because the platform toolset, which is set to "v110" is missing.

我已尝试安装较旧的c ++运行时。他们没有安装,因为已经安装了较新的版本。我还安装了当前的Windows SDK,但是还没有其他可以从v110选择的项目。

I have tried to install older c++ runtimes. They didn't install because "a newer version is already installed". I also installed the current Windows SDK, but there are still no other items to choose from than v110.

问题

如何使用较旧版本的C ++运行时编译C ++ DLL,以便在非开发人员机器上运行?

How can I compile my C++ DLL with an older version of the C++ runtime so it will run on non-developer machines?

< img src =https://i.stack.imgur.com/tKMwH.pngalt =平台工具集v110>

推荐答案

根据 MSDN上的此页,您需要具有相应的版本的Visual Studio(2008或2010)或相关的Windows SDK平台工具集下拉列出这些版本:

According to this page on MSDN, you need to have the corresponding version of Visual Studio (2008 or 2010), or the relevant Windows SDK for the "Platform Toolset" drop down to list those versions:


更改目标平台工具集,必须安装相关版本的Visual Studio或Windows平台SDK。

To change the target platform toolset, you must have the associated version of Visual Studio or the Windows Platform SDK installed.

您也似乎在Platform Toolset中有点混淆,Platform Toolset控制哪个编译器/链接器/ etc。用于您的应用程序,以及运行您的应用程序所需的Visual C ++可再发行组件。您不能在用户的PC上安装平台工具集,也不能在开发PC上安装特定的Visual C ++可再发行组件。

You also seem to be a little bit confused between "Platform Toolset", which controls which compiler/linker/etc. is used to build your application, and "Visual C++ Redistributable", which is needed to run your application. You can't install a "Platform Toolset" on a user's PC, and nor will you make one available by installing a particular "Visual C++ Redistributable" on your development PC.

另外,据我所知,Visual C ++可再发行组件不包括MFC运行时。它们可作为单独的MSI合并模块(MSM)使用。

Also, as far as I know, the Visual C++ Redistributable doesn't include the MFC runtimes. They're available as a separate MSI merge module (MSM).

这篇关于使用Visual Studio 2012并使用较旧的平台工具集进行编译?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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