【问题标题】:XCode linking to OpenSSL libraryXCode 链接到 OpenSSL 库
【发布时间】:2013-12-25 06:44:04
【问题描述】:

我有一个需要链接到 openssl 库的项目,尽管我在编译时遇到了一些问题。

#include <openssl/bn.h>
#include <openssl/md5.h>

最初告诉我找不到 openssl,所以我从源代码编译它并将 openssl 目录复制到我的项目中。关于 openssl 的错误消失了,尽管我收到了一个新错误,其中指出:

applink.c

Lexical or Preprocessor Issue
'io.h' file not found 

所以这让我相信我没有正确包含 openssl 库。谁能给我一些关于如何做到这一点的指示?

XCode 版本 5.0.2 / SDK = 10.8 / 目标操作系统 = 10.6 / i386 x84_86

【问题讨论】:

    标签: xcode macos openssl


    【解决方案1】:

    通过链接解决:

    libssl and libcrypto to target
    

    【讨论】:

      【解决方案2】:

      我认为 'io.h' 不是 OpenSSL 文件。项目的构建设置中的标题搜索路径中是否有空格?如果是这样引用它们:“My OpenSSL/includes”

      【讨论】:

      • 我通过将 libssl 和 libcrypto 链接到目标解决了这个问题。不过感谢您的建议:)
      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多