How to configue OpenCV in Visual Studio – Reprice

It has been quite a while since last time I post a howto of configuring OpenCV in Visual Studio. The post got a lot of attention and comments. As the the configuring has become simpler, the post becomes a bit bulky and out-of-date. So right now I am considering to rewrite the howto with a much simpler version.

  • Open Visual Studio, add following path to
    Tools–>Options–>Projects–>VC++ Directories–>Include files

    C:\Program Files\OpenCV\cv\include
    C:\Program Files\OpenCV\otherlibs\highgui
    C:\Program Files\OpenCV\cxcore\include
    C:\Program Files\OpenCV\otherlibs\cvcam\include
  • Add following path to Tools–>Options–>Projects–>VC++ Directories–>Library files
    C:\Program Files\OpenCV\lib
  • When create a new project,
    add following to “Project–>Properties–>Linker->Input–>Additonal dependencies

    cv.lib highgui.lib cvaux.lib cxcore.lib

    NOTE there is no difference between debug or release configurations

  • Tested on OpenCV 1.0 with Visual Studio 2008

    Links
    Original blogspot link1 link2.
    Li Hao’s post.

    Related Post

    1. October 6th, 2009 | 7:25 pm

      [...] How to configue OpenCV 1.0 in Visual Studio – Reprice 技术贴 7:25 pm by 果子 [...]

    2. Dave
      February 11th, 2010 | 4:41 am

      Thanks! Life saver. Had been trying to get 2.0a working on a win7 64bit machine and eventually gave up… this worked first time like a charm.