Teach you how to add libpomelo to cocos2d-x projects (including libuv, Jansson)

Source: Internet
Author: User

Operating Environment

Operating System: Windows 7

VS: 2013

Cocos2d-x version: 3.0

Project path: e: cocos2d-prj \


1. Download libpomelo code from GitHub

 
E: \ cocos2d-prj> git clone https://github.com/NetEase/libpomelo.git


2. Create a vs project for libpomelo

E: \ cocos2d-prj> Cd libpomeloe: \ cocos2d-prj \ libpomelo> mkdir Builde: \ cocos2d-prj \ libpomelo> git clone https://github.com/martine/gyp.git build/gype: \ cocos2d-prj \ libpomelo> build \ Gyp \ gyp. bat -- depth =. pomelo. gyp-dlibrary = static_library-DTO = pc

 
 
 
 

If an error is reported (A vs version problem)

Modify row 188th of the E: \ snake \ code \ Client \ libpomelo \ build \ Gyp \ pylib \ Gyp \ msvsversion. py file

Return versions [STR (name)]

Change

Return versions ["2010"]

Execute the script after modification.

 
E: \ cocos2d-prj \ libpomelo> build \ Gyp \ gyp. bat -- depth =. pomelo. gyp-dlibrary = static_library-DTO = pc

 

3. Create libuv vs Project (execute E: \ cocos2d-prj \ libpomelo \ deps \ UV \ vcbuild. Bat script)

 
E: \ cocos2d-prj> Cd libpomelo \ deps \ uve: \ cocos2d-prj \ libpomelo \ deps \ UV> vcbuild. bat
 
 

4. Open the cocos2d project and add the following vs projects to the project (add existing project)

 
E: \ cocos2d-prj \ libpomelo. vcxproje: \ snake \ code \ Client \ libpomelo \ deps \ Jansson. vcxproje: \ snake \ code \ Client \ libpomelo \ deps \ UV \ libuv. vcxproj

 
 


5. Modify the project version

In vs, right-click the above project and select upgrade VC ++ compiler and libraries


Android and iOS platforms To be continued ....

Teach you how to add libpomelo to cocos2d-x projects (including libuv, Jansson)

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.