我有一个外部库,我从事的一个项目是针对boost 1.55编译的;我已经转移到另一个需要使用此库的项目,但当前系统正在使用boost 1.58。外部库升级版本问题
当我链接到库时,它抱怨说它缺少boost 1.55库的引用。
find_package(Boost 1.55 COMPONENTS ... REQUIRED)
我知道有一分钟命令CMake的,但我不知道这是否会允许我使用这是对提升编译库:我链接到的库使用以下find_package命令编译在当前运行的机器上使用1.551.58。
有关如何编译此外部库的任何建议,以便它将使用与1.55兼容的任何版本的升压将非常感激!对于新方案试图找到升压
find_package命令):
find_package(Boost 1.55 COMPONENTS system filesystem chrono regex thread date_time REQUIRED)
该系统的新方案是在已提高1.58不是1.55因此它输出以下:
-- Boost version: 1.58.0
-- Found the following Boost libraries:
-- system
-- filesystem
-- chrono
-- regex
-- thread
-- date_time
-- atomic
编译工作正常对1.58它只是当新的程序链接到库(编译对1.55),它抱怨无法找到e提升1.55个库(见下文)。
链接输出:(新程序链接到库)
/usr/bin/ld: warning: libboost_system.so.1.55.0, needed by library.so, not found (try using -rpath or -rpath-link)
/usr/bin/ld: warning: libboost_filesystem.so.1.55.0, needed by library.so, not found (try using -rpath or -rpath-link)
/usr/bin/ld: warning: libboost_chrono.so.1.55.0, needed by library.so, not found (try using -rpath or -rpath-link)
/usr/bin/ld: warning: libboost_regex.so.1.55.0, needed by library.so, not found (try using -rpath or -rpath-link)
/usr/bin/ld: warning: libboost_thread.so.1.55.0, needed by library.so, not found (try using -rpath or -rpath-link)
/usr/bin/ld: warning: libboost_date_time.so.1.55.0, needed by library.so, not found (try using -rpath or -rpath-link)
你确实有问题吗?是如此张贴细节。 –
我更新了这个问题,希望能让它更清晰。 – badrobit