Compile MFC program with VS 2012 running on Windows XP

I have VS 2012 on Windows 7. I want to create an MFC program that can run on Windows XP. However, I received the following error while I moved the exe file to Windows XP: "This is not a valid win32 application."

After exploring the Internet, I found that I had to install Visual Studio 2012 Update 1 and change the platform toolkit 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 get another error while I run the exe file in Windows XP: "The initialization point of the starting point of the procedure cannot be located in the dynamic library KERNEL32.dll".

Now I do not know what to do :( I really appreciate if someone can help me :).

Please note that I tried a simple MFC dialog program without adding code to it.

+7
source share
1 answer

This is a bug in Visual Studio 2012 Update 2 . Link has a workaround for Update 2 (albeit for the community), and Microsoft has this to say:

Submitted by Microsoft on 05/06/2013 at 16:16

Yes, this is fixed in Update 3

So, it’s best to go back to update 1 or wait for update 3.

EDIT Visual Studio 2012 Update 3 Release Candidate is released with a go-live license . Reservation:

Support Statement :

Visual Studio 2012 3 RC update and Team Foundation Server 2012 update with 3 RC update - "go-live". This means that customers can use these assemblies in production environments. These are still pre-release versions , so there may be some bugs that will be fixed for the final release. Update from Update 3 RC to Update 3 RTM is supported. In order to upgrade to future releases, a client must first upgrade from Update 3 RC to Update 3 RTM.

More information is available here .

EDIT 2 Turns off rollback until update 1 breaks Visual Studio ...

+2
source

All Articles