【现象】:
在lib中,有如下代码
int* pn = new int[3];
delete []pn;
在运行时出错, _BLOCK_TYPE_IS_VALID 或者 _CrtIsValidHeapPointer
【原因】:
在debug版本中
lib中用的md连接,exe用的也是md连接
【解决】:
都改成mdd,或者至少把exe改成mdd
时间: 2024-12-18 10:45:56
【现象】:
在lib中,有如下代码
int* pn = new int[3];
delete []pn;
在运行时出错, _BLOCK_TYPE_IS_VALID 或者 _CrtIsValidHeapPointer
【原因】:
在debug版本中
lib中用的md连接,exe用的也是md连接
【解决】:
都改成mdd,或者至少把exe改成mdd