【現象】:
在lib中,有如下代碼
int* pn = new int[3];
delete []pn;
在運行時出錯, _BLOCK_TYPE_IS_VALID 或者 _CrtIsValidHeapPointer
【原因】:
在debug版本中
lib中用的md連接,exe用的也是md連接
【解決】:
都改成mdd,或者至少把exe改成mdd
【現象】:
在lib中,有如下代碼
int* pn = new int[3];
delete []pn;
在運行時出錯, _BLOCK_TYPE_IS_VALID 或者 _CrtIsValidHeapPointer
【原因】:
在debug版本中
lib中用的md連接,exe用的也是md連接
【解決】:
都改成mdd,或者至少把exe改成mdd