0

Here is my situation. I have tried for three days to configure opencv with my visual studio 2012 but it keeps on failing. I want to know how to solve it as quick as possible:

  1. My computer is 64 bit operating System
  2. System variables set:

    Name: OPENCV_DIR

    Value: c:\opencv\build\x64\vc10

  3. PATH: add %OPENCV_DIR%\bin

  4. In Properties I add

    -c/c++ -> Additional Include Directories -> i add '$(OPENCV_DIR)\..\..\include'

    -Linker -> General -> Additional Library Directories-> i add '$(OPENCV_DIR)\lib'

  5. I also put all the libraries in it as well

    • Linker -> Input -> Additional Dependencies
  6. I open a new emtry project

Finall I try the sample code found in the official web of opencv http://docs.opencv.org/doc/tutorials/introduction/windows_visual_studio_Opencv/windows_visual_studio_Opencv.html#windows-visual-studio-how-to (Under "Test it")

However, it keeps fail all the time! First , it says there is a mis matched in the machine, thus I change the file from x64 to x86. kLater I see a bulid success, but it can not find the PDB file.

I have no idea why it does not work. I suppose this simple example does not work mean that my configuration fails as well.

halfer
  • 19,824
  • 17
  • 99
  • 186
Carl
  • 105
  • 3
  • 12
  • Have a look [here](http://stackoverflow.com/a/31545237/5008845). It's for OpenCV 3.0.0 and VS2013 32bit, but you'll get the the general idea on the steps. Just minor changes to adapt to your configurations. – Miki Aug 19 '15 at 14:39
  • very very urgent... what's the problem on a missing pdb file? your program should still run?!? – Micka Aug 19 '15 at 14:41
  • Have you set the your VS project to x64 (default is x86)? You are using 64bit libs (c:\opencv\build\x64\vc10) – Miki Aug 19 '15 at 14:42
  • @Carl what happens if you run the successfully built program that misses a pdb file? Does it work or does it fail? If it fails, what kind of error do you get? – Micka Aug 19 '15 at 14:48
  • @Miki Let me have a look first will answer, Let me make sure what is the problem.Thank you. – Carl Aug 19 '15 at 15:00
  • Thx Miki, I did it based on your steps First, I found that I wrongly included both debug and release version of the lib files together thus causing conflict. Also I choose the wrong run time library , everything works now, thank you very much for your help. – Carl Aug 20 '15 at 14:36

0 Answers0