January 2008 文章彙整

  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.

關於這位部落客

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

活動支援

關於這份文章總覽

本頁列出了所有於 January 2008 張貼的文章。

前一份總覽:December 2007

後一份總覽:February 2008

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

Powered by Movable Type 4.1