1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
<b>16</b>
17
<b>18</b>
19
20
<b>21</b>
22
23
24
25
26
27
28
29
30
31
什麼是RSS?
部落格大巴使用指南
部落格大巴模闆中心
免費注冊部落格大巴
一鍵部落格搬家工具
中文互動雜志城客
xingzhe
軟體學習筆記&心得。
<< SVN的導入和導出 | 首頁 | Window列印體系 >>
版權聲明:轉載時請以超連結形式标明文章原始出處和作者資訊及本聲明
http://xingzhesun.blogbus.com/logs/27746345.html
最近使用VS2005+codejock開發,需要做一個Release版本。當我把必要的mfc庫,拷貝到exe目錄下時。exe還是不能啟動。
經過網上查找,看到一篇文章。“解決"應用程式配置不正确,程式無法啟動"”
URL :http://www.cnblogs.com/wuhanhoutao/archive/2008/01/09/1031928.html
于是乎。我按照文章所講的,将dl和mainfest檔案。統統從VS2005的redis檔案下,拷貝到exe目錄下。
呵呵,居然exe可以運作了。
但是:1.肯定有些dll是目前exe不需要的。還需要将之删除。
2.manifest也許是必須的一個檔案。
這篇文章是這樣講的。
在使用 VC++2005環境下生成的程式,放置到未安裝VC環境的機器下後,有時候會出現程式無法執行的錯誤,其提示是:應用程式配置不正确,程式無法啟動,重新安裝應用程式可能解決問題。
實際上,重裝是解決不了問題的,解決的一種方法是檢視*exe.intermediate.manifest檔案,比如檔案的内容是:
<?xml version='1.0' encoding='UTF-8' standalone='yes'?>
<assembly xmlns='urn:schemas-microsoft-com:asm.v1' manifestVersion='1.0'>
<dependency>
<dependentAssembly>
<assemblyIdentity type='win32' name='Microsoft.VC80.CRT' version='8.0.50727.762' processorArchitecture='x86' publicKeyToken='1fc8b3b9a1e18e3b' />
</dependentAssembly>
</dependency>
<assemblyIdentity type='win32' name='Microsoft.VC80.MFC' version='8.0.50727.762' processorArchitecture='x86' publicKeyToken='1fc8b3b9a1e18e3b' />
<assemblyIdentity type='win32' name='Microsoft.VC80.DebugCRT' version='8.0.50727.762' processorArchitecture='x86' publicKeyToken='1fc8b3b9a1e18e3b' />
</assembly>
需要注意這個檔案中的3個關鍵詞:Microsoft.VC80.CRT,Microsoft.VC80.MFC和Microsoft.VC80.DebugCRT。尋找到...."Program Files"Microsoft Visual Studio 8"VC"redist檔案夾下面,找到這些名稱的子檔案夾,拷貝它們下面所有的檔案到希望釋出的EXE檔案下面,一起打包。這些檔案也就是mfc80.dll,msvcr80.dll,msvcp80.dll和Microsoft.VC80.CRT.manifest等。此錯誤發生的原因是在目标機器上需要這些檔案的支援。