c lang env变量的文档在哪里?

问题描述 投票:1回答:1

TLDR我试图阅读clang llvm文档,以找到一种传递库路径的方法,但没有成功。然后我搜索并找到了解决方案。我很好奇在哪里可以找到我的解决方案的文档。

详细信息和原因

我试图在我的卡塔琳娜上运行ruby的捆绑包,但遇到此错误:]

ld: library not found for -lssl

我使用brew install openssl重新安装了openssl,然后从brew link openssl收到了以下响应:

Warning: Refusing to link macOS provided/shadowed software: [email protected]
If you need to have [email protected] first in your PATH run:
  echo 'export PATH="/usr/local/opt/[email protected]/bin:$PATH"' >> ~/.zshrc

For compilers to find [email protected] you may need to set:
  export LDFLAGS="-L/usr/local/opt/[email protected]/lib"
  export CPPFLAGS="-I/usr/local/opt/[email protected]/include"

For pkg-config to find [email protected] you may need to set:
  export PKG_CONFIG_PATH="/usr/local/opt/[email protected]/lib/pkgconfig"

尽管我赞赏brew使它无法工作的努力。我将链接器问题缩小到此范围以查看发生了什么:

clang -dynamic -bundle -o asdf  -L/usr/local/Cellar/mysql/8.0.19/lib -lmysqlclient -lssl -lcrypt -v 

最后using LIBRARY_PATH我通过了环境变量

LIBRARY_PATH

TLDR我试图阅读clang llvm文档,以找到一种传递库路径的方法,但没有成功。然后我搜索并找到了解决方案。我很好奇在哪里可以找到我的文档...

linker clang bundle
1个回答
1
投票

您能够建立export LIBRARY_PATH=/usr/local/opt/[email protected]/lib/ 链接:

© www.soinside.com 2019 - 2024. All rights reserved.