Compiled program error win32 invalid

hello, at the moment I am using visual studio 2012 on windows 7.
but, when I have compiled my programs and run them on an older pc to test out its functions, I receive an error saying that the program is not a "valid win32 application." I have even tested this with a very simple hello world console application, but the problem still remains. Where is the error coming from? is the application corrupted during transport? (upload to internet) or are programs compiled on win 7 incompatible with win xp
Could it be that your windows 7 operating system is 64-bit, and you're compiling your programs as 64-bit?
how would i switch it from 64 to 32 ?
and if 64 doesn't work with 32, does all 32 work with 64 ?
Last edited on
All (99%) of 32bit programs run under 64bit systems.
You are probably on a 32bit system compiling for 64bit.

Which compiler do you use? (Don't use MingW-w64)
EDIT: Whoops, you wrote it. Well you should be able to find it in the Project Properties screen.

Right Click on your project in the Solution Explorer, Properties, and it's either Compiler->System or Linker->System, and choose 64bit (in Subsystem).

If that doesn't do the trick, it's probably because you are using Debug library.
Compile in Release mode, and try that one. Regular PC's don't have debug libraries and you should not distribute them (Illegal)
Last edited on
Another reason could be wrong version of toolset
in project properties under "Configuration Properties->General" you will find "Platform Toolset". If this reads "Visual Studio 2012 (v110)" then it won't work with XP change it to "Visual Studio 2012 - Windows XP (v110_xp)"

This will work on XP and 7, of course check correctness of 32/64 bit as well.
Codewalker,
what are toolsets? are you saying that my program can only be compiled so as to be able to run only on certain versions of windows("windows xp toolset or windows 7 toolset")? if so, then how are other applications able to run on such a wide range of systems ?
If you compile for Windows XP, your program is likely to work the same way on Windows 7, but if you want to take advantage of W7's features (Custom Aero Glass area, Taskbar-Peek Media Buttons/Taskbar Progressbar) it's easier to use the W7 toolkit.
Topic archived. No new replies allowed.