The following error messages are generated during MIDL compilation:
typedef [string] struct foo {
short x;
short y;
};
typedef short Array[-1]
const short x = 2;
void Foo(void)
There are two situations that usually generate this error:
·The MIDL compiler failed to recover after detecting an error in the IDL file. If MIDL returned any error messages about your IDL file, try fixing them and recompiling. If there are no error messages, the compiler may have failed before it could report an error. Look for a syntax error on the line for which the internal compiler error is reported.
·The MIDL compiler could not generate correct code under a specified optimization option. Try changing compiler modes, compiling in mixed-mode optimization (/Os), or removing all optimizations. Or, recompile using the /no_format_opt flag to suppress MIDL's default optimization of procedure and type descriptors.
Occasionally this error occurs even when the IDL file is correct and no optimization options are being used. If this is the case, try rewriting the section of code in the vicinity of where the error was reported by removing any recent modifications, simplifying or rearranging data types, changing prototypes, or begin to comment out portions of the IDL file to locate the problem code.
If none of these options works, or if you think the problem may be related to a bug in MIDL.EXE, please notify Microsoft, giving all the relevant details.