CodeBlocks 10.0+OpenCV 2.4.0配置方法

之前发过关于OpenCV2.4.0VS2010下的永久性配置方法,网上也有OpenCVVC6.0下的配置方法,但是没有看到过OpenCVCodeBlocks下的配置方法,正好抄实验报告抄累了就尝试了一下,结果一次性成功,过程很简单,估计还有多余的步骤,各位可以自己试一下。

首先打开CodeBlocks开发环境,单击菜单栏的Settings->Compiler and Debugger ,就会看到如图1所示界面:

1

单击第二栏的 Search directions栏目,此时界面如图2

2

Compiler栏目里面单击 Add按钮将一下目录一次添加进去:

…\opencv\build\include;

…\opencv\build\include\opencv;

…\opencv\build\include\opencv2"

"…\"表示opencv安装目录)

此时再点击 Linker settings栏目,界面如图3所示:

3

单击 Add"…\opencv\build\x86\vc10\lib"下的所需的库添加进去(我的版本号是2.4.0,并且把所有的库都添加进去了,大家可以视情况而定)

opencv_calib3d240d.lib;opencv_contrib240d.lib;opencv_core240d.lib;

opencv_features2d240d.lib;opencv_flann240d.lib;opencv_gpu240d.lib;

opencv_haartraining_engined.lib;opencv_highgui240d.lib;

opencv_imgproc240d.lib;opencv_legacy240d.lib;opencv_ml240d.lib;

opencv_nonfree240d.lib;opencv_objdetect240d.lib;

opencv_photo240d.lib;opencv_stitching240d.lib;opencv_ts240d.lib;

opencv_video240d.lib;opencv_videostab240d.lib;

如果是release配置,则添加:

opencv_calib3d240.lib;opencv_contrib240.lib;opencv_core240.lib;

opencv_features2d240.lib;opencv_flann240.lib;opencv_gpu240.lib;

opencv_haartraining_engine.lib;opencv_highgui240.lib;

opencv_imgproc240.lib;opencv_legacy240.lib;opencv_ml240.lib;

opencv_nonfree240.lib;opencv_objdetect240.lib;

opencv_photo240.lib;opencv_stitching240.lib;opencv_ts240.lib;

opencv_video240.lib;opencv_videostab240.lib;

最后点击"OK"就完成啦!

posted @ 2013-01-20 15:23  mumushu_s  阅读(2290)  评论(1编辑  收藏  举报