夏天/isummer

Sun of my life !Talk is cheap, Show me the code! 追风赶月莫停留,平芜尽处是春山~

博客园 首页 新随笔 联系 管理

问题场景:

  当用VSIDE开发完一个项目,在部署到目标环境中时,配置文件OK,但是报错需要调试

《1》Deploying Visual C++ library DLLs as shared assemblies

  VC++的Redistributable Package,可以被用来部署“release”版本的VC++ 库文件。 往往在VCIDE中有三个版本(1)X86, (2)X64, (3)IA64, 分别可以单独用于不同版本的Windows操作系统。

  这个包只能安装release版本的Visual C++库。

  而debug版本的VisualC++库或者使用debug versions of Visual C++ Merge Modules模块,或者Debug versions can either be deployed as private assemblies两种方式处理。

debug Merge Modules能处理debug版本的应用。

  it is possible to install a merge module by using Windows Installer (msiexec.exe)

步骤

(1)新建文件结构,保证开发环境与部署环境的文件结构一致。

  For this example, create a \bin folder and copy myapplication.exe there. Then create a \bin\mylibrary folder and copy MyLibrary.dll there.

(2)把这个文件拷贝到目标设备中。

(3)Visual C++ Redistributable Package (vcredist_x86.exe),把这个文件拷贝到目标设备中:

  这个文件在开发PC上的位置:%PROGDIR%\Microsoft Visual Studio 8\SDK\v2.0\Bootstrapper\Packages\vcredist_x86\vcredist_x86.exe

  如果是VC++ eXpress版本,则没有这个文件,可以在Microsoft Visual C++ 2005 Redistributable Package (x86).下载。

  http://translate.google.cn/#en/zh-CN/Redistributable%20Package

(4)运行(vcredist_x86.exe)。

  这样,安装VisualC++库文件为共享的方式文件。在目标设备中:On a target computer with support for manifest-based binding of applications to their dependencies (Windows XP Home Edition, Windows XP Professional, Windows Server 2003, Windows Vista), the libraries are installed in the WinSxS folder.

  vcredist_*.exe installs only the release versions of Visual C++ DLLs.

(5)你的应用可以在目标设备上执行。

 

 

 

参考网址:

  https://msdn.microsoft.com/en-us/library/ms235291(VS.80).aspx

posted on 2016-10-07 03:41  夏天/isummer  阅读(308)  评论(0编辑  收藏  举报