0

I've built a program in my Win7 64BIT in C++, and I want to share it with my Windows XP 32 bit computer.

When I run the release build in my Windows XP, it says invalid win32 application..

but when I'm in the Project Configurator, theres a marker on the "Platform - Win32", so I have no idea why am I getting this error..

the EXE works perfectly at my computer..

By the way, the windows XP does not have Visual Studio or any other similar program installed...

Things I have tried : - I've installed updates to the VS - Update 4, and choose in the Platform Toolset - Visual Studio 2012 - Windows XP (v110_xp), yet I still get the same error...

Thanks!

Amit
  • 683
  • 3
  • 12
  • 25
  • Is CRT installed? Do you use any additional external dependency? Just check with dependency walker (on XP). – Adriano Repetti Jun 12 '14 at 11:51
  • 1
    are you linking with any libraries that were perhaps compiled with the non v110_xp toolset? – mark Jun 12 '14 at 11:54
  • 1
    I guess that I have found the answer right [here][1] [1]: http://stackoverflow.com/questions/10095716/c-binary-doesnt-work-on-windows-xp – lifeOfPI Jun 12 '14 at 11:54
  • Have you [checked](http://superuser.com/questions/358434/how-to-check-if-a-binary-is-32-or-64-bit-on-windows) if the exe is really a 32 bit executable? – Csq Jun 12 '14 at 11:55
  • @lifeOfPI [this](http://stackoverflow.com/questions/13130713/how-to-compile-for-win-xp-with-visual-studio-2012) question says that it is supported after Update 1. So Amit, do you have Update 1 installed? – Csq Jun 12 '14 at 11:58
  • 1
    that answer not correct... XP is supported... I use 2012 and 2013 to build XP-targeted binaries. – mark Jun 12 '14 at 12:10
  • XP can work with the v110_xp toolset provided you compile your application and all of its dependencies with the v110_xp toolset. I have successfully done this for one of my applications. – drescherjm Jun 12 '14 at 12:15
  • I've got Update 4, and I'm not using any external libraries. all the libraries are Windows.h / common VS libraries. In the project properties, it is marked as a Win32 project. – Amit Jun 12 '14 at 12:20

2 Answers2

2

Make sure your XP machine is fully updated. Windows XP Service Pack 3 (SP3) for x86 is supported, but not previous service packs. Note: same is true for VS2013 except the toolset changed to v120_xp

mark
  • 5,269
  • 2
  • 21
  • 34
0

By default Visual C++ programs require the C++ redistributable to run that are built with Visual Studio. So the client machine has to have it installed. Make sure your client machine have the actual or higher version of C++ redist installed and then try again.

You can search in MS Developer Center to download it or you might find it poking around the VS installation disk.

However, MS has removed support for XP, so not sure that you will be able to install the latest C++ Redist into it. But worth a try.

brainless coder
  • 6,310
  • 1
  • 20
  • 36
  • 3
    Is really "invalid win32 application" the error message if the redistributable is missing? – Csq Jun 12 '14 at 12:00