I have the VS 2012 on windows 7. I want to build a MFC program which can be run on windows XP. However I received the following error while I moved the exe file to windows XP: “It is not a valid win32 application”.
After exploring on internet, I discovered that I should install Visual Studio 2012 Update 1 and change the Platform toolset from “Visual Studio 2012 (v110)” to “Visual Studio 2012 - Windows XP (v110_xp)”. I also changed the target machine to “MachineX86 (/MACHINE:X86)”. This time I receive another error while I run the exe file on windows XP: “the procedure entry point initializecriticalsection could not be located in the dynamic library KERNEL32.dll”.
Now I do not know what to do :(. I do appreciate if some can help me :).
Please note that I tried a simple dialog MFC program without adding any code to it.
This is a bug in Visual Studio 2012 Update 2 . The link has a workaround for Update 2 (although a community sourced one), and Microsoft has this to say:
Posted by Microsoft on 06/05/2013 at 16:16
Yes, this is fixed in Update 3
So your best bet is to roll back to Update 1 or wait for Update 3.
EDIT Visual Studio 2012 Update 3 Release Candidate has been released with "go-live" licensing . Caveat:
Statement of Support :
Visual Studio 2012 Update 3 RC and Team Foundation Server 2012 with Update 3 RC are “go-live”. This means that customers can use these builds in production environments. These are still pre-releases , so there may be some bugs that will be fixed for the final release. Upgrade from Update 3 RC to Update 3 RTM is supported. In order to upgrade to future releases, the customer must first upgrade from Update 3 RC to Update 3 RTM.
More information is available here .
EDIT 2 Turns out rolling back to Update 1 breaks Visual Studio ...
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.