码迷,mamicode.com
首页 > 移动开发 > 详细

cocos2d-x3.0 编译android出现的问题笔记  cocos2dx3.0 Android.mk

时间:2014-05-21 22:59:16      阅读:374      评论:0      收藏:0      [点我收藏+]

标签:des   android   style   blog   class   c   

1.编译时出现 No rule to make target 错误,尝试删除XXX/proj.android/obj/local/armeabi/objs这个文件夹。

2.android.mk正确写法

bubuko.com,布布扣
LOCAL_PATH := $(call my-dir)

include $(CLEAR_VARS)

LOCAL_MODULE := cocos2dcpp_shared

LOCAL_MODULE_FILENAME := libcocos2dcpp

# 遍历目录及子目录的函数
define walk
    $(wildcard $(1)) $(foreach e, $(wildcard $(1)/*), $(call walk, $(e)))
endef 
# 遍历Classes目录
ALLFILES = $(call walk, $(LOCAL_PATH)/../../Classes)
FILE_LIST := hellocpp/main.cpp
# 从所有文件中提取出所有.cpp文件
FILE_LIST += $(filter %.cpp %.c, $(ALLFILES))
LOCAL_SRC_FILES := $(FILE_LIST:$(LOCAL_PATH)/%=%)
FILE_INCLUDES := $(shell find $(LOCAL_PATH)/../../Classes -type d)
LOCAL_C_INCLUDES := $(FILE_INCLUDES)

LOCAL_WHOLE_STATIC_LIBRARIES := cocos2dx_static
LOCAL_WHOLE_STATIC_LIBRARIES += cocosdenshion_static
LOCAL_WHOLE_STATIC_LIBRARIES += box2d_static
LOCAL_WHOLE_STATIC_LIBRARIES += cocos_extension_static
LOCAL_WHOLE_STATIC_LIBRARIES += cocostudio_static

include $(BUILD_SHARED_LIBRARY)

$(call import-module,2d)
$(call import-module,audio/android)
$(call import-module,Box2D)
$(call import-module,editor-support/cocostudio)
$(call import-module,extensions)
bubuko.com,布布扣

 

cocos2d-x3.0 编译android出现的问题笔记  cocos2dx3.0 Android.mk,布布扣,bubuko.com

cocos2d-x3.0 编译android出现的问题笔记  cocos2dx3.0 Android.mk

标签:des   android   style   blog   class   c   

原文地址:http://www.cnblogs.com/junzitandandan/p/3739016.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!