make -j6//(run 6 jobs in parallel,但最好不要超过cpu核数,不然可能会出现错误) 注:本人在make时会遇到C++内部错误,不用管它,再次make可继续编译,具体原因不知
sudo make install
在执行imshow函数时,出现如下error 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 cvShowImage, file /home/nvidia/Documents/opencv-3.4.0/modules/highgui/src/window.cpp, line 611 terminate called after throwing an instance of cv::Exception 解决方法:在cmake时加入-D WITH_QT=ON 选项
在-D WITH_QT=ON 编译时,出现如下error error: #error Please include the appropriate gl headers before including cuda_gl_interop.h 解决办法:修改文件/usr/local/cuda-8.0/targets/aarch64-linux/include/cuda_gl_interop.h如下,注释掉第8-12及第14行即可
7.#else /* __APPLE__ */8.//#if defined(__arm__) || defined(__aarch64__)9.//#ifndef GL_VERSION10.//#error Please include the appropriate gl headers before including cuda_gl_interop.h11.//#endif12.//#else13.#include <GL/gl.h>14.//#endif15.#endif /* __APPLE__ */