# OpenCV's namedWindow is not implemented

**URL:** <https://forum.opencv.org/t/opencvs-namedwindow-is-not-implemented/9291>\
**Category:** C++\
**Tags:** highgui, build, gtk\
**Created:** [June 25, 2022, 5:59am UTC](https://forum.opencv.org/t/opencvs-namedwindow-is-not-implemented/9291 "2022-06-25T05:59:44Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![oo92](https://avatars.discourse-cdn.com/v4/letter/o/9fc29f/32.png) [@oo92](https://forum.opencv.org/u/oo92)\
**Post date:** [June 25, 2022, 5:59am UTC](https://forum.opencv.org/t/opencvs-namedwindow-is-not-implemented/9291/1 "2022-06-25T05:59:44Z")

</div>

When I run my C++ code, I get this error:

```auto
terminate called after throwing an instance of 'cv::Exception'
  what(): OpenCV(4.1.0) /home/me/opencv/modules/highgui/src/window.cpp:610: 
error: (-2:Unspecified error) The function is not implemented. Rebuild the library with Windows, 
GTK+ 2.x or Cocoa 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'

```

So then I went ahead and ran this command:

```auto
sudo apt-get install libgtk2.0-dev pkg-config -y

```

After re-running cmake, the same error persists.

I have all of the necessary imports:

```auto
#include <iostream>
#include <cstdio>
#include <iomanip>
#include <opencv2/opencv.hpp>
#include <opencv2/videoio.hpp>
#include <opencv2/highgui.hpp>

```

This is the line of code that is throwing the error:

```auto
cv::namedWindow("input video", cv::WINDOW_NORMAL);

```

---

<div class="post-metadata">

**Author:** ![berak](https://avatars.discourse-cdn.com/v4/letter/b/85f322/32.png) [@berak](https://forum.opencv.org/u/berak)\
**Post date:** [June 25, 2022, 6:28am UTC](https://forum.opencv.org/t/opencvs-namedwindow-is-not-implemented/9291/2 "2022-06-25T06:28:25Z")

</div>

> [@oo92](#):
>
> After re-running cmake, the same error persists.

let’s hope, you did a proper `make && make install` after that.

can you show us the cmake console output ? it’s rather long, but if there are problems, they will show up there

also, 4.1.0 is quite outdated, rather throw it away, and get latest (4.6.0) from github

---

<div class="post-metadata">

**Author:** ![crackwitz](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.opencv.org/crackwitz/32/14_2.png) [@crackwitz](https://forum.opencv.org/u/crackwitz)\
**Post date:** [June 25, 2022, 10:43am UTC](https://forum.opencv.org/t/opencvs-namedwindow-is-not-implemented/9291/3 "2022-06-25T10:43:52Z")

</div>

crosspost: [c++ - OpenCV's namedWindow is not implemented - Stack Overflow](https://stackoverflow.com/questions/72751473/opencvs-namedwindow-is-not-implemented)
