title: working with opencv in eclipse, encountered some undefined reference issues in the CDT build Console, preventing me from getting my "filename".o
body: <p>not sure how to proceed... still wet behind the ears, looking for advice.    </p>
  
  <pre><code>21:30:40 **** Incremental Build of configuration Release for project DisplayImage ****
  make all 
  Building file: ../src/dispalyimage.cpp
  Invoking: GCC C++ Compiler
  g++ -O3 -Wall -c -fmessage-length=0 -MMD -MP -MF"src/dispalyimage.d" -MT"src/dispalyimage.d" -o "src/dispalyimage.o" "../src/dispalyimage.cpp"
  Finished building: ../src/dispalyimage.cpp
  
  Building target: DisplayImage
  Invoking: GCC C++ Linker
  g++  -o "DisplayImage"  ./src/dispalyimage.o   
  ./src/dispalyimage.o: In function `cv::Mat::~Mat()':
  dispalyimage.cpp:(.text._ZN2cv3MatD2Ev[_ZN2cv3MatD5Ev]+0x69): undefined reference to `cv::Mat::deallocate()'
  dispalyimage.cpp:(.text._ZN2cv3MatD2Ev[_ZN2cv3MatD5Ev]+0x54): undefined reference to `cv::fastFree(void*)'
  ./src/dispalyimage.o: In function `main':
  dispalyimage.cpp:(.text.startup+0x94): undefined reference to `cv::imread(std::string const&amp;, int)'
  dispalyimage.cpp:(.text.startup+0x125): undefined reference to `cv::Mat::copySize(cv::Mat const&amp;)'
  dispalyimage.cpp:(.text.startup+0x20d): undefined reference to `cv::namedWindow(std::string const&amp;, int)'
  dispalyimage.cpp:(.text.startup+0x235): undefined reference to `cv::_InputArray::_InputArray(cv::Mat const&amp;)'
  dispalyimage.cpp:(.text.startup+0x259): undefined reference to `cv::imshow(std::string const&amp;, cv::_InputArray const&amp;)'
  dispalyimage.cpp:(.text.startup+0x273): undefined reference to `cv::waitKey(int)'
  dispalyimage.cpp:(.text.startup+0x284): undefined reference to `cv::Mat::deallocate()'
  collect2: error: ld returned 1 exit status
  make: *** [DisplayImage] Error 1
  
  21:30:42 Build Finished (took 1s.367ms)
  </code></pre>
  
  <p>build exits without making executable
  here's the cpp 
      /*
       * dispalyimage.cpp
       *
       *  Created on: Aug 18, 2014
       *      Author: owner
       */</p>
  
  <pre><code>#include &lt;opencv/cv.h&gt;
  #include &lt;opencv/highgui.h&gt;
  
  using namespace cv;
  
  int main( int argc, char** argv )
  {
  Mat image;
  image = imread( argv[1], 1 );
  
  if( argc != 2 || !image.data )
  {
    printf( "No image data \n" );
    return -1;
  }
  
  namedWindow( "Display Image", CV_WINDOW_AUTOSIZE );
  imshow( "Display Image", image );
  
  waitKey(0);
  
  return 0;
  }
  </code></pre>