News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests
NB: Posting URL's See here: Posted URL Change

Main Menu

WinXP "Prog.exe is not a valid Win32 application."

Started by reconmax, January 18, 2013, 09:02:51 AM

Previous topic - Next topic

reconmax

I wrote a program using Masm32. I compiled it on a Win7x64 box and it runs fine. But on WinXp it generates an error when it runs.
"Prog.exe is not a valid Win32 application."
I thought maybe it was a 64 vs 32 bit issue but when I look at project properties in Visual Studio it indicates  x86 for target machine.

Any ideas why this is happening? Here are my includes if it is helpful...


include \Masm32\Include\windows.inc
include \Masm32\Include\kernel32.inc
include \Masm32\Include\masm32.inc
include \Masm32\Include\masm32rt.inc


And the command line...


/OUT:"C:\Data\Prog\trunk\Debug\Prog.exe" /MANIFEST /NXCOMPAT /PDB:"C:\Data\Prog\trunk\Debug\Prog.pdb" /DYNAMICBASE
"kernel32.lib" "user32.lib" "gdi32.lib" "winspool.lib" "comdlg32.lib" "advapi32.lib" "shell32.lib" "ole32.lib" "oleaut32.lib" "uuid.lib"
"odbc32.lib" "odbccp32.lib" /DEBUG /MACHINE:X86 /ENTRY:"start" /INCREMENTAL /PGD:"C:\Data\Prog\trunk\Debug\Prog.pgd"
/SUBSYSTEM:WINDOWS /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /ManifestFile:"Debug\Prog.exe.intermediate.manifest"
/ERRORREPORT:PROMPT /NOLOGO /TLBID:1




dedndave

include \Masm32\Include\windows.inc
include \Masm32\Include\kernel32.inc
include \Masm32\Include\masm32.inc
include \Masm32\Include\masm32rt.inc


the last one takes care of the previous 3
but, that's not the problem
we need more info about the program source

Greenhorn

Yes, and we need more info about which version of Visual Studio you use and which SP is installed on your XP.
Maybe this helpes you a little bit: VS2010-created EXE not a valid WIN32 app under W2000
Kole Feut un Nordenwind gift en krusen Büdel un en lütten Pint.

Antariy

reconmax, could you post an EXE which generates this error?

Dubby

QuoteI thought maybe it was a 64 vs 32 bit issue but when I look at project properties in Visual Studio it indicates  x86 for target machine

you need to define the minimum required version in

Linker -- System -- Minimum Required Version

also in

Linker  -- General -- Version

from properties of your project in visual studio..