title: 0xC000001D: Illegal Instruction when running cvHaarDetectObjects opencv
body: <p>I get 0xC000001D: Illegal Instruction when running cvHaarDetectObject. Below is my code</p>
  
  <pre><code>int main() {
  
  IplImage* img;
  img = cvLoadImage( "lena.jpg",1);
  
  CvMemStorage* storage = cvCreateMemStorage(0);
  CvHaarClassifierCascade* cascade = (CvHaarClassifierCascade*)cvLoad( "haarcascade_frontalface_alt2.xml" );
  
  
  static CvScalar colors[] = { {{0,0,255}}, {{0,128,255}}, {{0,255,255}}, 
  {{0,255,0}}, {{255,128,0}}, {{255,255,0}}, {{255,0,0}}, {{255,0,255}} };
  
  // Detect objects
  cvClearMemStorage( storage );
  CvSeq* objects = cvHaarDetectObjects( img, cascade, storage, 1.1, 2, 0, cvSize(40, 40) );
  
  CvRect* r;
  // Loop through objects and draw boxes
  for( int i = 0; i &lt; (objects ? objects-&gt;total : 0 ); i++ ){
      r = ( CvRect* )cvGetSeqElem( objects, i );
      cvRectangle( img, cvPoint( r-&gt;x, r-&gt;y ), cvPoint( r-&gt;x + r-&gt;width, r-&gt;y + r-&gt;height ),
          colors[i%8]);
  }
  
  cvNamedWindow( "Output" );
  cvShowImage( "Output", img );
  cvWaitKey();
  
  
  cvReleaseImage( &amp;img );
  
  return 0;
  }
  </code></pre>
  
  <p>Is it something wrong with setup? I can compile the code, but when i run it, i get illegal instruction error, when the program run until cvHaarDetectObjects.</p>
  
  <p>I have included all the lib files and place image inside the same directory of my project.</p>
  
  <p>I'm using VS2010, Opencv2.4.3</p>
  
  <p>Thanks and Best Regards</p>