在vs2010+opencv2.2中是因为少了opencv_objdetect220d.lib,
我使用#pragma comment(lib, "lib_name")这种形式了添加库文件,虽然方便但是有时候少了某一个特定库,就抓狂了。
还是在项目配置里面设置比较好,那样系统自己就会自己找到所需的lib文件。
最后添加一句,问题就没有了。编译通过。
#pragma comment(lib, "opencv_objdetect220d.lib")