Question

I actually posted this question to pjsip mailing list, but did not get any response yet. So I thought it would try my luck here.

This is a pretty simple issue I assume, I am trying to compile pjsip (latest from trunk) for iPhone sdk 4.3 on mac 10.6.2

I am following this instruction http://trac.pjsip.org/repos/wiki/Getting-Started/iPhone :

  1. checked out latest code from svn
  2. export CFLAGS+=" -march=armv7 -mcpu=arm1176jzf-s -mcpu=cortex-a8" export LDFLAGS+=" -march=armv7 -mcpu=arm1176jzf-s -mcpu=cortex-a8"
  3. ./configure-iphone
  4. make dep && make clean && make

It has this following error:

undefined symbols for architecture armv7: "_pjmedia_codec_g722_init",
referenced from: _g722_encode_decode in mips_test.o
_create_stream_g722 in mips_test.o "_pjmedia_codec_g722_deinit",
referenced from: _g722_encode_decode in mips_test.o
_create_stream_g722 in mips_test.o ld: symbol(s) not found for
architecture armv7 collect2: ld returned 1 exit status make[2]: ***
[../bin/pjmedia-test-arm-apple-darwin9] Error 1 make[1]: ***
[pjmedia-test] Error 2 make: *** [all] Error 1

Does anyone have any idea how to go around this?
May be disable the pjmedia test?

(I also tried patching the mips_test.c using the file from http://code.google.com/p/siphon/downloads/detail?name=patch-mips_test.txt&can=2&q= , same issue)

Was it helpful?

Solution

codec g722 is disabled for iPhoneOS build. But unfortunately they have forgotten to exclude g722_encode_decode() from the build. You can simple edit mips_test.c and surround g722_encode_decode() and create_stream_g722() with

# if PJMEDIA_HAS_G722_CODEC
..
#endif

Hope this helps.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top