title: OpenCV 2.3 Compiling Issue - Undefined Refence - Ubuntu 11.10
body: <p>System Info:
  Ubuntu 11.10 (64 bits) with OpenCV 2.3 (installed today)</p>
  
  <p>I'm trying to compile some very simple code in OpenCV 2.3 but I'm getting a weird error.</p>
  
  <pre><code>#include &lt;opencv2/core/core.hpp&gt;
  #include &lt;opencv2/highgui/highgui.hpp&gt;
  
  int main(){
    cv::Mat image=cv::imread("img.jpg");
    cv::namedWindow("My Image");
    cv::imshow("My Image",image);
    cv::waitKey(0);
    return 1;
  }
  </code></pre>
  
  <p>however, I'm getting these error messages...</p>
  
  <pre><code>-SG41:~/Desktop$ g++ `pkg-config opencv --cflags --libs` -o test_1 test_1.cpp 
  /tmp/ccCvS1ys.o: In function `main':
  test_1.cpp:(.text+0x44): undefined reference to `cv::imread(std::basic_string&lt;char,    std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt; const&amp;, int)'
  test_1.cpp:(.text+0x8e): undefined reference to `cv::namedWindow(std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt; const&amp;, int)'
  test_1.cpp:(.text+0xbc): undefined reference to `cv::_InputArray::_InputArray(cv::Mat const&amp;)'
  test_1.cpp:(.text+0xf0): undefined reference to `cv::imshow(std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt; const&amp;, cv::_InputArray const&amp;)'
  test_1.cpp:(.text+0x112): undefined reference to `cv::waitKey(int)'
  /tmp/ccCvS1ys.o: In function `cv::Mat::~Mat()':
  test_1.cpp:(.text._ZN2cv3MatD2Ev[_ZN2cv3MatD5Ev]+0x39): undefined reference to `cv::fastFree(void*)'
  /tmp/ccCvS1ys.o: In function `cv::Mat::release()':
  test_1.cpp:(.text._ZN2cv3Mat7releaseEv[cv::Mat::release()]+0x47): undefined reference to `cv::Mat::deallocate()'
  collect2: ld returned 1 exit status
  </code></pre>