简体   繁体   English

部署应用程序,C ++,Visual Studio 2015社区版本

[英]Deploy app, C++, Visual Studio 2015 community version

I'm trying to deploy a C++ app for use on multiple systems. 我正在尝试部署可在多个系统上使用的C ++应用程序。 I've already gotten everything to work in the release configuration. 我已经在发行版配置中完成了所有工作。 Now since i don't have any experience with deploys at all, i'd like to ask - what's the simplest way to deploy it from Visual Studio 2015 community, so that it could be installed as a portable app on flash drives and similar? 现在,由于我完全没有任何部署经验,我想问一下-从Visual Studio 2015社区部署它的最简单方法是什么,以便可以将其作为便携式应用程序安装在闪存驱动器或类似设备上? I've checked out google, but with no luck so far all of the solutions i checked require some sort of additional software that is only available for the pro version of VS. 我已经检查过google,但是到目前为止,我检查过的所有解决方案都没有运气,需要某种附加软件,这些附加软件仅适用于VS的专业版。

The simplest possible answer would be: compile without dependency on VC++ runtime libraries (select this in the project properties -> C++ -> code generation) and choose the oldest Windows version it should run on (in project properties -> general). 最简单的答案可能是:不依赖VC ++运行时库进行编译(在项目属性-> C ++->代码生成中选择此选项),然后选择应在其上运行的最旧Windows版本(在项目属性->常规中)。 Maybe even select Windows XP compatibility. 甚至选择Windows XP兼容性。

This should be enough, unless your program depends on other libraries or optional Windows features that may be not present. 这应该足够了,除非您的程序依赖于其他库或可能不存在的可选Windows功能。

And test a lot :) 并测试很多:)

-- dd -dd

You should be able to go to your project's Properties (right click on your project) then under C/C++ and Code Generation switch your Runtime Library from Multi-threaded DLL (/MD) to Multi-threaded (/MT) . 您应该能够转到项目的Properties (右键单击您的项目),然后在C/C++Code GenerationRuntime LibraryMulti-threaded DLL (/MD)切换到Multi-threaded (/MT)

This way your dependencies to the runtime library will be statically linked and not require you to have any of them installed at the target system. 这样,您对运行时库的依赖项将被静态链接,并且不需要您在目标系统上安装任何依赖项。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM