views:

90

answers:

3

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...

A: 

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.

Mark B
There is no inline assembly. I don't think I have set any CPU specific compilation options and anyway I have not changed the compiler options recently.
Mick
+2  A: 

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)?

rubenvb
I didn't set a target of x64 or IA64. I did clean+build.
Mick
A: 

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

DeadMG