C:/WINDOWS/WinSxS/Policies 下有些檔案是確保VC8各個版本DLL相容的
要想把VC8 SP1編譯(串連VC8的LIB)出來的EXE在安裝VC8(沒有SP1)的電腦上使用
除了把幾個DLL目錄考到工作目錄外,還要把C:/WINDOWS/WinSxS/Policies下的對應檔案考到對方的系統目錄下
<?xml version='1.0' encoding='UTF-8' standalone='yes'?><br /><assembly xmlns='urn:schemas-microsoft-com:asm.v1' manifestVersion='1.0'><br /> <dependency><br /> <dependentAssembly><br /> <assemblyIdentity type='win32' name='Microsoft.VC80.DebugCRT' version='8.0.50727.762' processorArchitecture='x86' publicKeyToken='1fc8b3b9a1e18e3b' /><br /> </dependentAssembly><br /> </dependency><br /> <dependency><br /> <dependentAssembly><br /> <assemblyIdentity type='win32' name='Microsoft.VC80.DebugMFC' version='8.0.50727.762' processorArchitecture='x86' publicKeyToken='1fc8b3b9a1e18e3b' /><br /> </dependentAssembly><br /> </dependency><br /> <dependency><br /> <dependentAssembly><br /> <assemblyIdentity type='win32' name='Microsoft.VC80.DebugCRT' version='8.0.50608.0' processorArchitecture='x86' publicKeyToken='1fc8b3b9a1e18e3b' /><br /> </dependentAssembly><br /> </dependency><br /></assembly>
上面檔案表明,這個執行檔案需要兩個版本的VC8庫,但是對於安裝了SP1的來說,沒有VC8的庫,所以需要POLICIES制定SP1相容VC8的庫。
以上步驟解決這個問題:
我用SP1編譯一個EXE,其中串連一個VC8(無SP1)的LIB,現在要放到無SP1或者VC8的電腦上使用。