我目前正在尝试使用CMake编译一些C代码,这需要boost库。我在WSL上使用Ubuntu 18.04,我已经使用下面的教程1安装了boost1.77,我知道它可以工作,因为我已经成功地使用g编译了示例.我需要使用CMake,这样我就可以包含来自另一个使用Qt的库的头文件。编译时,我得到以下错误:CMake Error at /usr/lib/cmake/Boost-1.77.0/BoostConfig.cmake:141 (find_package):
Could not find a package configuration file provided by "boost_filesystem"
(requested version 1.77.0) with any of the following names:
boost_filesystemConfig.cmake
boost_filesystem-config.cmake
Add the installation prefix of "boost_filesystem" to CMAKE_PREFIX_PATH or
set "boost_filesystem_DIR" to a directory containing one of the above
files. If "boost_filesystem" provides a separate development package or
SDK, be sure it has been installed.
Call Stack (most recent call first):
/usr/lib/cmake/Boost-1.77.0/BoostConfig.cmake:258 (boost_find_component)
CMakeLists.txt:32 (find_package)
-- Configuring incomplete, errors occurred!
当我搜索ubuntu文件时,我在系统上的任何地方都找不到这个文件,所以我不能将其添加到我的CMakeLists.txt文件中。我也尝试过其他类似的解决方案,如sudo apt-get install libboost-all-dev
和其他变体,但他们都说他们已经安装在我的机器上。任何帮助都非常感谢!
1条答案
按热度按时间carvr3hs1#
试试看:
字符串