【mfc】_pFirstBlock==pHead解决办法

来源:互联网 发布:最早的程序员 编辑:程序博客网 时间:2024/05/29 18:34

遇到调试错误:Expression: _pFirstBlock==pHead。查阅了好久不知道是什么原因。最后发现是工程设置问题。现已经解决了。

----------》debug版下:属性--配置属性--C/C++--代码生成--运行库:
Multi-threaded Debug DLL (/MDd)

1>e:\visual studio\vc\atlmfc\include\afx.h(24): fatal error C1189: #error :  Building MFC application with /MD[d] (CRT dll version) requires MFC shared dll version. Please #define _AFXDLL or do not use /MD[d]

----------》工程->属性- >配置属性->c++->命令行
结尾加上
/D "_AFXDLL" 

 

以上转自http://blog.csdn.net/u013346007/article/details/51638320

For unknown reasons, some versions of opencv (2.x at least) have a CMake variable "BUILD_WITH_STATIC_CRT" that by default gets set to on, thus causing issues like that. Disable that flag, then the solution should get generated with /MDd defined.

Secondarily, open your exe file in dependency walker. Look for multiple versions of MS C++ runtime libraries. For example, you may have a version of QT built against msvcp110.dll (visual studio 2012) but your current project uses msvcp120.dll (visual studio 2013).

 

以上转自http://stackoverflow.com/questions/26803975/debug-assertion-failed-pfirstblock-phead-using-opencv
0 0
原创粉丝点击