__CrtDbgReport说明
http://msdn.microsoft.com/zh-tw/library/vstudio/8hyw4sy7(v=vs.90).aspx
- int _CrtDbgReport(
- int reportType,
- const char *filename,
- int linenumber,
- const char *moduleName,
- const char *format [,
- argument] ...
- );
- int _CrtDbgReportW(
- int reportType,
- const wchar_t *filename,
- int linenumber,
- const wchar_t *moduleName,
- const wchar_t *format [,
- argument] ...
- );
这个函数是用来判断错误类型的。
可是问题出现在这里:
- // crt_crtdbgreport.c
- #include <crtdbg.h>
- int main() {
- #ifdef _DEBUG //这里定义了一个宏
- CrtDbgReport(_CRT_ASSERT, NULL, NULL, "some module", NULL);
- #endif
- }
用release版,或者把debug版本中预编译头的_debug去掉,这样在函数执行的时候就不会出现这个问题了。
具体是为什么每次只要执行CrtDbgReport 就出现错误我也不太明白。
其他的什么改多线程为多线程调试…… 貌似都没用
还有 忽略libcmt.lib库 这个是处理冲突的库的。感觉这个问题可能也是库冲突,可是找不到。
联系客服