[筆記] About the dependency of Win32 executables compiled by Visual C++ 2005/2008....

| 有 1 篇回應文章 | 被引用了 0 次
  1. The Win32 executables (non-managed) compiled by VC++ 2005/2008 (Express) cannot be executed on all Windows PC's, if default project settings are used. This is because, by default, the executables are configured to use the dynamic version of C run-time (CRT) library. Each version of VC++ provides its version of CRT DLL, which is not guaranteed to presents on every Windows PC.

    This can be solved by asking VC++ to link CRT libraries statically, instead of using DLLs:

    Project -> (project name) Properties... -> Configuration Properties -> C/C++ -> Code Generation. Set Runtime Library to "Multi-Threaded (/MT)" or "Multi-Threaded Debug (/MTd)".

  2. Another solution is to distribute necessary DLL's along with the executable. Two tools can help to check the DLL dependencies of an executable. One is "depends.exe", located in <VisualStudio_Folder>\Common7\Tools, if installed. The other is dumpbin.exe, located in <VisualStudio_Folder>\VC\bin, with the /DEPENDENTS option.

此文章所屬分類:

沒有人引用這篇文章

本篇文章的引用網址:http://www.cclo.idv.tw/cgi-bin/mtos_4.1/mt-tb.cgi/87

回應、批評與指教(目前有 1 篇)

作者:closer Author Profile Page

Reference: "Understanding Dependencies of a Visual C++ Application" by MSDN Library
URL: http://msdn2.microsoft.com/en-us/library/ms235265.aspx

Please be noted that the URL might be invalid, since MSDN changes all the time....

留下您的意見

關於這位部落客

  • closer
  • 被人叫大叔的年紀。
  • 滿地撿得到的資訊工程師。
  • 喜歡酒精、搖滾樂、電影、電玩、漫畫、電腦、棒球、拍照、女孩子。
  • 討厭薑、青椒、芋頭、政客、煙味、キャプテン翼、張學友。
  • 會中文、英文、日文、客家話、河洛話、C 語言。

活動支援

關於這篇文章

這篇文章是 closerJanuary 24, 2008 3:42 PM 發表的。

前一篇文章:《2007 最後回顧 + 囍訊

後一篇文章:《恭賀新禧!

回到本站首頁,或是檢視所有的文章彙整列表

Powered by Movable Type 4.1