VS2008¶
- 首先创建一个Win32控制台程序
- 选择Solution Explorer里的项目,右键选择Properties。
- 在链接器的输入,为项目的Debug配置增加 [附加依赖项 Additional Dependencies]:opencv_calib3d231d.lib; opencv_contrib231d.lib; opencv_core231d.lib; opencv_features2d231d.lib; opencv_flann231d.lib; opencv_gpu231d.lib; opencv_highgui231d.lib; opencv_imgproc231d.lib; opencv_legacy231d.lib; opencv_ml231d.lib; opencv_objdetect231d.lib; opencv_ts231d.lib; opencv_video231d.lib,一定要一条一条分别加入,一条一行(一个回车),否则会出现编译错误
- 同理,在项目的Release配置增加[附加依赖项 Additional Dependencies]:opencv_calib3d231.lib; opencv_contrib231.lib; opencv_core231.lib; opencv_features2d231.lib; opencv_flann231.lib; opencv_gpu231.lib; opencv_highgui231.lib; opencv_imgproc231.lib; opencv_legacy231.lib; opencv_ml231.lib; opencv_objdetect231.lib; opencv_ts231.lib; opencv_video231.lib。
- 以后每次新建项目时,都需要做如下步骤,并且都需要运用到已经设定好的编译头。
- 若遇到无法运行 cmd。exe时,调整下里面的PATH就行。
载入中...