的cmake - 3.8升压program_options没有找到
我编译和安装Boost库在/ usr/local/lib目录/,但无法做出的cmake通过命令find_package(Boost REQUIRED program_options)
检测升压program_options。找到所有其他库find_package(Boost REQUIRED thread system)
,并且只有添加program_options会引发错误。我已经尝试了很多东西和一些无知的东西 - program_options的特殊之处。
-- Boost version: 1.63.0
-- Found the following Boost libraries:
-- filesystem
-- regex
-- serialization
-- unit_test_framework
-- iostreams
-- thread
-- system
-- chrono
-- date_time
-- atomic
升压化妆是成功的,它内置了program_options库(我可以看到它位于/ usr/local/lib目录/文件夹与其他Boost库一起)。我只是不明白,为什么会nt cmake找到它?
Error :
Unable to find the requested Boost libraries.
Boost version: 1.63.0
Boost include path: /usr/local/include
Could not find the following Boost libraries:
boost_program_options
Some (but not all) of the required Boost libraries were found. You may
need to install these additional Boost libraries. Alternatively, set
BOOST_LIBRARYDIR to the directory containing Boost libraries or BOOST_ROOT
to the location of Boost.
目录结构
-rw-r--r-- 1 root root 1558464 Aug 12 15:46 /usr/local/lib/libboost_program_options.a
lrwxrwxrwx 1 root root 34 Aug 12 15:46 /usr/local/lib/libboost_program_options.so -> libboost_program_options.so.1.63.0*
-rwxr-xr-x 1 root root 658920 Aug 12 15:46 /usr/local/lib/libboost_program_options.so.1.63.0*
发布错误? – utopia
你的CMake最近够了吗? https://stackoverflow.com/a/42124857/2799037 – usr1234567
@utopia更新了帖子..也张贴了/ usr/local/lib的目录结构。我对整个错误非常困惑。 – infoclogged