Settings | Sign in | Sign up

The author has 5 posts.

【方法】让用Visual Studio 2012编译的程序能够在Windows XP系统上运行

Floor 1 巨大八爪鱼 2/16/16 14:18

第一步:打开工程属性,在配置中选择“Release”,然后在“常规”中把“平台工具集”设置为“Visual Studio 2012 - Windows XP (v110_xp)”

Floor 2 巨大八爪鱼 2/16/16 14:24

第二步:在“C/C++->代码生成”里面将“运行库”设置为“多线程 (/MT)”


默认情况下,所有的操作系统都无法运行VS2012编译的程序,包括最新的Windows 10在内。除非系统上已经安装了Visual Studio 2012运行库。

如果在一个工程中执行了这一步骤的话,编译出来的程序就能直接在Windows Vista及其以上系统运行,无需安装VS2012运行库。

Floor 3 巨大八爪鱼 2/16/16 14:29

第三步:选择“链接器/系统”,可以看到“子系统”栏目已经被自动设置为了“窗口 (/SUBSYSTEM:WINDOWS)”或“控制台 (/SUBSYSTEM:CONSOLE)”
如果没有自动设置,请根据项目类型手动设置。


点击确定按钮关闭这个对话框。

Floor 4 巨大八爪鱼 2/16/16 14:33

第四步:重新打开工程属性,仍然选择配置“Release”,选择“链接器/系统”。看看右边的“所需的最低版本”是否已经自动填上了5.01。如果没有的话那么请手动填上。

Floor 5 巨大八爪鱼 2/16/16 14:34
第五步:关闭对话框后,在工具栏选择“Release”版本,然后生成程序即可。

Content converter:

Reply the post
Content:
User: You are currently anonymous.
Captcha:
Unclear? Try another one.
©2010-2025 Purasbar Ver3.0 [Mobile] [Desktop]
Except where otherwise noted, content on this site is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported license.