Skip to content

Instantly share code, notes, and snippets.

@T2hhbmEK
Last active August 29, 2015 14:12
Show Gist options
  • Save T2hhbmEK/d3f6d7d75f5f66d565f8 to your computer and use it in GitHub Desktop.
Save T2hhbmEK/d3f6d7d75f5f66d565f8 to your computer and use it in GitHub Desktop.
Setup OpenCv 24.10 with Visual Studio 2013

Setup OpenCv 24.10 with Visual Studio 2013

  1. 安装OpenCv到"C:\opencv"

  2. 编辑环境变量

  • 命令提示符(管理员)

    setx -m OPENCV_DIR D:\OpenCV\Build\x86\vc12     (编译32位程序)
    setx -m OPENCV_DIR D:\OpenCV\Build\x64\vc12     (编译64位程序)
    
  • 在环境变量"PATH"后添加

    %OPENCV_DIR%\bin
    
  • 注销/重启

  1. 项目>属性>配置管理器>活动解决方案配置>新建
名称: OpenCv_Debug
从此处复制设置: Debug
  1. 项目>属性>配置属性>
  • C/C++>常规>附加包含目录

    $(OPENCV_DIR)\..\..\include
    
  • 链接器>常规>附加库目录

    $(OPENCV_DIR)\lib
    
  • 链接器>输入>附加依赖项>编辑

    opencv_core2410d.lib
    opencv_imgproc2410d.lib
    opencv_highgui2410d.lib
    opencv_ml2410d.lib
    opencv_video2410d.lib
    opencv_features2d2410d.lib
    opencv_calib3d2410d.lib
    opencv_objdetect2410d.lib
    opencv_contrib2410d.lib
    opencv_legacy2410d.lib
    opencv_flann2410d.lib
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment