Libpomelo compiled static Library added to cocos2d-x xcode Project

Source: Internet
Author: User

Download the latest version from the https://github.com/NetEase/libpomelo, decompress it, and go to the directory to compile the static library

./pomelo_gyp -DTO=ios./build_ios./build_iossim

Generate static libraries for ios devices (arm) and ios virtual machines (i386) respectively, and package the two libraries together with lipo:

lipo -create ./build/Default-iphoneos/libpomelo.a  ./build/Default-iphonesimulator/libpomelo.a  -output libpomelo.alipo -create ./deps/jansson/build/Default-iphoneos/libjansson.a ./deps/jansson/build/Default-iphonesimulator/libjansson.a  -output libjansson.alipo -create ./deps/uv/build/Default-iphoneos/libuv.a ./deps/uv/build/Default-iphonesimulator/libuv.a  -output libuv.a
Open the cocos2d-x project in xcode and add the three. a static library files generated in project target Build Phases to "Link Binary With Libraries;

Add three directories to "Header Search Paths" in "Build Settings:

Libpomelo/include

Libpomelo/deps/jansson/src

Libpomelo/deps/uv/include

Note the absolute and relative locations of directories.

In this way, you can call the libpomelo static library in both the real machine and simulator.

(To facilitate project sharing, you can copy both the. a static library file and the. h header file to the libs/libpomelo project)


Post: http://blog.csdn.net/aryang/article/details/8875603

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.