您的位置:首页 > 编程语言 > C语言/C++

NAO机器人中xx.cpp文件运行遇到问题及其解决办法

2015-07-12 10:38 603 查看
如果你遇到了如下问题:

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 cvWaitKey, file /home/opennao/src/OpenCV-2.3.1/modules/highgui/src/window.cpp, line 354

terminate called after throwing an instance of ‘cv::Exception’

what(): /home/opennao/src/OpenCV-2.3.1/modules/highgui/src/window.cpp:354: 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 cvWaitKey

进入naoqi-sdk/lib目录下,删除所有libopencvxxx.so文件即可

产生该问题原因:

sdk中的opencv没有gtk,不会支持namewindow这样的函数,因为在nao端是没有必要的。在ubuntu上自己编译安装opencv并将sdk中lib下的libopen**.so的库全部替换,rebuild你的代码,就会ok了,ubuntu14.04会出现这个问题
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: