【发布时间】:2019-09-19 09:13:06
【问题描述】:
已安装 Cevelop 1.11.1
apt-get install g++-9
Get:1 http://archive.ubuntu.com/ubuntu disco/main amd64 cpp-9 amd64 9-20190402-1ubuntu1 [8,861 kB]
Get:2 http://archive.ubuntu.com/ubuntu disco/main amd64 libgcc-9-dev amd64 9-20190402-1ubuntu1 [2,355 kB]
Get:3 http://archive.ubuntu.com/ubuntu disco/main amd64 gcc-9 amd64 9-20190402-1ubuntu1 [9,643 kB]
Get:4 http://archive.ubuntu.com/ubuntu disco/main amd64 libstdc++-9-dev amd64 9-20190402-1ubuntu1 [1,685 kB]
Get:5 http://archive.ubuntu.com/ubuntu disco/universe amd64 g++-9 amd64 9-20190402-1ubuntu1 [10.1 MB]
apt-get install libboost-dev
Get:1 http://archive.ubuntu.com/ubuntu disco/main amd64 libboost1.67-dev amd64 1.67.0-13 [8,362 kB]
Get:2 http://archive.ubuntu.com/ubuntu disco/main amd64 libboost-dev amd64 1.67.0.1 [3,228 B]
为链接器指定 boost_system。这会产生错误。
g++-9 -std=c++1z -O0 -g3 -Wall -Wextra -Wconversion -c -fmessage-length=0 -Wno-attributes -fsanitize=undefined -pthread -o aptcp.o ../aptcp.cpp
g++-9 -pthread -o aptcp aptcp.o -ltidy -lboost_system -lssl -lcrypto -lxalan-c -lxalanMsg -lxerces-c
/usr/bin/ld: cannot find -lboost_system
collect2: error: ld returned 1 exit status
我建议安装软件包 libboost-dev。它将安装 无论您的系统当前版本的 boost 是什么,都会放 所有文件都在适当的位置。
根据serup's answer,我的理解是“已安装库”。
$ /sbin/ldconfig -p | grep boost_system | cut -d\> -f2
/lib/x86_64-linux-gnu/libboost_system.so.1.67.0
那么,这里发生了什么?
目标是为安装和使用编译器和库提供一个简单的可重复过程,该过程建立在开发人员和包维护者的现有工作之上。我的理解/期望、包装或库是否存在缺陷?
【问题讨论】:
标签: linux boost configuration linker-errors apt