title: "ld: symbol(s) not found for architecture x86_64" for OpenCV 3
body: <p>I have installed OPENCV 3 using CMAKE on mac Yosemite. I am using Eclipse IDE and while building the solution its showing error:</p>
  
  <pre><code>g++ -L/usr/local/lib -o "test1"  ./main.o   -lopencv_imgcodecs -lopencv_highgui -lopencv_core
  Undefined symbols for architecture x86_64:
    "cv::VideoCapture::read(cv::_OutputArray const&amp;)", referenced from:
        _main in main.o
    "cv::VideoCapture::VideoCapture(int)", referenced from:
        _main in main.o
    "cv::VideoCapture::~VideoCapture()", referenced from:
        _main in main.o
    "cv::VideoCapture::get(int) const", referenced from:
        _main in main.o
    "cv::VideoCapture::isOpened() const", referenced from:
        _main in main.o
  ld: symbol(s) not found for architecture x86_64
  clang: error: linker command failed with exit code 1 (use -v to see invocation)
  make: *** [test1] Error 1
  </code></pre>
  
  <p>I have added the header files and Libraries in the settings. Please help me get rid of this error.
  Thanks in advance</p>
  
  <p>Code:</p>
  
  <pre><code>#include "opencv2/highgui/highgui.hpp"
  #include &lt;iostream&gt;
  
  using namespace cv;
  using namespace std;
  
  int main(int argc, char* argv[])
  {
      VideoCapture cap(0); // open the video camera no. 0
  
      if (!cap.isOpened())  // if not success, exit program
      {
          cout &lt;&lt; "Cannot open the video cam" &lt;&lt; endl;
          return -1;
      }
  
     double dWidth = cap.get(CV_CAP_PROP_FRAME_WIDTH); //get the width of frames of the video
     double dHeight = cap.get(CV_CAP_PROP_FRAME_HEIGHT); //get the height of frames of the video
  
      cout &lt;&lt; "Frame size : " &lt;&lt; dWidth &lt;&lt; " x " &lt;&lt; dHeight &lt;&lt; endl;
  
      namedWindow("MyVideo",CV_WINDOW_AUTOSIZE); //create a window called "MyVideo"
  
      while (1)
      {
          Mat frame;
  
          bool bSuccess = cap.read(frame); // read a new frame from video
  
           if (!bSuccess) //if not success, break loop
          {
               cout &lt;&lt; "Cannot read a frame from video stream" &lt;&lt; endl;
               break;
          }
  
          imshow("MyVideo", frame); //show the frame in "MyVideo" window
  
          if (waitKey(30) == 27) //wait for 'esc' key press for 30ms. If 'esc' key is pressed, break loop
         {
              cout &lt;&lt; "esc key is pressed by user" &lt;&lt; endl;
              break;
         }
      }
      return 0;
  
  }
  </code></pre>