1、fatal error: Box2D/Box2D.h: No such file or directory"
须要加入box2d库的支持,改动android.mk文件,例如以下:
查看文本打印?
- LOCAL_PATH := $(call my-dir)
- include $(CLEAR_VARS)
- LOCAL_MODULE := game_shared
- LOCAL_MODULE_FILENAME := libgame
- LOCAL_SRC_FILES := hellocpp/main.cpp \
- ../../Classes/AppDelegate.cpp \
- ../../Classes/HelloWorldScene.cpp
- LOCAL_C_INCLUDES := $(LOCAL_PATH)/../../Classes
- LOCAL_WHOLE_STATIC_LIBRARIES := cocos2dx_static cocosdenshion_static cocos_extension_static box2d_static
- include $(BUILD_SHARED_LIBRARY)
- $(call import-module,CocosDenshion/android) \
- $(call import-module,cocos2dx) \
- $(call import-module,extensions) \
- $(call import-module,external/Box2D)
须要加入 box2d_static 和 $(call import-module,external/Box2D)
查看文本打印?
加入标红的部分。
时间: 2024-12-24 08:31:54