iOS Pjsip Static Library compilation (i)

Source: Internet
Author: User

First put on PJSIP official website http://www.pjsip.org/download.htm

When downloading note while the. bz2 have LF line-ends and are for Unix and Mac OS X systems. (please download. bz2)

Start compiling when the download is complete:

First you have to have a Xcode.

1, find your source code, that is, you downloaded the one. tar.bz2 mac should have its own decompression tool I just double-click to open it.

And then build a config_site.h. h file in the pjlib/include/pj/directory

#define Pj_config_iphone 1<pj/config_site_sample.h>

The home directory can be retrieved after completion

Prepare to finish start compiling four platforms i386 (simulator)

Execute at Terminal

$ export devpath=/applications/xcode.app/contents/developer/platforms/iphonesimulator.platform/Developer$ ARCH="-arch i386" cflags="-o2-m32-mios-simulator-version-min=5.0   "ldflags="-o2-m32-mios-simulator-version-min=5.0 "./configure-  iphone$ make DEP && do clean && make

There is no error after execution, the emulator version of the static library is compiled: directory

    • Pjlib/lib
    • Pjlib-util/lib
    • Pjmedia/lib
    • Pjnath/lib
    • Pjsip/lib
    • Third_party/lib

Several other static library compilation basically no difference of course note that when you compile the I386 static library to exit the console after entering the edit

ARMv7

Execute the following command:

$ arch='-arch armv7' ./configure-iphone$ make dep && do clean && make$. /copylibs.sh armv7//This command is a script that copies the compiled. A files to the specified directory
Of course, if you're not familiar with the scripting language, you'll be prompted not to do so./copylibs.sh

armv7s

$ arch='-arch armv7s' ./configure-iphone$ make dep && do clean && make$ . /copylibs.sh armv7s//This command is a script that copies the compiled. A files to the specified directory
Of course, if you're not familiar with the scripting language, you'll be prompted not to do so./copylibs.sh

Arm64

$ arch='-arch arm64' ./configure-iphone$ make dep && do clean && make$. /copylibs.sh arm64//This command is a script that copies the compiled. A files to the specified directory
Of course, if you're not familiar with the scripting language, you'll be prompted not to do so./copylibs.sh arm64

All the static libraries have been completed as described above and of course there are links compiled by others in this

: Https://github.com/chebur/pjsip

iOS Pjsip Static Library compilation (i)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.