ios - 为 OpenSSL 运行 make 时出现 Clang 错误(iOS、i386、x86_64)

标签 ios openssl makefile

尝试使用 Clang for iOS 构建 OpenSSL 并不断出现这些错误

Undefined symbols for architecture i386:
  "start"
implicit entry/start for main executable
     (maybe you meant: _start_hash, _BN_CTX_start , _dtls1_start_timer )
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)


Undefined symbols for architecture x86_64:
  "start"
implicit entry/start for main executable
     (maybe you meant: _start_hash, _BN_CTX_start , _dtls1_start_timer )
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

为 armv7、armv7s、arm64 构建良好

使用:https://github.com/x2on/OpenSSL-for-iPhone对 clang 进行了修改

起初我以为是 clang,所以恢复到良好的旧 gcc...问题仍然存在所以一定是我正在做的其他事情.. D:


更新 1:

我之前在 CFLAGS 中使用 -miphoneos-version-min=5.1

当将最小值更改为 -miphoneos-version-min=6.0 时似乎现在可以编译...虽然没有意义...

最佳答案

好的解决方案在这里找到: https://github.com/danoli3/OpenSSL-for-iPhone

问题是对模拟器 CFLAGS 使用 -miphoneos-version-min=

以下更改解决了 iOS 5.1 目标的问题

-mios-simulator-version-min=

关于ios - 为 OpenSSL 运行 make 时出现 Clang 错误(iOS、i386、x86_64),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25990096/

相关文章:

makefile - 传递参数以在 Makefile 中进行调用

ios - 在没有 Segue 的情况下调用 Storyboard

ios - 快速将对象添加到 nsmutablearray

php - 从 NURLSessions.sharedsessions().dataTaskWithRequest 传递请求数据

c - 如何在 C 中获取公钥的指纹?

只能在 makefile 中使用一个目标文件

iphone - Core Data iPhone - 在一张表上更新并从另一张表中删除

c++ - 运行 Casablanca 程序失败,在 Mac OS 上找不到 'openssl/conf.h' 文件

openssl - 苹果为何在MacOS 10.7(Lion)中弃用OpenSSL?

c - makefile中 "include"和 "-include"的区别