Problem building pjsua2 for iOS

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

I am upgrading my project to the latest trunk and I am having trouble building pjsua2-test for iOS. It also looks like libmilenage is no longer being built.

I am not using pjsua2-lib or pjsua-test right now but I did not see an easy way to skip building them so I need to figure out how to get past this step.

The first problem I found was that CXX is not set correctly in configure-iphone. It is set to clang instead of clang++. I added the line to change clang to clang++ in the block below to fix that problem.


# Set CXX if not set

if test "${CXX}" = ""; then

  export CXX=`echo ${CC} | sed 's/clang/clang++/'`

  export CXX=`echo ${CC} | sed 's/gcc/g++/'`

  echo "$F: CXX is not specified, using ${CXX}"

fi


The next problem is that the standard c++ library is not being set correctly when linking pjsua2-test. I tried passing -stdlib=libc++ or -stdlib=libstdc++ but pjsua2-test would still not link. It is not finding std::string, etc. The first part of the error is below.


Undefined symbols for architecture armv7:

  "std::string::find(std::string const&, unsigned long) const", referenced from:

      pj::FindBuddyMatch::match(std::string const&, pj::Buddy const&) in libpjsua2-arm-apple-darwin9.a(account.o)

  "std::string::size() const", referenced from:

      pj::Endpoint::on_call_sdp_created(int, pjmedia_sdp_session*, pj_pool_t*, pjmedia_sdp_session const*) in libpjsua2-arm-apple-darwin9.a(endpoint.o)

      pj::Endpoint::natCheckStunServers(std::vector<std::string, std::allocator<std::string> > const&, bool, void*) in libpjsua2-arm-apple-darwin9.a(endpoint.o)

      pj::str2Pj(std::string const&) in libpjsua2-arm-apple-darwin9.a(endpoint.o)

      pj::str2Pj(std::string const&) in libpjsua2-arm-apple-darwin9.a(call.o)

      pj::SipMultipartPart::toPj() const in libpjsua2-arm-apple-darwin9.a(siptypes.o)

      pj::str2Pj(std::string const&) in libpjsua2-arm-apple-darwin9.a(siptypes.o)

      pj::str2Pj(std::string const&) in libpjsua2-arm-apple-darwin9.a(media.o)

      ...

  "std::string::c_str() const", referenced from:

      pj::Endpoint::Endpoint() in libpjsua2-arm-apple-darwin9.a(endpoint.o)

      pj::Endpoint::instance() in libpjsua2-arm-apple-darwin9.a(endpoint.o)

      pj::Endpoint::libDestroy(unsigned int) in libpjsua2-arm-apple-darwin9.a(endpoint.o)

      pj::Endpoint::utilLogWrite(int, std::string const&, std::string const&) in libpjsua2-arm-apple-darwin9.a(endpoint.o)

      pj::Endpoint::on_call_sdp_created(int, pjmedia_sdp_session*, pj_pool_t*, pjmedia_sdp_session const*) in libpjsua2-arm-apple-darwin9.a(endpoint.o)

      pj::Endpoint::libCreate() in libpjsua2-arm-apple-darwin9.a(endpoint.o)

      pj::Endpoint::libInit(pj::EpConfig const&) in libpjsua2-arm-apple-darwin9.a(endpoint.o)

      ...


Thanks for your help,

Brian




[Index of Archives]     [Asterisk Users]     [Asterisk App Development]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [Linux API]
  Powered by Linux