开发者社区> 老朱教授> 正文
阿里云
为了无法计算的价值
打开APP
阿里云APP内打开

Redistributing an Application and Binding It to Specific Libraries

简介:
+关注继续查看

Visual Studio 2008

Updated: July 2008

The libraries for Visual Studio often are updated after a release. For example, this can occur when you install a service pack. Applications that are designed with the updated libraries might depend on some changes that were made in the latest releases. The application might behave in unexpected ways if you transfer it to a user who has not installed the same libraries. To protect against this unexpected behavior, you can bind your application to a specific version of the libraries.

Default Binding Behavior


This section describes the default behavior of applications compiled with Visual C++ 2008 and later releases. When you compile an application, it is bound to the original release version of libraries available. This is true even if you have a later release installed on your computer. For example, if you have Visual C++ 2008 SP1 installed on your computer, any applications that you compile on this computer will still depend on the original release version of Visual C++ 2008.

This behavior is of no consequence if you deploy your application by installing in a central location. By using this distribution scheme, the latest libraries will always be available to the end user. However, if you use a local deployment method, such as with private assemblies as described in the topic How to: Deploy using XCopy, this behavior is important.

The default binding behavior enables you to recompile your program after you obtain a new release, and to distribute the new executable. The end users who already installed the necessary libraries will need only the new executable; you will not have to package and reinstall the latest libraries.

NoteNote:

If your application depends on functionality introduced in the latest release, you must distribute and reinstall the new libraries, or else the application will not run.

How to Bind to Specific Versions


If you want to force your application to require that the latest libraries be installed on your computer, use one or more of the following lines of code:

Copy

#define _BIND_TO_CURRENT_CRT_VERSION 1
#define _BIND_TO_CURRENT_ATL_VERSION 1
#define _BIND_TO_CURRENT_MFC_VERSION 1
#define _BIND_TO_CURRENT_OPENMP_VERSION 1

Use the following line of code to bind your application to the current version of all your Visual C++ libraries. This is a union of all the previous lines of code.

Copy

#define _BIND_TO_CURRENT_VCLIBS_VERSION 1;

NoteNote:

We recommend that you define these macros at the command-line level. If you prefer to include the definitions in code, you must put them at the very start of every compilation unit - such as the first lines in stdafx.h.

When you bind your application to a set of libraries, it will not run on a computer that has an earlier version of those libraries. If you bind your application to a specific minimum version, we recommend that you ship your application together with the required version of the libraries.

See Also


Concepts

Redistributing Visual C++ Files


本文转自海天一鸥博客园博客,原文链接:http://www.cnblogs.com/sgsoft/archive/2010/09/19/1831306.html,如需转载请自行联系原作者

版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。

相关文章
AI风口退潮,GTC 2018将聚焦应用与落地
AI风口退潮,GTC 2018将聚焦应用与落地
35 0
ABAP git客户端的简单介绍
ABAP git客户端的简单介绍
25 0
ABAP git客户端的简单介绍
Jerry习惯把自己写的小程序放到自己的github上:https://github.com/i042416
83 0
我的CSDN博客十年
版权声明:本文为半吊子子全栈工匠(wireless_com,同公众号)原创文章,未经允许不得转载。 https://blog.csdn.net/wireless_com/article/details/84144030 一不留神,已经在CSDN写了十年的博客(http://blog.csdn.net/wireless_com)。
1557 0
Ad Hoc Distributed Queries的启用与关闭
原文:Ad Hoc Distributed Queries的启用与关闭 启用Ad Hoc Distributed Queries: exec sp_configure 'show advanced options',1 reconfigure exec sp_configure '...
1156 0
RAP Mock 工具模拟数据
这是一个 帮助前端开发 模拟ajax请求数据的工具,在官网有很详细的视频教程。这里用最简单的总结帮你快速入门。 首先点击链接进行注册 http://rapapi.org/org/group.action?plid=16929 1 按照引导顺序  依次 登录创建团队-创建产品线 创建分组 接下来看到的就是产品界面了 2 PC端接口下面的铅笔图标进入编辑页面 3 点击添加参数可以按照自己的需求增加变量 4 最后预览数据上面复制Mock数据链接 就能查看数据了。
1280 0
应用ROWDEPENDENCIES行级跟踪,查询oracle表中数据行上最后的DML时间
  在Oracle 10g中的引入了ORA_ROWSCN伪列新特性。基于此种伪列所提供的信息,我们可以方便地找出某个数据块或某一个行最近被修改的时间戳。它又分为两种模式:一种是基于block这是默认的模式(块级跟踪,非行依赖性(NOROWDEPENDENCIES));还有一种是基于row上,这种模式只能在建里表时指定ROWDEPENDENCIES(行级跟踪),不可以通过后期的alter  table语句来将表修改为ROWDEPENDENCIES。
1373 0
一些第三方类库的作用和网址
<div id="article_content" class="article_content" style="margin:35px 0px; font-size:15px; color:rgb(85,85,85); line-height:35px; font-family:'microsoft yahei'"> <p style="margin-top:0px; margin-b
1201 0
【技术贴】三星Note8 N5100实用教程,关闭相机快门声,增加浏览器退出按钮。
需要root 增加快门声按钮: 在\system\csc\目录下,有个others.xml的手机功能定制文件,用root explorer之类可以修改系统文件权限的文本修改工具编辑它,在文件最末添加这样一行:TRUE重启手机,在相机设置里就会出现快门声开关选项。
1003 0
+关注
3545
文章
0
问答
文章排行榜
最热
最新
相关电子书
更多
低代码开发师(初级)实战教程
立即下载
阿里巴巴DevOps 最佳实践手册
立即下载
冬季实战营第三期:MySQL数据库进阶实战
立即下载