debug:g2o cmake时报错“Qt5 not found. Install it and set Qt5_DIR accordingly
**
debug:g2o cmake時報錯“Qt5 not found. Install it and set Qt5_DIR accordingly”
**
完整報錯:
@ubuntu:~/WorkSpace/g2o/build$ cmake …/
– Compiling on Unix
– Found CHOLMOD and its dependencies
– Compiling with OpenGL support
– Could NOT find Qt4 (missing: QT_CORE_INCLUDE_DIR QT_CORE_LIBRARY QT_XML_INCLUDE_DIR QT_XML_LIBRARY QT_OPENGL_INCLUDE_DIR QT_OPENGL_LIBRARY QT_GUI_INCLUDE_DIR QT_GUI_LIBRARY QT_WIDGETS_INCLUDE_DIR QT_WIDGETS_LIBRARY) (found version “4.8.7”)
Qt5 not found. Install it and set Qt5_DIR accordingly
– Compiling g2o apps
– Compiling g2o examples
– Compiling with GCC
– Configuring done
– Generating done
– Build files have been written to: /home/aicrobo/WorkSpace/g2o
原因:
文件 g2o/cmake_modules/FindQGLViewer.cmake 編寫錯誤
錯誤代碼段:
find_package(Qt4 COMPONENTS Core Xml OpenGL Gui Widgets)
if(NOT Qt4_FOUND)
message(“Qt5 not found. Install it and set Qt5_DIR accordingly”)
if (WIN32)
message(" In Windows, Qt5_DIR should be something like C:/Qt/5.4/msvc2013_64_opengl/lib/cmake/Qt5")
endif()
endif()
修改后:
find_package(Qt4 COMPONENTS)# Core Xml OpenGL Gui Widgets)
if(NOT Qt4_FOUND)
message(“Qt4 not found. Install it and set Qt4_DIR accordingly”)
if (WIN32)
message(" In Windows, Qt5_DIR should be something like C:/Qt/5.4/msvc2013_64_opengl/lib/cmake/Qt5")
endif()
endif()
總結
以上是生活随笔為你收集整理的debug:g2o cmake时报错“Qt5 not found. Install it and set Qt5_DIR accordingly的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 我有好几个玉观音吊坠能交替戴吗?
- 下一篇: 求一个女性成熟个性签名。