SFML community forums

Help => General => Topic started by: Flash619 on October 26, 2012, 06:15:46 pm

Title: Not a valid Win32 Application
Post by: Flash619 on October 26, 2012, 06:15:46 pm
Ok, so I know this has NOTHING to do with SFML. But for some reason, if I compile my application in Visual Studio, then copy it onto a Windows XP 32 bit virtual machine. I get this error

"(path to program) Is not a valid Win32 Application..."

I checked my build config under Build -> Configuration Manager and it's set to build using "Win32"

So I'm a bit confused as to why this is happening. :/ I was hoping someone else may have a idea or two to just throw at me. If it's doing this on XP my guess would be, that it would happen on a lot of other versions of windows as well.

Any ideas? Big thanks in advance!
Title: Re: Not a valid Win32 Application
Post by: Laurent on October 26, 2012, 06:30:58 pm
Quote
if I compile my application in Visual Studio
On which OS? Which APIs does it use? Do you build for x86 or x64?
Title: Re: Not a valid Win32 Application
Post by: Flash619 on October 26, 2012, 06:54:31 pm
Quote
if I compile my application in Visual Studio
On which OS? Which APIs does it use? Do you build for x86 or x64?

Test Virtual Machine:
Windows XP 32bit Pro

API: ?? Not sure what you mean by that. I'm using Visual Studio 2012 to compile C++ with /NT along with SFML libraries.

The configuration manager says its platform is "Win32" So I'm guessing its building for x86.

Let me know what other info you need. :)

Title: Re: Not a valid Win32 Application
Post by: Laurent on October 26, 2012, 06:58:04 pm
Quote
API: ?? Not sure what you mean by that
I mean the software libraries that your project uses.

Does it also happen with an empty program
int main()
{
    return 0;
}
?

Did you test it on other XP machines?
Title: Re: Not a valid Win32 Application
Post by: Flash619 on October 26, 2012, 07:04:07 pm
Quote
API: ?? Not sure what you mean by that
I mean the software libraries that your project uses.

Does it also happen with an empty program
int main()
{
    return 0;
}
?

Did you test it on other XP machines?

I just made a blank Win32 console app in Visual Studio. It gave me the same thing.

Yes, I have a friend in Iowa with a Windows XP 32 bit PC, he has the same issue.
Title: Re: Not a valid Win32 Application
Post by: eXpl0it3r on October 26, 2012, 07:09:09 pm
You're probably compiling for ARM platform or similar...
Make sure you really compile for the x86 architecture.
Title: Re: Not a valid Win32 Application
Post by: Flash619 on October 26, 2012, 07:10:03 pm
You're probably compiling for ARM platform or similar...
Make sure you really compile for the x86 architecture.

And how do I do that? *novice*

Everything I read online yesterday about it only told me to check the configuration manager.

Just for testing, I'm also setting up a 32 bit windows 7 machine.
Title: Re: Not a valid Win32 Application
Post by: Flash619 on October 26, 2012, 07:41:10 pm
So it runs fine on a Windows 7 32bit machine. So what does windows 7 have, that windows XP does not by default?
Title: Re: Not a valid Win32 Application
Post by: Flash619 on October 26, 2012, 08:39:13 pm
Did I find the answer?

http://stackoverflow.com/questions/11305633/xxxxxx-exe-is-not-a-valid-win32-application

Quote
VS 2012 applications cannot be run under Windows XP.

If anyone else has this issue. This update (http://www.microsoft.com/en-us/download/details.aspx?id=34818) fixes it. You can then select a different platform toolset. :)