Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Not a valid Win32 Application  (Read 6933 times)

0 Members and 2 Guests are viewing this topic.

Flash619

  • Full Member
  • ***
  • Posts: 142
    • View Profile
Not a valid Win32 Application
« 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!

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: Not a valid Win32 Application
« Reply #1 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?
Laurent Gomila - SFML developer

Flash619

  • Full Member
  • ***
  • Posts: 142
    • View Profile
Re: Not a valid Win32 Application
« Reply #2 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. :)


Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: Not a valid Win32 Application
« Reply #3 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?
Laurent Gomila - SFML developer

Flash619

  • Full Member
  • ***
  • Posts: 142
    • View Profile
Re: Not a valid Win32 Application
« Reply #4 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.

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11032
    • View Profile
    • development blog
    • Email
Re: Not a valid Win32 Application
« Reply #5 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.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

Flash619

  • Full Member
  • ***
  • Posts: 142
    • View Profile
Re: Not a valid Win32 Application
« Reply #6 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.
« Last Edit: October 26, 2012, 07:30:19 pm by Flash619 »

Flash619

  • Full Member
  • ***
  • Posts: 142
    • View Profile
Re: Not a valid Win32 Application
« Reply #7 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?

Flash619

  • Full Member
  • ***
  • Posts: 142
    • View Profile
Re: Not a valid Win32 Application
« Reply #8 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 fixes it. You can then select a different platform toolset. :)
« Last Edit: October 26, 2012, 09:03:52 pm by Flash619 »