iOS Compile Errors: "Undefined symbols for architecture armv7"

Nov 17, 2014 at 3:34 PM
Hi,

i followed the instructions to build Casablanca for iOS on my Mac.
I used your development branch to get the workaround for this issue: https://casablanca.codeplex.com/workitem/310.
Everything worked so far.

I have a really basic c++ implementation now:
 http_client client(U("http://134.0.242.532:1337"));
    pplx::task<web::http::http_response> resp = client.request(web::http::methods::POST, U("/test/blabla_123/50.1/13"));


    resp.then([=] (http_response  response)
    {
        printf("Received response status code:%u\n", response.status_code());
    });
and got the following when compiling:
Undefined symbols for architecture armv7:
  "_SecCertificateCreateWithData", referenced from:
      web::http::client::details::verify_X509_cert_chain(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) in libcpprest.a(x509_cert_utilities.o)
  "_SecTrustCreateWithCertificates", referenced from:
      web::http::client::details::verify_X509_cert_chain(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) in libcpprest.a(x509_cert_utilities.o)
  "_SecPolicyCreateSSL", referenced from:
      web::http::client::details::verify_X509_cert_chain(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) in libcpprest.a(x509_cert_utilities.o)
  "_SecTrustEvaluate", referenced from:
      web::http::client::details::verify_X509_cert_chain(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) in libcpprest.a(x509_cert_utilities.o)
ld: symbol(s) not found for architecture armv7
any ideas?
Nov 18, 2014 at 5:32 PM
Hi FreakyFlu,

It looks like you need to link against the Security.framework in your build as well. These functions were added in the development branch. I'll update the iOS build instructions to mention you need to include it.

Let me know if that doesn't work.

Thanks,
Steve
Nov 19, 2014 at 9:46 AM
Hi Steve,

adding the security.framework worked for me.

Thank you