OpenCV 2.1.0 with Visual Studio 2008

 OpenCV 2.1.0 with Visual Studio 2008

  • These instructions were tested with Visual C++ 9.0 (as part of Visual Studio 2008 Professional).  These instructions do not apply to Visual Studio 2010 which uses a different system for setting VC configuration.

     

    Install OpenCV

     

  1. 直接下载Download the OpenCV 2.1.0 Windows installer from SourceForge - "OpenCV-2.1.0-win32-vs2008.exe".免得编译的麻烦和时间空间。

  2. 安装到一个目录,例如"C:/OpenCV210,  创建环境变量 $openCVDir 。
  3. During installation check the option to add it to your Current User PATH

 

Configure Visual Studio

  1. Open VC++ Directories configuration: Tools > Options > Projects and Solutions > VC++ Directories

  2. Choose "Show directories for: Include files" :包含文件
    1. Add "$(openCVDir)/include/opencv"
  3. Choose "Show directories for: Library files" : 库文件
    1. Add "$(openCVDir)/lib"
  4. Choose "Show directories for: Source files" :源文件
    1. Add "$(openCVDir)/src/cv"
    2. Add "$(openCVDir)/src/cvaux"
    3. Add "$(openCVDir)/src/cxcore"
    4. Add "$(openCVDir)/src/highgui"

 

Configure your Project

After you've created a project you'll need to add the OpenCV dependencies.

  1. Open Project Properties: Project > %projectName% Properties...

  2. Open Linker Input properties: Configuration Properties > Linker > Input

  3. Open the "..." window to edit "Additional Dependencies" and on each line put:
    1. "cv210.lib"
    2. "cxcore210.lib"
    3. "highgui210.lib"
    4. And any other lib file necessary for your project
  4. Your project should now build. If you get any errors try restarting Visual Studio and then doing a clean Rebuild
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值