title: OpenCV unresolved external errors with objdetect.hpp functions (C++)
body: <p>I'm trying to compile a simple face detection program in C++ in VS2010 and have come across two LNK 2019 errors:</p>
  
  <blockquote>
    <p>Error 2 error LNK2019: unresolved external symbol _cvReleaseHaarClassifierCascade referenced in function _main</p>
    
    <p>Error 3 error LNK2019: unresolved external symbol _cvHaarDetectObjects referenced in function "void __cdecl detectFaces(struct _IplImage *)" (?detectFaces@@YAXPAU_IplImage@@@Z)</p>
  </blockquote>
  
  <p>Relevant code lines:</p>
  
  <pre><code>cvReleaseHaarClassifierCascade( &amp;cascade );
  </code></pre>
  
  <p>...</p>
  
  <pre><code>  CvSeq *faces = cvHaarDetectObjects(  img,  cascade,  storage,  1.1,  3,  0, /*CV_HAAR_DO_CANNY_PRUNNING*/  cvSize( 40, 40 ) );
  </code></pre>
  
  <p>I couldn't really find many references to this particular issue and I believe all the relevant libraries/directories are as they should be for the solution. </p>
  
  <p>When I go to the function definitions it finds them in objdetect.hpp but what I don't understand is why I'm getting these LNK errors?</p>