1. 程式人生 > >Could not find a package configuration file provided by "Qt5Widgets"

Could not find a package configuration file provided by "Qt5Widgets"

Could not find a package configuration file provided by “Qt5Widgets”

出差在外,沒有固定的時間進行學習,想利用一下空餘時間,看看原始碼.然後就ros中的turtlesim中的原始碼進行了閱讀.

#include <QApplication>

這裡標頭檔案不清楚在哪,所以編譯了一下.

  CMake Error at turtlesim/CMakeLists.txt:6 (find_package):
  By not providing "FindQt5Widgets.cmake" in
CMAKE_MODULE_PATH this project has asked CMake to find a package configuration file provided by "Qt5Widgets", but CMake did not find one.

這裡顯示Qt5Widgets包不存在.谷歌了一下,找到了解決方案.解決辦法點這裡

解決辦法

sudo apt-get install qtbase5-dev