即使安装了boost,boost_filesystemConfig.cmake文件也不存在

zysjyyx4  于 5个月前  发布在  其他
关注(0)|答案(1)|浏览(82)

我目前正在尝试使用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.cmakeboost_filesystem-config.cmakeAdd the installation prefix of "boost_filesystem" to CMAKE_PREFIX_PATH orset "boost_filesystem_DIR" to a directory containing one of the abovefiles. If "boost_filesystem" provides a separate development package orSDK, 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和其他变体,但他们都说他们已经安装在我的机器上。任何帮助都非常感谢!

carvr3hs

carvr3hs1#

试试看:

sudo apt install libboost-filesystem-dev

字符串

相关问题