Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

aws-cpp-sdk & librucl linking error



  • Greetings,

    I am trying to link the aws-cpp-sdk to my QT 5.14.0 project . I have successfully installed some aws modules (core,s3, cognito-identity,..) using vcpkg on mac osx 10.14.6. I have added aws include and lib paths to the .pro file (as shown below). I keep getting "Undefined symbols for Architecture x86_64" linking error with regards to liburcl.a(ldap.c.o) (as shown below).

    Thanks in advance for your help

    //------------ Project file (.pro file) -----------
    INCLUDEPATH += /usr/local/var/vcpkg/installed/x64-osx/include/
    LIBS += -laws-cpp-sdk-core -lcurl -lz -lcrypto -lidn2
    LIBS += -L"/usr/local/Cellar/vcpkg/2021.05.12/libexec/installed/x64-osx/lib/"

    //--------- Build error ----------------------------------

    libcurl.a(ldap.c.o):-1: error: Undefined symbols for architecture x86_64:
    "_CFArrayAppendValue", referenced from:
    _sectransp_connect_common in libcurl.a(sectransp.c.o)
    _append_cert_to_array in libcurl.a(sectransp.c.o)
    "_CFArrayCreate", referenced from:
    _sectransp_connect_common in libcurl.a(sectransp.c.o)
    "_CFArrayCreateMutable", referenced from:
    _sectransp_connect_common in libcurl.a(sectransp.c.o)
    _verify_cert in libcurl.a(sectransp.c.o)
    "_CFArrayGetCount", referenced from:
    _sectransp_connect_common in libcurl.a(sectransp.c.o)
    _sectransp_connect_step2 in libcurl.a(sectransp.c.o)
    "_CFArrayGetValueAtIndex", referenced from:
    _sectransp_connect_common in libcurl.a(sectransp.c.o)
    _sectransp_connect_step2 in libcurl.a(sectransp.c.o)
    "_CFDataCreate", referenced from:
    _sectransp_connect_common in libcurl.a(sectransp.c.o)
    _append_cert_to_array in libcurl.a(sectransp.c.o)
    "_CFDataGetBytePtr", referenced from:
    _sectransp_connect_step2 in libcurl.a(sectransp.c.o)
    "_CFDataGetLength", referenced from:
    _sectransp_connect_step2 in libcurl.a(sectransp.c.o)
    "_CFDictionaryCreate", referenced from:
    _sectransp_connect_common in libcurl.a(sectransp.c.o)
    "_CFDictionaryGetTypeID", referenced from:
    _sectransp_connect_common in libcurl.a(sectransp.c.o)
    "_CFDictionaryGetValue", referenced from:
    _sectransp_connect_common in libcurl.a(sectransp.c.o)
    "_CFGetTypeID", referenced from:
    _sectransp_connect_common in libcurl.a(sectransp.c.o)
    "_CFRelease", referenced from:
    _Curl_sectransp_shutdown in libcurl.a(sectransp.c.o)
    _Curl_sectransp_close in libcurl.a(sectransp.c.o)
    _sectransp_connect_common in libcurl.a(sectransp.c.o)
    _sectransp_connect_step2 in libcurl.a(sectransp.c.o)
    _CopyCertSubject in libcurl.a(sectransp.c.o)
    _verify_cert in libcurl.a(sectransp.c.o)
    _append_cert_to_array in libcurl.a(sectransp.c.o)
    ...
    "_CFRetain", referenced from:
    _sectransp_connect_common in libcurl.a(sectransp.c.o)
    "_CFStringCompare", referenced from:
    _sectransp_connect_common in libcurl.a(sectransp.c.o)
    _sectransp_connect_step2 in libcurl.a(sectransp.c.o)
    "_CFStringCreateWithCString", referenced from:
    _sectransp_connect_common in libcurl.a(sectransp.c.o)
    "_CFStringGetCString", referenced from:
    _CopyCertSubject in libcurl.a(sectransp.c.o)
    "_CFStringGetCStringPtr", referenced from:
    _CopyCertSubject in libcurl.a(sectransp.c.o)
    "_CFStringGetLength", referenced from:
    _CopyCertSubject in libcurl.a(sectransp.c.o)
    "_CFURLCreateDataAndPropertiesFromResource", referenced from:
    _sectransp_connect_common in libcurl.a(sectransp.c.o)
    "_CFURLCreateFromFileSystemRepresentation", referenced from:
    _sectransp_connect_common in libcurl.a(sectransp.c.o)
    "_SSLClose", referenced from:
    _Curl_sectransp_shutdown in libcurl.a(sectransp.c.o)
    _Curl_sectransp_close in libcurl.a(sectransp.c.o)
    "_SSLCopyALPNProtocols", referenced from:
    _sectransp_connect_step2 in libcurl.a(sectransp.c.o)
    "_SSLCopyPeerTrust", referenced from:
    _sectransp_connect_common in libcurl.a(sectransp.c.o)
    _sectransp_connect_step2 in libcurl.a(sectransp.c.o)
    _verify_cert in libcurl.a(sectransp.c.o)
    "_SSLCreateContext", referenced from:
    _sectransp_connect_common in libcurl.a(sectransp.c.o)
    "_SSLGetBufferedReadSize", referenced from:
    _Curl_sectransp_data_pending in libcurl.a(sectransp.c.o)
    "_SSLGetNegotiatedCipher", referenced from:
    _sectransp_connect_step2 in libcurl.a(sectransp.c.o)
    "_SSLGetNegotiatedProtocolVersion", referenced from:
    _sectransp_connect_step2 in libcurl.a(sectransp.c.o)
    "_SSLGetNumberSupportedCiphers", referenced from:
    _sectransp_connect_common in libcurl.a(sectransp.c.o)
    "_SSLGetSessionState", referenced from:
    _Curl_sectransp_check_cxn in libcurl.a(sectransp.c.o)
    "_SSLGetSupportedCiphers", referenced from:
    _sectransp_connect_common in libcurl.a(sectransp.c.o)
    "_SSLHandshake", referenced from:
    _sectransp_connect_step2 in libcurl.a(sectransp.c.o)
    "_SSLRead", referenced from:
    _sectransp_recv in libcurl.a(sectransp.c.o)
    "_SSLSetALPNProtocols", referenced from:
    _sectransp_connect_common in libcurl.a(sectransp.c.o)
    "_SSLSetCertificate", referenced from:
    _sectransp_connect_common in libcurl.a(sectransp.c.o)
    "_SSLSetConnection", referenced from:
    _sectransp_connect_common in libcurl.a(sectransp.c.o)
    "_SSLSetEnabledCiphers", referenced from:
    _sectransp_connect_common in libcurl.a(sectransp.c.o)
    "_SSLSetIOFuncs", referenced from:
    _sectransp_connect_common in libcurl.a(sectransp.c.o)
    "_SSLSetPeerDomainName", referenced from:
    _sectransp_connect_common in libcurl.a(sectransp.c.o)
    "_SSLSetPeerID", referenced from:
    _sectransp_connect_common in libcurl.a(sectransp.c.o)
    "_SSLSetProtocolVersionMax", referenced from:
    _sectransp_connect_common in libcurl.a(sectransp.c.o)
    "_SSLSetProtocolVersionMin", referenced from:
    _sectransp_connect_common in libcurl.a(sectransp.c.o)
    "_SSLSetSessionOption", referenced from:
    _sectransp_connect_common in libcurl.a(sectransp.c.o)
    "_SSLWrite", referenced from:
    _sectransp_send in libcurl.a(sectransp.c.o)
    "_SecCertificateCopyCommonName", referenced from:
    _sectransp_connect_common in libcurl.a(sectransp.c.o)
    "_SecCertificateCopyLongDescription", referenced from:
    _CopyCertSubject in libcurl.a(sectransp.c.o)
    "_SecCertificateCreateWithData", referenced from:
    _append_cert_to_array in libcurl.a(sectransp.c.o)
    "_SecCertificateGetTypeID", referenced from:
    _sectransp_connect_common in libcurl.a(sectransp.c.o)
    "_SecIdentityCopyCertificate", referenced from:
    _sectransp_connect_common in libcurl.a(sectransp.c.o)
    "_SecIdentityCreateWithCertificate", referenced from:
    _sectransp_connect_common in libcurl.a(sectransp.c.o)
    "_SecItemCopyMatching", referenced from:
    _sectransp_connect_common in libcurl.a(sectransp.c.o)
    "_SecItemImport", referenced from:
    _sectransp_connect_common in libcurl.a(sectransp.c.o)
    "_SecKeyCopyExternalRepresentation", referenced from:
    _sectransp_connect_step2 in libcurl.a(sectransp.c.o)
    "_SecPolicyCreateSSL", referenced from:
    _sectransp_connect_common in libcurl.a(sectransp.c.o)
    "_SecTrustCopyPublicKey", referenced from:
    _sectransp_connect_step2 in libcurl.a(sectransp.c.o)
    "_SecTrustEvaluate", referenced from:
    _verify_cert in libcurl.a(sectransp.c.o)
    "_SecTrustGetCertificateAtIndex", referenced from:
    _sectransp_connect_common in libcurl.a(sectransp.c.o)
    "_SecTrustGetCertificateCount", referenced from:
    _sectransp_connect_common in libcurl.a(sectransp.c.o)
    "_SecTrustSetAnchorCertificates", referenced from:
    _verify_cert in libcurl.a(sectransp.c.o)
    "_SecTrustSetAnchorCertificatesOnly", referenced from:
    _verify_cert in libcurl.a(sectransp.c.o)
    "Aws::S3::S3Client::S3Client(Aws::Client::ClientConfiguration const&, Aws::Client::AWSAuthV4Signer::PayloadSigningPolicy, bool, Aws::S3::US_EAST_1_REGIONAL_ENDPOINT_OPTION)", referenced from:
    _main in main.o
    "Aws::S3::S3Client::~S3Client()", referenced from:
    _main in main.o
    "Aws::S3::S3Client::ListBuckets() const", referenced from:
    _main in main.o
    "___CFConstantStringClassReference", referenced from:
    CFString in libcurl.a(sectransp.c.o)
    "_ber_free", referenced from:
    _Curl_ldap in libcurl.a(ldap.c.o)
    "_kCFAllocatorDefault", referenced from:
    _sectransp_connect_common in libcurl.a(sectransp.c.o)
    _verify_cert in libcurl.a(sectransp.c.o)
    _append_cert_to_array in libcurl.a(sectransp.c.o)
    "_kCFBooleanTrue", referenced from:
    _sectransp_connect_common in libcurl.a(sectransp.c.o)
    "_kCFCopyStringDictionaryKeyCallBacks", referenced from:
    _sectransp_connect_common in libcurl.a(sectransp.c.o)
    "_kCFTypeArrayCallBacks", referenced from:
    _sectransp_connect_common in libcurl.a(sectransp.c.o)
    _verify_cert in libcurl.a(sectransp.c.o)
    "_kCFTypeDictionaryValueCallBacks", referenced from:
    _sectransp_connect_common in libcurl.a(sectransp.c.o)
    "_kSecAttrLabel", referenced from:
    _sectransp_connect_common in libcurl.a(sectransp.c.o)
    "_kSecClass", referenced from:
    _sectransp_connect_common in libcurl.a(sectransp.c.o)
    "_kSecClassIdentity", referenced from:
    _sectransp_connect_common in libcurl.a(sectransp.c.o)
    "_kSecImportItemIdentity", referenced from:
    _sectransp_connect_common in libcurl.a(sectransp.c.o)
    "_kSecMatchLimit", referenced from:
    _sectransp_connect_common in libcurl.a(sectransp.c.o)
    "_kSecMatchLimitAll", referenced from:
    _sectransp_connect_common in libcurl.a(sectransp.c.o)
    "_kSecMatchPolicy", referenced from:
    _sectransp_connect_common in libcurl.a(sectransp.c.o)
    "_kSecReturnRef", referenced from:
    _sectransp_connect_common in libcurl.a(sectransp.c.o)
    "_ldap_err2string", referenced from:
    _Curl_ldap in libcurl.a(ldap.c.o)
    "_ldap_first_attribute", referenced from:
    _Curl_ldap in libcurl.a(ldap.c.o)
    "_ldap_first_entry", referenced from:
    _Curl_ldap in libcurl.a(ldap.c.o)
    "_ldap_free_urldesc", referenced from:
    _Curl_ldap in libcurl.a(ldap.c.o)
    "_ldap_get_dn", referenced from:
    _Curl_ldap in libcurl.a(ldap.c.o)
    "_ldap_get_values_len", referenced from:
    _Curl_ldap in libcurl.a(ldap.c.o)
    "_ldap_init", referenced from:
    _Curl_ldap in libcurl.a(ldap.c.o)
    "_ldap_memfree", referenced from:
    _Curl_ldap in libcurl.a(ldap.c.o)
    "_ldap_msgfree", referenced from:
    _Curl_ldap in libcurl.a(ldap.c.o)
    "_ldap_next_attribute", referenced from:
    _Curl_ldap in libcurl.a(ldap.c.o)
    "_ldap_next_entry", referenced from:
    _Curl_ldap in libcurl.a(ldap.c.o)
    "_ldap_search_s", referenced from:
    _Curl_ldap in libcurl.a(ldap.c.o)
    "_ldap_set_option", referenced from:
    _Curl_ldap in libcurl.a(ldap.c.o)
    "_ldap_simple_bind_s", referenced from:
    _Curl_ldap in libcurl.a(ldap.c.o)
    "_ldap_unbind_s", referenced from:
    _Curl_ldap in libcurl.a(ldap.c.o)
    "_ldap_url_parse", referenced from:
    _Curl_ldap in libcurl.a(ldap.c.o)
    "_ldap_value_free_len", referenced from:
    _Curl_ldap in libcurl.a(ldap.c.o)


  • Lifetime Qt Champion

    Hi,

    You need to link against the macOS frameworks/libraries that provide these symbols.


Log in to reply