gpt4 book ai didi

ios - 找不到 lcrypto 的库

转载 作者:可可西里 更新时间:2023-11-01 03:33:04 27 4
gpt4 key购买 nike

我正在尝试构建 iOS AllJoyn 项目,但我在 OpenSSL 集成方面遇到了问题。

我一直在看这些方向:https://allseenalliance.org/docs-and-downloads/documentation/configuring-build-environment-ios-and-osx#unique_16

我一直按照 Xcode IDE Build 的说明进行操作,但现在我收到一条错误消息:“找不到 lcrypto 的库”。

在线查看似乎与 Makefile 有关,但我不太确定 lcrypto 是什么以及我应该引用哪个库。

编辑我注意到它说这是一个 Shell Script Invocation Error

还有痕迹:

ld: warning: directory not found for option '-L/PATH/alljoyn/alljoyn/common/crypto/openssl/build/Debug-iphoneos'
ld: library not found for -lcrypto
clang: error: linker command failed with exit code 1 (use -v to see invocation)
scons: *** [build/darwin/arm/iphoneos/debug/obj/test/bbcclient] Error 1
scons: building terminated because of errors.
Command /usr/local/bin/scons failed with exit code 2

最佳答案

为了成功使用 AllJoyn SDK,您需要有可用的 openssl 库的编译版本(即 libcrypto.a)。

构建openssl库的细节可以在SDK中/alljoyn_objc下的README-INSTALLING.txt文件中找到,我已经复制了下面的相关说明。创建 openssl 库后,您需要将其放在项目可访问的目录中(在您的例子中为“/PATH/alljoyn/alljoyn/common/crypto/openssl/build/Debug-iphoneos”)。

大部分信息都包含在 AllJoyn Programming Guide for Objective-C

README-INSTALLING.txt 文件中的相关文本:

  1. OpenSSL is required for iOS development and is available at the following web address: www.openssl.org AllJoyn has been tested with version 1.0.1 of OpenSSL.
  2. Download the Xcode project that can be used to build OpenSSL for iOS from GitHub, at the following web address: https://github.com/sqlcipher/openssl-xcode/

Installation

  1. Copy the OpenSSL source into a separate folder on your development system, not under the AllJoyn SDK.

  2. Navigate to the OpenSSL source top folder in Finder, and copy the openssl.xcodeproj folder you downloaded from GitHub into this folder.

  3. Open the openssl.xcodeproj in Xcode.

  4. In Xcode, build the crypto target (libssl.a and libcrypto.a) for each combination of configuration (debug|release) and platform (iphoneos|iphonesimulator) that you need for your iOS project by selecting Product->Build For->(your desired configuration).

关于ios - 找不到 lcrypto 的库,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20624584/

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