在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
Android.mk是这样的 LOCAL_PATH := $(call my-dir) include $(CLEAR_VARS) LOCAL_MODULE := lua LOCAL_SRC_FILES := lua.cpp MY_FILES := $(wildcard $(LOCAL_PATH)/lua/*.c) MY_FILES := $(MY_FILES:$(LOCAL_PATH)/%=%) LOCAL_SRC_FILES += $(MY_FILES) # includes LOCAL_C_INCLUDES := $(LOCAL_PATH) LOCAL_C_INCLUDES += $(LOCAL_PATH)/lua/ include $(BUILD_SHARED_LIBRARY) lua的源码放在jni/lua目录下,删除lua.c和luac.c 执行ndk-build,会报错:
查了下,是定义小数点字符的,把这段注释掉,直接定义算了: // #if !defined(l_getlocaledecpoint) // #define l_getlocaledecpoint() (localeconv()->decimal_point[0]) // #endif #define l_getlocaledecpoint() '.' 还有个liolib.c也改下,这样就编译成功了。
我用的是lua5.3。
等会学习下lua
|
请发表评论