title: OpenCV cvLoadImage() does not load images in visual studio debugger?
body: <p>I am trying to work out a simple hello world for OpenCV but am running out of ideas as to why it is not working.</p>
  
  <p>When I compile and run this code:</p>
  
  <pre><code>#include &lt;cv.h&gt;
  #include &lt;highgui.h&gt; 
  int main(int argc, char* argv[])
  {
   IplImage* img = cvLoadImage( "myjpeg.jpg" );
   cvNamedWindow( "MyJPG", CV_WINDOW_AUTOSIZE );
   cvShowImage("MyJPG", img);
   cvWaitKey(0);
   cvReleaseImage( &amp;img );
   cvDestroyWindow( "MyJPG" );
   return 0;
  }
  </code></pre>
  
  <p>I get a grey box about 200x200 instead of the indicated .jpg file.  If I use a different jpg I get the same kind of window, and if I put an invalid filename in, I get a very tiny window (expected).</p>
  
  <p>I am using Visual Studio 2008 under Windows 7 Professional.</p>
  
  <p>Most of the sample programs seem to work fine, so I am doubly confused how that code loads the sample jpgs just fine but in the code above it does not work (even tried the sample jpeg).</p>
  
  <h2>Update</h2>
  
  <p>The executables produced by compiling work fine, however the Visual Studio 2008 debugger loads a null pointer into img every time I try to run the debugger - regardless if the file location is implicit or explicit.</p>