title: Installing OpenCV2.4.1 on windows 7 x64 - Mingw & codeblocks
body: <p>Installing OpenCV2.4.1 on windows 7 x64 - Mingw &amp; codeblocks</p>
  
  <p>Hi, 
  I followed this tutorial</p>
  
  <p><a href="https://stackoverflow.com/questions/10860352/getting-started-with-opencv-2-4-and-mingw-on-windows-7">Getting started with OpenCV 2.4 and MinGW on Windows 7</a></p>
  
  <p>I configured the same except instead of x86, i put x64.</p>
  
  <p>This is the example</p>
  
  <pre><code>#include "opencv2/highgui/highgui.hpp"
  #include &lt;iostream&gt;
  
  using namespace cv;
  using namespace std;
  
  int main(int argc, char** argv)
  {
  Mat im = imread(argc == 2 ? argv[1] : "lena.jpg", 1);
  if (im.empty())
  {
  cout &lt;&lt; "Cannot open image!" &lt;&lt; endl;
  return -1;
  }
  
  imshow("image", im);
  waitKey(0);
  
  return 0;
  }
  </code></pre>
  
  <p>when i compile main.cpp</p>
  
  <p><strong>C:\Users\rgap\Desktop>g++ -I"C:\opencv\build\include" -L"C:\opencv\build\x64\mingw\lib" main.cpp -lope 
  ncv_core241 -lopencv_highgui241 -o main</strong> </p>
  
  <p>I get the following error</p>
  
  <pre><code>C:\Users\rgap\AppData\Local\Temp\ccDgmPAT.o:main.cpp:(.text+0x62): undefined reference to `cv::imread(
  std::string const&amp;, int)'
  C:\Users\rgap\AppData\Local\Temp\ccDgmPAT.o:main.cpp:(.text+0xc7): undefined reference to `cv::_InputA
  rray::_InputArray(cv::Mat const&amp;)'
  C:\Users\rgap\AppData\Local\Temp\ccDgmPAT.o:main.cpp:(.text+0xfe): undefined reference to `cv::imshow(
  std::string const&amp;, cv::_InputArray const&amp;)'
  C:\Users\rgap\AppData\Local\Temp\ccDgmPAT.o:main.cpp:(.text+0x120): undefined reference to `cv::waitKe
  y(int)'
  C:\Users\rgap\AppData\Local\Temp\ccDgmPAT.o:main.cpp:(.text$_ZN2cv3MatD1Ev[cv::Mat::~Mat()]+0x2b): und
  efined reference to `cv::fastFree(void*)'
  C:\Users\rgap\AppData\Local\Temp\ccDgmPAT.o:main.cpp:(.text$_ZN2cv3Mat7releaseEv[cv::Mat::release()]+0
  x3c): undefined reference to `cv::Mat::deallocate()'
  collect2: ld devolvió el estado de salida 1
  </code></pre>
  
  <p>Is this a bug? :(</p>
  
  <p>thanks :)</p>