这是一本书,记录了我的一生

vs2012更新update2之后编译的程序无法在xp下运行

date: 2013-05-13 21:22:38

今天发布一个更新,用户反馈在xp下无法运行。

出现提示:无法定位程序输入点InitializeCriticalSectionEx 于动态链接库 KERNEL32.dll 上

程序是MFC程序采用静态链接的方式编译的。

之前一直没问题。于是google了下,找呀找,找呀找,找到了这个:http://support.microsoft.com/kb/2835600/en

783276: A fix for ATL & MFC XP targeting is included. This fix addresses the following scenario:

In Visual Studio 2012 Update 2, you create a C++ Win32 Console Application project.

In the application wizard, you select both ATL and MFC.

On the project’s Property Pages screen, you specify the following options:

Platform Toolset: v110_xp

Use of MFC: Use MFC in a Static Library

Use of ATL: Static Link to ATL

You run the application on a computer that is running Windows XP or Windows Server 2003.

In this scenario, you receive the following error message:

Application Name - Entry Point Not Found

The procedure entry point InitializeCriticalSectionEx could not be located in the dynamic link library KERNEL32.dll

原来是这群混蛋更新update2造的bug。已经在update3修复了。于是果断下载之,重新编译之后,终于xp正常打开了。

vs2012 update3 下载地址:http://www.microsoft.com/zh-cn/download/details.aspx?id=39305

在这个页面点下载,然后选择vs2012.3 RC.exe 你看到这篇文章的时候,可能已经不是RC版了,选择类似的就ok

直接点下一步,然后运行,在线安装,我4m宽带,大概十几分钟就装好了。