集成OpenSSL和PJSIP构建错误
问题描述:
尽管集成最新OpenSSL库和PJSIP会产生以下错误。集成OpenSSL和PJSIP构建错误
使用以下命令使用PJSIP编译Openssl 1.1.0f。
./configure-iphone --with-SSL = /用户/ nexgetech01 /下载/ OpenSSL的换iPhone主/ bin中/ iPhoneOS10.3-armv7.sdk/
它使openssl成功编译并准备好进行构建。
之后我用PJSIP使用以下命令构建OpenSSL库。
化妆DEP & &使清洁& &使
,同时建立它给了我下面的错误。
Undefined symbols for architecture armv7:
"_SSL_library_init", referenced from:
_init_openssl in libpj-armv7-apple-darwin_ios.a(ssl_sock_ossl.o)
"_SSL_load_error_strings", referenced from:
_init_openssl in libpj-armv7-apple-darwin_ios.a(ssl_sock_ossl.o)
"_TLSv1_method", referenced from:
_create_ssl in libpj-armv7-apple-darwin_ios.a(ssl_sock_ossl.o)
"_TLSv1_server_method", referenced from:
_init_openssl in libpj-armv7-apple-darwin_ios.a(ssl_sock_ossl.o)
"_X509_get_notAfter", referenced from:
_get_cert_info in libpj-armv7-apple-darwin_ios.a(ssl_sock_ossl.o)
"_X509_get_notBefore", referenced from:
_get_cert_info in libpj-armv7-apple-darwin_ios.a(ssl_sock_ossl.o)
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [../bin/pjlib-test-armv7-apple-darwin_ios] Error 1
make[1]: *** [pjlib-test-armv7-apple-darwin_ios] Error 2
make: *** [all] Error 1
答
在检查PJSIP票据后,PJSIP开发人员修复了此错误。我将展示如何更容易地解决上述错误。
请以下路径打开ssl_sock_ossl.c文件,
$(PJSIP_DIR)/pjlib/src/pj/ssl_sock_ossl.c
按照下面的链接PJSIP覆盖ssl_sock_ossl.c文件。
使用以下链接在您的ssl_sock_ossl.c中正确添加绿色线。