gpt4 book ai didi

c++ - Linux 上的 Boost 和 ssl 客户端服务器构建问题

转载 作者:IT王子 更新时间:2023-10-29 00:41:19 24 4
gpt4 key购买 nike

我在安装pcl(Point Cloud Library)的时候已经安装了boost作为第三个库。

现在我正在尝试运行客户端和服务器程序 http://www.boost.org/doc/libs/1_57_0/doc/html/boost_asio/example/cpp03/ssl/client.cpp

尝试链接所需的库时:

g++ -I /usr/include/boost/  server.cpp -o server -lboost_system -lssl -lpthread

出现以下错误:

/usr/bin/ld: /tmp/ccRbD849.o: undefined reference to symbol 'ERR_reason_error_string@@OPENSSL_1.0.0' //lib/x86_64-linux-gnu/libcrypto.so.1.0.0: error adding symbols: DSO missing from command line collect2: error: ld returned 1 exit status

当我搜索 usr 文件夹时,Boost 文件夹仅存在于 include 子文件夹中。

我能做些什么来解决这个问题。

最佳答案

[...] libcrypto.so: [...] DSO missing from command line

说出来了!你不见了

-lcrypto

在链接器命令行上。事实上,我总是串联使用 -lssl -lcrypto

关于c++ - Linux 上的 Boost 和 ssl 客户端服务器构建问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29118667/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com