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