Saturday, December 31, 2011

Ensuring Compatible Calling Conventions Eclipse

Runtime error:

Run-Time Check Failure #0 - The value of ESP was not properly saved across a function call. This is usually a result of calling a function declared with one calling convention with a function pointer declared with a different calling convention.

Solution: in Eclipse, verify that Property pages -> configuration properties -> C/C++ -> Advanced -> Calling convention is the same in the callee as well as the caller. For example, make sure any DLLs that your project depends on were compiled with the same calling convention.

No comments:

Post a Comment