Transplantation of Cocos2d-x to WindowsPhone8-libNetwork library transplantation problem, cocos2d transplantation of android

Source: Internet
Author: User

Transplantation of Cocos2d-x to WindowsPhone8-libNetwork library transplantation problem, cocos2d transplantation of android
The Cocos2d-x provides the libNetwork Library source code, and also provides the libNetwork Library source code Visual Studio 2012 project file libNetwork. vcxproj, which is more convenient for transplantation.
Note that some Cocos2d-x engineering templates already have libNetwork libraries in the solution, and the procedures described in this section are not needed.


Because the libNetwork library is dependent on the libcurl Library at the underlying layer, we should first follow the steps described in the previous section to port the libcurl library. This process is not described. Next we will port the libNetwork library. The specific steps are: add the libNetwork Library Project in the solution and add the libNetwork library reference.


1. Add the libNetwork library project to the solution
First, open solution, right-click solution HelloCpp, and select "add"> "existing project" from the menu. The add project dialog box is displayed, as shown in, find the <game project directory> \ cocos2d \ cocos \ network \ proj. in the wp8 directory, select libNetwork. select the vcxproj file and click the OPEN button to add it. Then we can see the added libNetwork project in solution manager.

Add project dialog box
Solution Manager

2. Add libNetwork Library Reference
Then, right-click the HelloCppComponent project in solution, and select "properties" from the right-click menu. The Project Properties dialog box shown in is displayed, in the Properties dialog box, select "general attributes"> "framework and reference", click "Add new reference" on the right, and select "libNetwork" in the displayed dialog box ", click "OK.

Add libNetwork Library Reference

If the preceding steps are successfully completed, we can run the test. The porting of the libNetwork library is representative. It contains the source file. 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.