title: Undefined References to OpenCV
body: <p>I'm running 32-bit Windows 7 Enterprise and CodeBlocks 10.05.</p>
  
  <p>I followed <a href="http://opensourcecollection.blogspot.com.es/2011/04/how-to-setup-opencv-22-in-codeblocks.html" rel="nofollow">this tutorial</a> to set up OpenCV 2.2 to work with CodeBlocks.</p>
  
  <p>Any programs that use the C CodeBlocks API work fine - they compile, link, and run fine.
  However, when I try to use C++ OpenCV functions and objects, <code>.o</code> files are generated, but I get linking errors, such as:</p>
  
  <blockquote>
    <p>undefined reference to <code>`cv::cvtColor(cv::Mat const&amp;, cv::Mat&amp;, int, int)'</code></p>
  </blockquote>
  
  <p>After some Googling, I found that this was because I didn't include enough libraries in my search directories. However, I don't know what libraries to include.</p>
  
  <p>After some searching in my OpenCV folder, I found some <code>.a</code> files in <code>3rdParty/lib</code> and added them, too. But my problem persists.</p>
  
  <p>Does anyone know what libraries I have to include in order to get my program to work?</p>
  
  <p>If you need more information, please tell me and I'll give it to you.</p>