title: Error in OpenCV 2.4.2 "OpenCV Error: Bad flag"
body: <p>I just started trying to play with OpenCV and I wrote a small program from a book that is pretty simple. The problem is when I  try to compile it, I get this error. I will give you all the information I have. I installed openCV using homebrew for Mac OS X 10.7.</p>
  
  <pre><code>#include &lt;opencv2/core/core.hpp&gt;
  #include &lt;opencv2/highgui/highgui.hpp&gt;
  
  int main(int argc, char *argv[])
  {
  cv::Mat image = cv::imread("usf.gif");
  cv::namedWindow("My Image");
  cv::imshow("My Image", image);
  cv::waitKey(5000);
  
  return 1;
  }
  </code></pre>
  
  <p>I compiled liked this:</p>
  
  <pre><code>g++ -o test opencvtest.cc -lopencv_core -lopencv_imgproc -lopencv_calib3d -lopencv_video -lopencv_features2d -lopencv_ml -lopencv_highgui -lopencv_objdetect -lopencv_contrib -lopencv_legacy
  </code></pre>
  
  <p>And this is what I got back when I tried to run it.</p>
  
  <pre><code>OpenCV Error: Bad flag (parameter or structure field) (Unrecognized or unsupported array type) in cvGetMat, file /tmp/homebrew-opencv-2.4.2-oQmu/OpenCV-2.4.2/modules/core/src/array.cpp, line 2482
  terminate called throwing an exceptionAbort trap: 6
  </code></pre>
  
  <p>Thanks again.</p>