Wie man CMake behebt: Could NOT find Poco

Problem:

Beim Versuch, ein CMake-Projekt mit cmake . oder einem ähnlichen Befehl zu kompilieren, siehst du die folgende Fehlermeldung:

cmake_error.txt
CMake Error at /usr/share/cmake-3.25/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
  Could NOT find Poco (missing: Poco_INCLUDE_DIR Poco_LIBRARIES Net
  Foundation)
Call Stack (most recent call first):
  /usr/share/cmake-3.25/Modules/FindPackageHandleStandardArgs.cmake:600 (_FPHSA_FAILURE_MESSAGE)
  cmake/FindPoco.cmake:27 (find_package_handle_standard_args)
  CMakeLists.txt:40 (find_package)


-- Configuring incomplete, errors occurred!

Lösung

Du musst die Poco-Bibliotheken (in diesem speziellen Fall libpoco-net und libpoco-foundation) und ihre jeweiligen Entwicklungspakete installieren.

Verwende unter Ubuntu:

install_poco.sh
sudo apt -y install libpoco-dev

um alle Poco-Bibliotheken und ihre Entwicklungsheader zu installieren


Ähnliche Beiträge nach Kategorie: CMake C++