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
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
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 (http://go4answers.webhost4life.com/Example/vs2010-created-exe-not-valid-win32-app-123210.aspx)
reconmax, could you post an EXE which generates this error?
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 Versionalso in
Linker -- General -- Versionfrom properties of your project in visual studio..