Compiled a C++ program in Visual Studio Professional 2013, will not work with Windows XP SP3

user3006910 picture user3006910 · Nov 19, 2013 · Viewed 16.3k times · Source

I usually hate asking questions but this one has me stumped.

I am creating a small game using C++ and Allegro5 in Visual Studio Professional 2013. I have used the Visual Studio 2013 – Windows XP (v120_xp) platform toolset, and made sure the Visual C++ 2013 redistributable was installed on the target machine.

I am developing using Windows 8.1, the target machine is running Windows XP SP2.

Whenever I attempt to run the program I receive a message stating .exe is not a valid Win32 application.

Even though I am not using anything related to .NET I have made sure that was installed on the target machine as well.

I have also made sure that the program itself is a 32 bit application.

I am really not sure what to try next. I have searched for the past few hours and made sure that anything necessary was installed. I am still rather new at this so it's quite possible I overlooked something simple, but I can't for the likes of me think of what.

Answer

Imran Rizvi picture Imran Rizvi · Nov 19, 2013

you have to set the Platform Toolset configuration from properties (preview)

Set its value to v120_xp and it should work on windows xp.

read the post http://supportxpdotcom.wordpress.com/2013/07/16/xp-targeting-support-in-the-visual-studio-2013-preview/

see the comments http://blogs.msdn.com/b/vcblog/archive/2013/06/26/visual-studio-2013-preview-now-available.aspx