在vs里面调用opencv函数时通常需要在工程建好之后添加附加依赖项,否则编译时,会出现各种错误。vs中,可以设置程序的不同版本release和debug两种,不同的版本附加依赖项是有很大区别的。
在opencv 2.3.1中debug对应的附加依赖项为:
opencv_calib3d231d.lib
opencv_contrib231d.lib
opencv_core231d.lib
opencv_features2d231d.lib
opencv_flann231d.lib
opencv_gpu231d.lib
opencv_haartraining_engined.lib
opencv_highgui231d.lib
opencv_imgproc231d.lib
opencv_legacy231d.lib
opencv_ml231d.lib
opencv_objdetect231d.lib
opencv_ts231d.lib
opencv_video231d.lib
而在release中,对应附加依赖项为:
opencv_calib3d231.lib
opencv_contrib231.lib
opencv_core231.lib
opencv_features2d231.lib
opencv_flann231.lib
opencv_gpu231.lib
opencv_haartraining_engine.lib
opencv_highgui231.lib
opencv_imgproc231.lib
opencv_legacy231.lib
opencv_ml231.lib
opencv_objdetect231.lib
opencv_ts231.lib
opencv_video231.lib
通过以上,可以看出二者具有明显的区别,记录在这里作为提醒,因为自己经常把release下的附加依赖项弄错
原文链接:https://www.f2er.com/javaschema/286227.html