简体   繁体   中英

Compiler bug? “not a valid win32 application”

I have been working on a very large program, compiling, testing, adding new code, compiling testing - repeat. The program has generally been working fine, but then I added some new code and now when I run the executable, I get a dialog box with "xxx.exe is not a valid Win32 application.", I can only assume this is a bug in the compiler. Has anyone had a problem like this before? Any idea how to work around it or find out what caused it?

EDIT: The program works fine when compiled as "Debug".

EDIT: SOLVED: shut down the compiler, started it again, rebuilt the exe, now it all works. I have no idea why... just one of those things...

Could it be that you mistakenly set target platform to x64 or IA64? That would cause such an error message when attempting to run the app.

Did you try a clean+build (or full rebuild)?

Did you use inline assembly, or specify a specific target CPU in your compiler settings?

In either of those case, it's perhaps possible the compiler is generating instructions for the wrong CPU.

I've had this by messing around with function calling conventions. Check that.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM