title: Installing OpenCV on mac error
body: <p>I am having a rough time installing OpenCV on mac(OS X 10.8.4) and xcode 4.6.3.</p>
  
  <p>I have tried Macports and Homebrew for the same and failed and not even close anywhere to run it.
  Error usually is 'Error: Failed to install bzip2' or 'Error: Processing of port opencv failed'. I am behind a proxy and that might be a problem. </p>
  
  <p>The easiest and most close method to completion was is:
  Using Cmake and then OpenCV to install using terminal.
  Then using xcode  as shown at <a href="http://sadeepj.blogspot.in/2012/03/installing-and-configuring-opencv-to.html" rel="nofollow">http://sadeepj.blogspot.in/2012/03/installing-and-configuring-opencv-to.html</a> but the problem is occurred while building project  in xcode 
  I set the value of Header Search Paths to /usr/local/include  and even added these 2 files 'libopencv_core.2.4.5.dylib &amp; libopencv_highgui.2.4.5.dylib' to project.</p>
  
  <p>Main.cpp file</p>
  
  <pre><code>   #include &lt;iostream&gt;
     #include &lt;opencv2/opencv.hpp&gt;
  
     using namespace std;
     using namespace cv;
  
     int main (int argc, const char * argv[])
     {
         Mat img = imread("/Users/mhtgwl/Desktop/baba.jpg"); //Change the image path here.
         if (img.data == 0) {
             cerr &lt;&lt; "Image not found!" &lt;&lt; endl;
             return -1;
         }
         namedWindow("image", CV_WINDOW_AUTOSIZE);
         imshow("image", img);
         waitKey();
     }
  </code></pre>
  
  <p>The error is "ld: library not found for -lopencv_core.2.4.5
  clang: error: linker command failed with exit code 1 (use -v to see invocation)"
  and I have tried changing OS target version and changing library search path to /usr/local/include but it does not help.</p>