我正在尝试在此处编译x2on创建的示例iPhone openssl:
https://github.com/x2on/OpenSSL-for-iPhone
尝试在Xcode 4.3.3中进行编译时出现以下错误:
Undefined symbols for architecture i386:
"_MD5", referenced from: -[ViewController calculateMD5:] in ViewController.o "_SHA256_Init", referenced from: -[ViewController calculateSHA256:] in ViewController.o "_SHA256_Update", referenced from: -[ViewController calculateSHA256:] in ViewController.o "_SHA256_Final", referenced from: -[ViewController calculateSHA256:] in ViewController.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
最佳答案
根据this site的指示,它表明您需要与libcrypto
链接。
https://stackoverflow.com/questions/11055392/