开发者社区> 问答> 正文

Mac 安装oss c++ sdk报错

Mac 安装oss c++ sdk报错,

"_EVP_MD_CTX_free", referenced from: AlibabaCloud::OSS::ComputeContentMD5

安装命令: cmake -DOPENSSL_ROOT_DIR=/usr/local/Cellar/openssl@1.1/1.1.1d -DOPENSSL_LIBRARIES=/usr/local/Cellar/openssl@1.1/1.1.1d/lib -DOPENSSL_INCLUDE_DIRS=/usr/local/Cellar/openssl@1.1/1.1.1d/include/ ..

错误信息:

Undefined symbols for architecture x86_64: "_EVP_MD_CTX_free", referenced from: AlibabaCloud::OSS::ComputeContentMD5(std::__1::basic_istream<char, std::__1::char_traits >&) in libalibabacloud-oss-cpp-sdk.a(Utils.cc.o) AlibabaCloud::OSS::ComputeContentETag(std::__1::basic_istream<char, std::__1::char_traits >&) in libalibabacloud-oss-cpp-sdk.a(Utils.cc.o) "_EVP_MD_CTX_new", referenced from: AlibabaCloud::OSS::ComputeContentMD5(std::__1::basic_istream<char, std::__1::char_traits >&) in libalibabacloud-oss-cpp-sdk.a(Utils.cc.o) AlibabaCloud::OSS::ComputeContentETag(std::__1::basic_istream<char, std::__1::char_traits >&) in libalibabacloud-oss-cpp-sdk.a(Utils.cc.o) "_EVP_MD_CTX_reset", referenced from: AlibabaCloud::OSS::ComputeContentMD5(std::__1::basic_istream<char, std::__1::char_traits >&) in libalibabacloud-oss-cpp-sdk.a(Utils.cc.o) AlibabaCloud::OSS::ComputeContentETag(std::__1::basic_istream<char, std::__1::char_traits >&) in libalibabacloud-oss-cpp-sdk.a(Utils.cc.o)

本人安装openssl目录 yehaomiaodeMBP:build yehaomiao$ ls /usr/local/Cellar/openssl@1.1/1.1.1d/include/openssl/ Display all 104 possibilities? (y or n) aes.h bioerr.h cmac.h crypto.h dsaerr.h engine.h kdferr.h objects.h pem2.h randerr.h seed.h stack.h ui.h asn1.h blowfish.h cms.h cryptoerr.h dtls1.h engineerr.h lhash.h objectserr.h pemerr.h rc2.h sha.h store.h uierr.h asn1_mac.h bn.h cmserr.h ct.h e_os2.h err.h md2.h ocsp.h pkcs12.h rc4.h srp.h storeerr.h whrlpool.h asn1err.h bnerr.h comp.h cterr.h ebcdic.h evp.h md4.h ocsperr.h pkcs12err.h rc5.h srtp.h symhacks.h x509.h asn1t.h buffer.h comperr.h des.h ec.h evperr.h md5.h opensslconf.h pkcs7.h ripemd.h ssl.h tls1.h x509_vfy.h async.h buffererr.h conf.h dh.h ecdh.h hmac.h mdc2.h opensslv.h pkcs7err.h rsa.h ssl2.h ts.h x509err.h asyncerr.h camellia.h conf_api.h dherr.h ecdsa.h idea.h modes.h ossl_typ.h rand.h rsaerr.h ssl3.h tserr.h x509v3.h bio.h cast.h conferr.h dsa.h ecerr.h kdf.h obj_mac.h pem.h rand_drbg.h safestack.h sslerr.h txt_db.h x509v3err.h

yehaomiaodeMBP:build yehaomiao$ ls /usr/local/Cellar/openssl@1.1/1.1.1d/lib/ engines-1.1 libcrypto.1.1.dylib libcrypto.a libcrypto.dylib libssl.1.1.dylib libssl.a libssl.dylib pkgconfig

展开
收起
游客fxjczhuzerunw 2019-12-26 20:34:07 3404 0
1 条回答
写回答
取消 提交回答
  • 没有链接到相关library,试一下把library的路径写到link_directories命令里

    2020-03-23 18:03:50
    赞同 展开评论 打赏
问答排行榜
最热
最新

相关电子书

更多
从 SDK 到编解码:视频直播架构解析 立即下载
跨平台的云服务SDK需要什么 立即下载
一个跨平台的云服务SDK需要什么 立即下载