vs发布时所需库运行环境搭建

来源:互联网 发布:linux需掌握的技能 编辑:程序博客网 时间:2024/06/05 16:22
首先你要用depends看看你的程序依赖哪些dll,比如依赖msvcr80.dll、msvcp80.dll、mfc80u.dll
那么你需要这样发布:

/***************************************
yourapp.exe
msvcr80.dll
msvcp80.dll
mfc80u.dll
Microsoft.VC80.CRT.manifest
Microsoft.VC80.MFC.manifest
other_thirdparty.dll
****************************************/


这些文件必须在同一目录下,
Microsoft.VC80.CRT.manifest和Microsoft.VC80.MFC.manifest
可以分别在
Program Files\Microsoft Visual Studio 8\VC\redist\x86\Microsoft.VC80.CRT

Program Files\Microsoft Visual Studio 8\VC\redist\x86\Microsoft.VC80.MFC目录下找到



不是把文件拷过去,而是把vc\redist\目录下相应的cpu下的文件目录也拷过去  可以看下manifest文件里面的<dependentAssembly>
有几个拷几个

<?xml version='1.0' encoding='UTF-8' standalone='yes'?>
<assembly xmlns='urn:schemas-microsoft-com:asm.v1' manifestVersion='1.0'>
  <trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
    <security>
      <requestedPrivileges>
        <requestedExecutionLevel level='asInvoker' uiAccess='false' />
      </requestedPrivileges>
    </security>
  </trustInfo>
  <dependency>
    <dependentAssembly>
      <assemblyIdentity type='win32' name='Microsoft.VC90.CRT' version='9.0.21022.8' processorArchitecture='x86' publicKeyToken='1fc8b3b9a1e18e3b' />
    </dependentAssembly>
  </dependency>
  <dependency>
    <dependentAssembly>
      <assemblyIdentity type='win32' name='Microsoft.VC90.MFC' version='9.0.21022.8' processorArchitecture='x86' publicKeyToken='1fc8b3b9a1e18e3b' />
    </dependentAssembly>
  </dependency>
</assembly>

0 0