2

私の VS2008 プロジェクトは、dll を生成し、他の 2 つの静的ライブラリにリンクします。生成されたマニフェストは次のとおりです。

<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"></requestedExecutionLevel>
      </requestedPrivileges>
    </security>
  </trustInfo>
  <dependency>
    <dependentAssembly>
      <assemblyIdentity type="win32" name="Microsoft.VC90.CRT" version="9.0.21022.8" processorArchitecture="x86" publicKeyToken="1fc8b3b9a1e18e3b"></assemblyIdentity>
    </dependentAssembly>
  </dependency>
  <dependency>
    <dependentAssembly>
      <assemblyIdentity type="win32" name="Microsoft.VC90.CRT" version="9.0.30729.4148" processorArchitecture="x86" publicKeyToken="1fc8b3b9a1e18e3b"></assemblyIdentity>
    </dependentAssembly>
  </dependency>
</assembly>

したがって、私の dll は CRT アセンブリの 2 つの異なるバージョンに依存しています。この二重依存の原因を知り、これを修正するにはどうすればよいですか? vc9.0 のデフォルトの動作であるため、dll を元のバージョンのアセンブリにバインドしたいと考えています。

私のコードには、特定のアセンブリ バージョンにバインドすることを示す定義が含まれていません。

#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

また

#define _BIND_TO_CURRENT_VCLIBS_VERSION 1;

ここのmsdn Webサイトで説明されているように

4

0 に答える 0