title: Hello World in OpenCV (compiling and linking from source on Ubuntu)
body: <p>I'm trying to compile OpenCV from source and create a test C++ program which uses the newly compiled OpenCV library. </p>
  
  <p>Compiling OpenCV appears to work, I followed <a href="http://docs.opencv.org/2.4/doc/tutorials/introduction/linux_install/linux_install.html" rel="nofollow noreferrer">this</a> guide.</p>
  
  <p>But now I want to create a test program which uses the library.</p>
  
  <p>I followed <a href="http://docs.opencv.org/2.4/doc/tutorials/introduction/linux_gcc_cmake/linux_gcc_cmake.html" rel="nofollow noreferrer">this</a> guide, but and everything <em>appeared</em> to work until I tried the command:</p>
  
  <blockquote>
    <p>./DisplayImage lena.jpg</p>
  </blockquote>
  
  <p>Which gave me the following error</p>
  
  <blockquote>
    <p>OpenCV Error: Unspecified error (The function is not implemented.
    Rebuild the library with Windows, GTK+ 2.x or Carbon support. If you
    are on Ubuntu or Debian, install libgtk2.0-dev and pkg-config, then
    re-run cmake or configure script) in cvNamedWindow, file
    /media/chris/Archive2/Archive/Programming/OpenCV/<em>sav</em>/opencv/modules/highgui/src/window.cpp,
    line 550 terminate called after throwing an instance of
    'cv::Exception'   what(): 
    /media/chris/Archive2/Archive/Programming/OpenCV/<em>sav</em>/opencv/modules/highgui/src/window.cpp:550:
    error: (-2) The function is not implemented. Rebuild the library with
    Windows, GTK+ 2.x or Carbon support. If you are on Ubuntu or Debian,
    install libgtk2.0-dev and pkg-config, then re-run cmake or configure
    script in function cvNamedWindow</p>
    
    <p>Aborted (core dumped)</p>
  </blockquote>
  
  <p><a href="https://i.stack.imgur.com/PpHkO.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/PpHkO.png" alt="terminal"></a></p>
  
  <p>the mentioned packages appear to be installed 
  <a href="https://i.stack.imgur.com/1o8N2.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/1o8N2.png" alt="gtk"></a></p>
  
  <p><a href="https://i.stack.imgur.com/f2z7a.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/f2z7a.png" alt="pkg-config"></a></p>
  
  <p>I've tried rebooting my computer after installing the packages and I still get the same message.</p>