{"id":151,"date":"2008-01-24T15:42:40","date_gmt":"2008-01-24T15:42:40","guid":{"rendered":"http:\/\/www.cclo.idv.tw:8080\/blogs\/wordpress\/?p=151"},"modified":"2008-01-24T15:42:40","modified_gmt":"2008-01-24T15:42:40","slug":"_about_the_dependency_of_win32","status":"publish","type":"post","link":"https:\/\/blog.cclo.idv.tw\/?p=151","title":{"rendered":"[\u7b46\u8a18] About the dependency of Win32 executables compiled by Visual C++ 2005\/2008&#8230;."},"content":{"rendered":"<ol>\n<li>\n<p>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.<\/p>\n<p>This can be solved by asking VC++ to link CRT libraries statically, instead of using DLLs:<\/p>\n<p><strong>Project<\/strong> -&gt; <strong>(project name) Properties...<\/strong> -&gt; <strong>Configuration Properties<\/strong> -&gt; <strong>C\/C++<\/strong> -&gt; <strong>Code Generation<\/strong>. Set <strong>Runtime Library<\/strong> to <strong>\"Multi-Threaded (\/MT)\"<\/strong> or <strong>\"Multi-Threaded Debug (\/MTd)\"<\/strong>.<\/p>\n<\/li>\n<li>\n<p>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 \"<strong>depends.exe<\/strong>\", located in <strong>&lt;VisualStudio_Folder&gt;Common7Tools<\/strong>, if installed. The other is <strong>dumpbin.exe<\/strong>, located in <strong>&lt;VisualStudio_Folder&gt;VCbin<\/strong>, with the \/DEPENDENTS option.<\/li>\n<\/ol>\n","protected":false},"excerpt":{"rendered":"<p>The Win32 executables (non-managed) compiled by VC++ 20 [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[13],"tags":[],"table_tags":[],"class_list":["post-151","post","type-post","status-publish","format-standard","hentry","category--computer-science"],"aioseo_notices":[],"jetpack_sharing_enabled":true,"jetpack_featured_media_url":"","jetpack-related-posts":[],"_links":{"self":[{"href":"https:\/\/blog.cclo.idv.tw\/index.php?rest_route=\/wp\/v2\/posts\/151","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.cclo.idv.tw\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.cclo.idv.tw\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.cclo.idv.tw\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.cclo.idv.tw\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=151"}],"version-history":[{"count":0,"href":"https:\/\/blog.cclo.idv.tw\/index.php?rest_route=\/wp\/v2\/posts\/151\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.cclo.idv.tw\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=151"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.cclo.idv.tw\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=151"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.cclo.idv.tw\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=151"},{"taxonomy":"table_tags","embeddable":true,"href":"https:\/\/blog.cclo.idv.tw\/index.php?rest_route=%2Fwp%2Fv2%2Ftable_tags&post=151"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}