title: Difficulties configuring openCV library in Visual C++
body: <p>I'm trying to configure my Visual C++ to use the openCV libraries.  I've followed the instructions on OpenCV website <a href="http://opencv.willowgarage.com/wiki/VisualC%2B%2B" rel="nofollow">http://opencv.willowgarage.com/wiki/VisualC%2B%2B</a>...</p>
  
  <pre><code>// OpenCV_Helloworld.cpp : Defines the entry point for the console application.
  // Created for build/install tutorial, Microsoft Visual Studio and OpenCV 2.2.0
  
  #include "stdafx.h"
  
  #include &lt;cv.h&gt;
  #include &lt;cxcore.h&gt;
  #include &lt;highgui.h&gt;
  
  int _tmain(int argc, _TCHAR* argv[])
  {
          // Open the file.
          IplImage *img = cvLoadImage("photo.jpg");
          if (!img) {
                  printf("Error: Couldn't open the image file.\n");
                  return 1;
          }
  
          // Display the image.
          cvNamedWindow("Image:", CV_WINDOW_AUTOSIZE);
          cvShowImage("Image:", img);
  
          // Wait for the user to press a key in the GUI window.
          cvWaitKey(0);
  
          // Free the resources.
          cvDestroyWindow("Image:");
          cvReleaseImage(&amp;img);
  
          return 0;
  }
  </code></pre>
  
  <p>I have altered the include and library directories in VC++ directories inside the Property Pages, and have added the additional dependencies.  However, when I try and load an image with the same header files as the sample code, it says that cvLoadImage is undefined, as is cvNamedWindow  </p>
  
  <pre><code>IplImage *img = cvLoadImage("JellyFish.jpg");
  </code></pre>
  
  <p>Any suggestions as to where I might have my problem? </p>