只需要在android.mk里面写上这样的:

LOCAL_PATH := $(call my-dir)

include $(CLEAR_VARS)

LOCAL_MODULE := hellocpp_shared

LOCAL_MODULE_FILENAME := libhellocpp
				   
FILE_LIST := hellocpp/main.cpp
FILE_LIST += $(wildcard $(LOCAL_PATH)/../../Classes/*.cpp)
LOCAL_SRC_FILES := $(FILE_LIST:$(LOCAL_PATH)/%=%)

LOCAL_C_INCLUDES := $(LOCAL_PATH)/../../Classes

LOCAL_WHOLE_STATIC_LIBRARIES := cocos2dx_static

include $(BUILD_SHARED_LIBRARY)

$(call import-module,cocos2dx)

看见变化了么?哈哈  假如你有几百的cpp  咋办  尼玛 那你一个一个找cpp名字 然后复制进去岂不是蛋疼死了?嘿嘿  

这个方法是在群上的老徐给的  谢谢  老徐

posted on 2013-05-09 11:09  纯洁的坏蛋  阅读(111)  评论(0编辑  收藏  举报