title: OpenCV : undefined reference to imread()
body: <p>I have configured OpenCV 3.1.0 in Eclipse Mars. These are my configuration,</p>
  
  <p><strong>G++ includes</strong>: D:/opencv/build/install/include; <strong>GCC includes</strong>: D:/opencv/build/install/include</p>
  
  <p><strong>Linker libraries</strong>: libopencv_core310, libopencv_highgui310</p>
  
  <p><strong>Linker libraries path</strong>: D:/opencv/build/lib  (files in this directory are like libopencv_core310.dll.a)</p>
  
  <p>I am getting an error like this,</p>
  
  <pre><code>imageRead.cpp:15: undefined reference to `cv::imread(cv::String const&amp;, int)'
  </code></pre>
  
  <p>This is my imageRead.cpp file,</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include "opencv2/core/core.hpp"
  #include "opencv2/highgui/highgui.hpp"
  
  using namespace std;
  using namespace cv;
  
  int main(int argc, const char** argv) {
      Mat img = imread("D:/sample.jpg", CV_LOAD_IMAGE_UNCHANGED);
      if (img.empty()) {
          cout &lt;&lt; "Error: Image cannot be loaded." &lt;&lt; endl;
          system("pause");
          return -1;
      }
      namedWindow("Image Window", CV_WINDOW_AUTOSIZE);
      imshow("Image Window", img);
      if (waitKey() == 27) {
          return -1;
      }
      destroyWindow("Image Window");
      return 0;
  }
  </code></pre>
  
  <p>Can anyone help with this error ?</p>