findContours出错 Debug Assertion Failed!Expression:_pFirstBlock == pHead vs2013

出错在这一句语句:

findContours(openimage, temptours, CV_RETR_EXTERNAL, CV_CHAIN_APPROX_NONE);


网络上找原因,很多,一遍遍检查,最后按照这个 

Under Property > C++ > code generation > Runtime libarary:
If the MSVC Runtime library is set to Multi-threaded Debug DLL (/MDd), then this is no problem (it works fine).

If the MSVC Runtime library is set to Multi-threaded Debug (/MTd), then it will throw this error, which can be fixed with the following instructions.


因为是在mfc下,又出现这个错误:

 #error :  Building MFC application with /MD[d] (CRT dll version) requires MFC shared dll version. P

如下解决:

将类封装成DLL时,因为类中使用了CDC类,所以需要# include “stdafx.h”.

编译时出现错误:Building MFC application with /MD[d] (CRT dll version)requires MFC shared dll version

该错误解决方法如下:
对着你的项目点击右键,依次选择:属性->配置属性->常规,然后右边有个“项目默认值”(Project Defaults),下面有个"MFC的使用"(Use of MFC),选择“在共享 DLL 中使用 MFC”(Use MFC in a Shared DLL),就OK了~~~

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值