Cocos2d-x provides the source code for the Libnetwork library, and it also provides visual Studio 2012 project file Libnetwork.vcxproj for the Libnetwork library, which makes porting easier.
Tip Some cocos2d-x engineering templates in the solution, there are already libnetwork libraries, the process described in this section is not required.
Since the bottom of the Libnetwork library is dependent on the Libcurl library, we will first migrate the Libcurl library as described in the previous section, which is not described. Let's migrate the Libnetwork library by adding the Libnetwork library project and adding Libnetwork Library references in the solution.
1, add Libnetwork Library project in the solution
First, open the solution, right-click on solution Hellocpp, select "Add" → "existing project" in the menu, open the Add Project dialog box, as shown, find the < game project directory >\cocos2d\cocos\network\ PROJ.WP8 directory, select Libnetwork.vcxproj file, select OK and click the Open button to add. Then we can see that the Libnetwork project has just been added in the solution manager.
Add Project Dialog box
Solution Manager
2. Add Libnetwork Library Reference
Then we right-click on the Hellocppcomponent project in the solution, select "Properties" in the right-click menu, pop Up the project properties dialog as shown, select "Common Properties" → "frames and references" in the Properties dialog box, then click on the right "Add New Reference" button, select "Libnetwork" and finally click on the "OK" button.
Add Libnetwork Library Reference
If the above steps are completed successfully, we can run the test. The migration of Libnetwork Library is representative, it belongs to the source file situation. We can all take this as a transplant for everything.
Cocos2d-x transplant to WindowsPhone8 migration problem-libnetwork Library Migration problem