타임스 오류 cvNamed Window 문제

1387 단어
프로그램을 실행할 때 Ubuntu 시스템이 창을 표시할 때 이 문제가 발생했습니다.
error: (-2: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 function ‘cvNamedWindow’
원인:
Linux 플랫폼에서 opencv 소스 코드 라이브러리를 컴파일할 때./configure가 설정할 때ltk2.0의 개발 라이브러리가 검출되지 않았기 때문에make 명령을 실행할 때 UI 지원 없이 이 라이브러리를 컴파일합니다.시스템에ltk 실행 라이브러리가 있어야 할 뿐만 아니라ltk 개발 라이브러리가 있어야ui 지원하에opencv를 성공적으로 컴파일할 수 있습니다.
해결 방법: Opencv 라이브러리를 삭제하고 GTK+2를 설치합니다.x,opencv를 다시 컴파일합니다.
apt-get install libgtk2.0-dev pkg-config
apt-get install pkg-config

명령 보기 GTK+ 2.x 버전:
pkg-config --modversion gtk+-2.0

cmake 설치:
현재 cmake 버전 보기: cmake --version 다운로드 cmake 설치 패키지: wgethttps://cmake.org/files/v3.9/cmake-3.9.2.tar.gz
cd cmake-3.9.2
./configure
sudo make && make install

버전 번호를 보고 검증: cmake --version이 없으면 사용자의 PATH 경로를 수정하고 cmake 경로를 사용자 환경 변수에 추가하여 다음 명령을 실행할 수 있습니다.
$ echo "export PATH=$PATH:/usr/local/bin" >> ~/.bashrc  

opencv 소스 다운로드:
git clone https://github.com/opencv/opencv.git
git clone https://github.com/opencv/opencv_contrib.git

컴파일하기 위해 cmake 열기:
cmake-gui

좋은 웹페이지 즐겨찾기