vs2010 遇 “堆损坏”问题: 无编译错误,错误提示:
Windows has triggered a breakpoint in **.exe.
This may be due to a corruption of the heap, which indicates a bug in **.exe or any of the DLLs it has loaded.
This may also be due to the user pressing F12 while **.exe has focus.
症状:编译正常通过,在未更改代码前,运行无错,添加了一些输入输出源码后报错;
问题原因: 查了几篇博文,发现问题应该出在DLL导出方面,有提示:导入导出STL库会导出此错误;经过进一步确定,发现再修改函数时,确实加入一个以vector问输入的参数的函数,并将其导出。删去这一函数后,无错。
后续:几次编译过程,发现还是有出入,可能与导出string有关