Some problems with cocos2d-x porting to android Compilation: fatal error: Box2D/Box2D. h: No such file or directory & quot;

Source: Internet
Author: User

1. fatal error: Box2D/Box2D. h: No such file or directory"

To add support for the box2d library, modify the android. mk file as follows:

View text printing?
  1. LOCAL_PATH: = $ (call my-dir)
  2. Include $ (CLEAR_VARS)
  3. LOCAL_MODULE: = game_shared
  4. LOCAL_MODULE_FILENAME: = libgame
  5. LOCAL_SRC_FILES: = hellocpp/main. cpp \
  6. .../../Classes/AppDelegate. cpp \
  7. .../../Classes/HelloWorldScene. cpp
  8. LOCAL_C_INCLUDES: = $ (LOCAL_PATH)/.../../Classes
  9. LOCAL_WHOLE_STATIC_LIBRARIES: = cocos2dx_static cocosdenshion_static cococos_extension_static box2d_static
  10. Include $ (BUILD_SHARED_LIBRARY)
  11. $ (Call import-module, CocosDenshion/android )\
  12. $ (Call import-module, cocos2dx )\
  13. $ (Call import-module, extensions )\
  14. $ (Call import-module, external/Box2D)

You need to add box2d_static and $ (call import-module, external/Box2D) to view text printing?

Add the highlighted part.

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.