macOS系统下快速配置openssl和Xcode

一、Mac OSX 快速安装openssl
启动Terminal或者iTerm,运行命令:
brew install openssl
如果提示失败,请先检查是否已安装homebrew,安装方法:
ruby -e"$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" < /dev/null 2> /dev/null

注意安装的路径:
/usr/local/opt/openssl/
其中有bin、lib、include等目录,配置Xcode的时候需要这些文件。
二、配置Xcode
1.Targets -> Build Settings -> Search Paths,添加Header、Libary搜索路径:

2.手动拖拽libcrypto.dylib、libssl.dylib文件到Linked Frameworks and Libraries。

操作完成后,就可以愉快的研究openssl的加解密算法了~
~ END ~
- 标题: macOS系统下快速配置openssl和Xcode
- 作者: tree_fly
- 创建于 : 2018-06-23 11:13:09
- 更新于 : 2018-06-23 11:13:09
- 链接: https://itreefly.com/posts/d7dad0c7.html
- 版权声明: 本文章采用 CC BY-NC-SA 4.0 进行许可。
评论