Porting Cocos2d-x to WindowsPhone8-libcurl library porting

Source: Internet
Author: User

Porting Cocos2d-x to WindowsPhone8-libcurl library porting
In the latest version of Cocos2d-x 3.x, the header files and library files required for porting the libcurl Library to the Windows Phone 8 platform are provided. However, it is not easy to successfully transplant the libcurl library on Windows Phone 8. It may take some twists and turns. I have summarized the following steps:
Configure the header file search path
Configure the link environment
Add dynamic link library


1. Configure the header file search path
For the entire procedure, refer to the rapidjson library porting described in the previous section. The specific process is to select the HelloCppComponent project, open the menu "project" → "properties" to bring up the project Properties dialog box, select "configuration properties" → "C ++" → "General ", add $ (EngineRoot) external \ curl \ include \ wp8 to "add include directory" on the right.
In addition, because the project we want to transplant also needs to parse JSON data, we also need to configure and transplant the rapidjson library.


2. Configure the link environment
The process of configuring the link environment is divided into two steps: Configuring the additional library directory and configuring additional dependencies. Configure the additional library directory to specify the directory where the library files to be linked are located, and configure additional dependencies to specify the library files to be linked.
First, let's take a look at configuring the additional library directory. The specific process is to select the HelloCppComponent project, open the menu "project" → "properties" to bring up the project Properties dialog box, as shown in, select "configuration properties" → "connector" → "General ", add $ (EngineRoot) external \ curl \ prebuilt \ wp8 \ $ (Platform) to "add include directory" on the right. Note that the configuration items must be separated by semicolons.


Configure the $ (Platform) macro in the path prompted by the additional library Directory, which represents arm or win32. The files in arm are for debugging and deployment of Windows Phone 8 devices, files in win32 are prepared for running Windows Phone 8 simulator debugging on a PC.


Next, configure the additional dependencies. Open the Project Properties dialog box, as shown in, select "configuration properties"> "connector"> "input", and add libcurl. lib in the "add dependency" window on the right.

Keys + 6 hsaOstPK/qsztvNPP7sS/ttS7sL/yo6zI58/CzbzL + cq + keys/keys + PGJyIC8 + pgltzybzcm9 "http: // www.2 Cto.com/uploadfile/collfiles/20141128/20141128084253.jpg "alt =" \ "/> after adding a project dialog box, you need to set properties for these files, as shown in the Select File Open Properties dialog box, set "content" to True to ensure that the file is copied to the running environment during compilation. Set these three dynamic link library files one by one.

If the preceding three steps are successfully completed, you can run the test. The transplantation of the libcurl library is representative. It belongs to the header files and library files of various platforms, without the source files. We can port everything in this case.

More content please pay attention to the first domestic Cocos2d-x 3.2 version of the book "Cocos2d-x practice: C ++ volume" book exchange discussion site: http://www.cOcoagame.net
For more exciting video courses, please follow the Cocos course in Zhijie class: http: // v.51wOrk6.com
Welcome to the Cocos2d-x Technology Discussion Group: 257760386 welcome to the knowledge of the iOS classroom public platform

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.