Run-Time Check Failure #0

今天调试程序遇到一个错误:

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.

看汇编发现出错位置函数的C++ CALL和汇编对不上,推测原因是什么地方定义不一致导致的,一番调查发现,头文件定义有两份,分别位于不同目录且文件定义不一致,因此导致了这个问题。

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top