ld:找不到 -lssl / clang 的库:错误:链接器命令失败,退出代码为 1(使用 -v 查看调用)

发布于 2025-01-15 00:13:03 字数 281 浏览 4 评论 0原文

我正在尝试在 macOS Moneterey12.3 上构建 Paho 客户端。 当我运行 make 命令时,出现以下错误

ld: warning: directory not found for option '-L/usr/local/opt/openssl/lib' ld:找不到 -lssl 的库 clang:错误:链接器命令失败,退出代码为 1(使用 -v 查看调用)

我的设备上不存在 /usr/local/opt/openssl/lib 。如何从编译中删除此选项?另外,我不确定如何解决 -lssl 问题。

I am trying to build Paho client on my macOS Moneterey12.3.
When I run make command, I get the following errors

ld: warning: directory not found for option '-L/usr/local/opt/openssl/lib'
ld: library not found for -lssl
clang: error: linker command failed with exit code 1 (use -v to see invocation)

/usr/local/opt/openssl/lib doesn't exist on my device. How do I remove this option from compile? Also, I am not sure how to fix the -lssl problem.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

吖咩 2025-01-22 00:13:03

如项目自述文件中所述:

https ://github.com/eclipse/paho.mqtt.c#build-requirements--compilation-using-cmake

使用 cmake 来构建项目,而不是附带的 Makefile

git clone https://github.com/eclipse/paho.mqtt.c.git
cd paho.mqtt.c
mkdir build
cd build
cmake -DPAHO_WITH_SSL=FALSE ..
make

As described in the README for the project here:

https://github.com/eclipse/paho.mqtt.c#build-requirements--compilation-using-cmake

Use cmake to build the project, not the shipped Makefile.

git clone https://github.com/eclipse/paho.mqtt.c.git
cd paho.mqtt.c
mkdir build
cd build
cmake -DPAHO_WITH_SSL=FALSE ..
make
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文