Visual Studio 2012 box2d Development Environment Settings

Source: Internet
Author: User

Cocos2d-x 3.x uses the chipmunk physical engine by default. If we want to use the box2d engine, some settings and adjustments are required, and these settings vary with development platforms. Since this book previously introduced the Win32 platform developed based on Microsoft's Visual Studio 2012, This section describes the settings of the box2d development environment under Visual Studio 2012.
These settings and adjustments are as follows:
Add the libbox2d library project to the solution.
Add libbox2d library reference.
Enable the box2d pre-compilation switch.

1. Add the libbox2d Library to the solution
First, open solution, right-click solution hellobox2d, and choose "add"> "existing items" from the context menu ",.


Open the libbox2d PROJECT IN SOLUTION

In the displayed dialog box, select the box2d. vcxproj project file. The specific project path is "<project directory> \ cocos2d \ external \ box2d \ proj. Win32 \ box2d. vcxproj ". After adding, we can see that the libbox2d project is added to the solution ,.

Add a libbox2d Project



2. Add libbox2d Library Reference
Then, in the solution, right-click the project hellobox2d and choose Properties From the shortcut menu. The Project Properties dialog box is displayed, in the Properties dialog box, select "general attributes"> "framework and reference", click "Add new reference" on the right, and select "libbox2d" in the displayed dialog box ", click "OK.

Add libbox2d Library Reference



3. Enable the box2d pre-compilation switch.
Open the Properties dialog box, select "configuration properties"> "C/C ++"> "Preprocessor", and then find cc_enable_chipmunk_integration = 1 in the "Preprocessor" on the right, modify it to cc_enable_box2d_integration = 1. In this way, the physical engine used by the Framework is changed from chipmunk to box2d ,. After modification, click "OK.


Enable box2d pre-Compilation

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: http://v.51work6.com welcome to join the Cocos2d-x Technology Discussion Group: 257760386

Welcome to Zhijie IOS public classroom Platform

Visual Studio 2012 box2d Development Environment Settings

Related Article

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.